I'm trying to identify the Location (lat/lon) and upstream area of every raster point that flows into the Arctic Ocean (there are a lot so it has to be fully automated). I'm starting with the following rasters:
- Flow Direction
- Accumlated Flow Area
My approach so far has been to use the above rasters to create a delineated basin shapefile. From there I was hoping I could use the shapefile to look at the Flow Accumulation Raster and identify the location of the maximum value in each basin. In terms of output, I just need a table that shows [Basin#, Longitude, Latitude, UpstreamArea] for every basin.
I've already looked at How to find the locations of the highest values in a raster? but I don't know how to restrict the raster to only the area bounded by the polygons in the shapefile]
**Using: ArcGIS10, Python, etc.*
Best Answer
I assume that there is only 1 pixel per polygon that has a maximum value.
1. Find Maximum Value
To solve this task (find the maximum pixel value in each polygon) you can use Zonal Statistics (Spatial Analyst).
in_zone_data = your polygon file
zone_field = basin number
in_value_raster = flow accumulation raster
statistics_type = MAXIMUM
2. Convert basin polygon to raster
pixel value = basin number
3. Find location of the maximum value
Use Con (Spatial Analyst) to find the location of the maximum in each basin.
The result raster contains one pixel for each basin. The pixel value shows the basin number.
4. Convert raster to point
convert result raster from step 3 to point file (only for pixel values not 0)
5. calculate lat/lon for result from step 4