Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have my elevation data but can't make an attribute table from it and so I'm not sure how to get any of that data into a table in order to make a hypsometric curve. Please help.

share|improve this question

3 Answers

The raster is stored in floating point format as individual values in each cell; therefore it has no attribute table. An effective solution is to discretize the values and convert them to integer format. This creates an attribute table which, when plotted, will yield a histogram. Its cumulative sums are the hypsometric curve.

DEM in relief

The appearance of the hypsometric curve (in CDF form) for this sample DEM (a portion of Illinois available at http://exampledata.wolfram.com/ArcGRID.zip) varies with the fineness of the value discretization. The following images use bins of 5, 1, and 1/5 meters, respectively. As you can see, one can obtain a precise curve using moderately coarse bins.

Hypsometric curves

Discretizing a grid involves two operations which can be done in one step: divide by the bin width and truncate (or round, if you prefer). For example, elevations in meters can be discretized into 0.1 meter increments via division by 0.1 followed by truncation, as in

Int( [elevation] / 0.1 )

This syntax, or something quite close to it, would be used in almost any version of ArcGIS (and in many other raster GISes as well).

share|improve this answer
If elevations can be both positive and negative, see whether your version of ArcGIS supports a Floor function, because some Int implementations truncate towards 0 rather than downward, which would double the width of the bin containing 0 (an undesirable result). – whuber Oct 18 '11 at 16:18
Programmatically the histogram can be accessed from IRasterBand.Histogram. Would running this histogram through an accumulation process be valid? The histogram is typically generated based on a specified sampling rate. – Kirk Kuykendall Oct 18 '11 at 22:28
@Kirk That's a good idea, but my experience with ESRI software and statistical calculations leads me to mistrust it. Where's the detailed documentation? E.g., exactly what kind of sampling procedure is used? Where's the evidence that it gets the right result? And if there is such evidence--say, through extensive user testing and reverse-engineering--we have to throw it all away and start over with the very next software patch. – whuber Oct 18 '11 at 22:42
1  
Well, I was going to suggest plugging in your own IBinFunction2, but I see it says "This interface is not intended to use by outside developers." Oh well. – Kirk Kuykendall Oct 19 '11 at 2:29

I normally use R for this. You can read GDAL raster data sets using rgdal (from CRAN), then build an empirical cumulative distribution for the elevation values using ecdf (built-in).

For example, I have my DEM in a GeoTIFF file, in R use:

library(rgdal)
topo <- readGDAL("mytoporaster.tif")
plot(ecdf(topo$band1), main="Hypsometric curve", xlab="Elevation (m)")

hypsometric curve

share|improve this answer
+1 Good solution. You can analyze that curve (extensively) in R, too. – whuber Oct 18 '11 at 22:43

hypsometric curve

Also see the tutorial at Carleton.

share|improve this answer
This illustration reminds us there are (at least) three different ideas of "hypsometric curve." According to Wikipedia it is an empirical CDF of elevations. According to this illustration, it is the complementary CDF. And according to other references, it is a histogram (empirical PDF). – whuber Oct 18 '11 at 17:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.