blankblank blank

Get DEM Elevations For A List Of Points

YP asks:

…would you know an easy (and free) way to query a DEM (Digital Elevation Model) to get elevations for a list of points (potentially as many as a few thousand)

Well, I know one way to do it with free software:

1. First, if it’s not already in shapefile format, you need to convert the list of points into a point shapefile. You can do this by converting the list into a CSV (comma-separated-value) file with a spreadsheet program like OpenOffice, then using the CSV to shapefile converter in MapWindow to convert this data to point shapefile format.

2. Next, if it’s not in latitude/longitude/WGS84 coordinates/datum, convert the point shapefile to that coordinate system; you can do that with MapWindow as well. Make a copy of it, and put it in a safe place. Addendum: Peter Guth, author of MicroDEM, comments that you can import a CSV file directly into DBF format in MicroDEM, as long as it’s already in lat/long/WGS84; see the help file to see the specific format requirements for the CSV file.

3. Open your DEM in the freeware GIS MicroDEM (covered many times before on this blog).

4. Check the Database tab in the Options section to make sure that under “GIS Edits”, “Option to allow” or “Always allowed” is selected.

5. Click on the DB button at the top of the DEM display window, and select the DBF file associated with the point shapefile created in step 2; the points in this shapefile will be plotted on the DEM:

3-30-2009-7.54.00 PM

And the DBF file will open in a separate window:

3-30-2009-7.55.46 PM

Note: MicroDEM automatically adds coordinate fields and coordinate data to the shapefile’s DBF file.

6. If unchecked, check the “Edit” box to enable the “Edit” button.

7. Click on the “Edit” button, and from the dropdown menu, select “Add elevation from DEM”:

3-30-2009-8.00.03 PM

The DBF file will update with a new field called “Z”, the elevation at that point derived from the DEM, with the same units as the DEM (meters in this case):

3-30-2009-8.02.52 PM

As a bonus, you can also get the steepest slope at that point by using the “Add slope from DEM” function:

3-30-2009-8.04.39 PM

8. If you need this data back in text format, you can open the DBF file directly in OpenOffice, then export it into a text file; you could also use the program Shape2Text to convert it directly to a text format. From the comments: If needed, you can export this data directly from MicroDEM into spreadsheet-friendly CSV format by clicking the “Report” button on the DBF toolbar, and choosing CSV as the export option; other export options include HTML, KML and point shapefile.

Looking for something else? Enter some keywords below, then click "Search".    

4 Responses to “Get DEM Elevations For A List Of Points”

  1. 1 Peter Guth

    I think you can do almost all of this in MICRODEM.

    The program will read a CSV file and create a dBase table, and the report option provides several export options for the dBase table.

    The datum shift if also possible, though it might not be as easy as the other two.

  2. 2 Yannick

    Thanks a lot! It works great.
    I’ve tried to load csv directly from MicroDEM and it works perfectly (saves some time) and it also exports the data pretty well.

  3. 3 mike

    It might work but the numbers you get depend entirely on the DEM, just tried the default DEM that comes with MicroDEM and they are way off for the locations I tried (e.g. 2000m instead of 1300m) so you still have to be careful.

  4. 4 mk

    I’ve come across a few web services that provide elevation data,
    though 1,000 points might be a stretch. See

Comments are currently closed; feel free to contact me with questions/issues.