Bookmark this page: Add raster max value location within each polygon to Yahoo MyWeb Add raster max value location within each polygon to Google Bookmarks Add raster max value location within each polygon to Windows Live Add raster max value location within each polygon to Del.icio.us Digg raster max value location within each polygon! Add raster max value location within each polygon to Netscape
  •  
  • Subject
  • Author
  • Date
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by julf on May 5, 2006, 4:15 am
Hi,
I have a raster (a DEM) and a polygon shapefile. I want to obtain for
each polygon the coordinates of the raster cell containing the maximum
elevation. These coordinates could be either stored as new fields in
the polygon shapefile (e.g. xmax and ymax) or, even better, as a new
point shapefile.
I have ArcGIS, ArcView, openEV, MicroDEM.
Any idea ?


Posted by Paul Cooper on May 5, 2006, 7:03 am

>Hi,
>I have a raster (a DEM) and a polygon shapefile. I want to obtain for
>each polygon the coordinates of the raster cell containing the maximum
>elevation. These coordinates could be either stored as new fields in
>the polygon shapefile (e.g. xmax and ymax) or, even better, as a new
>point shapefile.
>I have ArcGIS, ArcView, openEV, MicroDEM.
>Any idea ?

Zonal Statistics!

Posted by julf on May 5, 2006, 7:22 am
Zonal statistics gives me the maximum value within each polygon, but
not the coordinates of this maximum value... Or maybe I did not use the
right tool ?


Posted by Paul Cooper on May 5, 2006, 11:07 am

>Zonal statistics gives me the maximum value within each polygon, but
>not the coordinates of this maximum value... Or maybe I did not use the
>right tool ?


My fault - I ddn't read your post properly. Zonal statistics will
simply give the maximum value. To get the location, I suppose you
could use CON to select the raster elements with the maximum value,
and then do a raster to point conversion.

Paul

Posted by julf on May 5, 2006, 1:07 pm
Found the solution with ESRI spatial analyst:

1. Convert polygon shapefile to grid with same resolution as DEM, where
grid value inside each polygon corresponds to the maximum altitude
(calculated previously with Hawth tools). Outside polygons, grid value
will be NoData. Let's call this polygon grid "pol_grid"

2. Enter the two lines below in Raster Calculator (of course, you have
to modify the grid names to correspond to your data). The 1st line
combines pol_grid and the DEM with the "con" operator. For each
polygon, only the cells where the value is equal to the DEM value will
be conserved. In the other case, the value -9999 is assigned. The
second line replaces -9999 with the NoData value. The result is a grid
containing only the value of the polygon highest points. Note that a
single polygon can contain several "highest points" of same altitude.
Here is an example of the two lines entered in Raster Calculator:
----------------------------
[temp] = con([DEM] == [pol_grid], [pol_grid], -9999)
[maxValue] = SetNull([temp] == -9999, [temp])
--------------------------