Create a frequency plot for raster elevation values with in a polygon

2697
11
10-05-2017 08:45 AM
DavisTolman
New Contributor III

I have a lidar DEM model of the Houston area floodplain with polygons representing areas protected by levees.  I would like analyze the elevation within each levee by sampling the elevation values within the polygons and representing them as a histogram or frequency plot.  Ideally, the x axis would be binned elevation and the y axis would be the frequency (count).  

I've tried the Sample Tool from the spatial analyst toolset, but instead of obtaining the elevation values, I seem to be getting a number between 1 and 256 (...the display value?)

0 Kudos
11 Replies
DanPatterson_Retired
MVP Emeritus

are you sure it was the dem values that were being sampled and not a reclassed version of it?

Check... this link ...to see the format of the table you should have received

0 Kudos
DavisTolman
New Contributor III

Thanks for responding.  Actually I did try Sample.... but but I'm wanting to compile All of the elevation points within a polygon.  What I'm trying to do is to represent the dem elevation values within a polygon in 2-dimensions.  Sample is fine for points but I'm looking to represent area in an "elevation histogram" or frequency plot.  Any suggestions on what tool to use for this? 

0 Kudos
DanPatterson_Retired
MVP Emeritus

oh.. I normally extract the area of the raster that I am interested in, convert it to a numpy array (RasterToNumPyArray in arcpy.da module), then use python/numpy and matplotlib to do graphing.  Their graphing tools and handling of raster data for graphing purposes is much easier to use (example of producing a histogram here )

0 Kudos
DavisTolman
New Contributor III

Thanks,  Python and Matlab are both tools that I would like to learn someday.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Could you include a sreenshot of the raster in the TOC? If the data is stored in a Mosaic dataset and if it has a certain renderer defined by default (raster function) you may be looking at the values of the 1st band of the visualization and not the actual elevation values. 

0 Kudos
DavisTolman
New Contributor III

Is this helpful?

0 Kudos
XanderBakker
Esri Esteemed Contributor

Yes it is, but can you expand the "Statistics"part?

0 Kudos
DavisTolman
New Contributor III

No statistics have been calculated... do I need to do this?

0 Kudos
DanPatterson_Retired
MVP Emeritus

if you want to see the statistics, you can either calculate them when you bring them in or afterwards using

http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/build-pyramids-and-statisti...