blankblank blank


Archive for the 'DEM' Category Page 3 of 8



Converting Digital Elevation Models To Shapefile/DXF Contours

There are any number of ways to convert a digital elevation model (DEM) to shapefile vector contour lines, but most of the ones I’ve come across have had limitations of one sort or another. The best solution I’ve come across is the free program dem2topo; while it only supports a limited number of DEM formats, it has more flexibility in units and simplification than other methods, and the graphical interface is easy to use (unlike some command-line programs).

The program is written in IDL, an interpreted language, and you’ll have to download and install the IDL Virtual Machine first (free, but a 100 MB download, requires registration, and you may get a sales call). DEM formats supported are Canadian Digital Elevation Data (CDED), and nominally the GeoTiff format, but I’ve had some GeoTiff DEM rejected by the program for unknown reasons. NED GeoTiffs from the USGS Seamless Server work fine, and if you can open your DEM in the program 3DEM (which supports a number of DEM formats) and export it as a GeoTiff DEM from there, those should work with dem2topo as well. Once you’ve loaded your DEM into dem2topo:

11-24-2007-8.02.08 PM11-24-2007-8.03.14 PM12-15-2007-11.09.23 PM

you can choose contour intervals (meters or feet, regardless of what the original units were), the simplification factor (larger simplifies more, but at the cost of detail), whether to close the outer contours, and whether to display the contours as they’re being processed (for faster processing speed, leave these unchecked. More on these options is available in the helpfile.

Once configured, you have the option of converting the DEM into either shapefile contours, DXF contours, or into the .mp format used in creating maps for Garmin GPS units. For the shapefile format, major/intermediate/minor contour intervals are defined in the DBF file by the same hex code used in the .mp format: 0x0020 for minor contours, 0x0021 for intermediate, and 0x0022 for major . Processing speed will depend on the size of the DEM and level of detail, but don’t expect instant results. Converting the above 10-meter DEM to shapefile contours took well over an hour, albeit on my fairly pokey 2.4 GHz system; more memory also speeds up the process. But the results are worth the time; here’s a blow-up of the shapefile contour map of a very small section of this DEM:

contours

A simple process, and if you run into problems, the help file is well done.




Quick Data Gridding With QuikGrid

If you have a set of data points randomly distributed in space, and want to create a basic grid of evenly-spaced set of data points derived from this data (nothing fancy, like curve fitting or Kriging), QuikGrid is blazingly fast at this task. For example, here’s a evenly-spaced set of 625 elevation points (25 x 25) downloaded using the Zonums Terrain app, loaded into QuikGrid and displayed as a set of contours, and coloring representing different heights:

evengrid

For the same area, I also downloaded a set of 625 randomly-selected points, which QuikGrid can automatically grid, contour, and display in a similar fashion, essentially instantaneously:

randomgrid

In some areas, the spacing between random points is too great for QuikGrid’s default distance cutoff tolerance, and it fills in those blanks with data values of zero. But by adjusting the tolerance, it’s possible to fill in some of those gaps:

randomgridplus

Some gaps on the edges, where it has trouble filling in the remaining gaps. Comparing this contour image to the evenly-gridded surface at the top, there are some differences, especially in locations where values changes rapidly. But for a basic approximation, it’s not bad, and offers a quick-and-dirty alternative to more complicated gridding processes.

QuikGrid can also visualize grids in 3-dimensions as well:

3dgrid

Import formats supported by QuikGrid include data triplets with a variety of acceptable inputs for position, including variations on lat/long in degrees/minutes/seconds. If you have decimal lat/long, use the “Input metric data points” option, but be aware that the y-value will be longitude, and the x-value latitude, as in the examples above. It also accepts data point input in DXF and Submetrix format, as well as grid input in ER Mapper Raster, USGS 1-degree DEMs (aka 1:250K DEMs) and QuikGrid’s own grid format. Generated grids can be saved as xyz triplets, Surfer, QuikGrid and ER Mapper formats; you can also export contours and grids in DXF format, and grid surfaces in VRML. There are many other features, including a scripting language, and various display and labeling options.

The helpfile is comprehensive, and well-done, and includes instructions on running the program in Linux under the Wine emulator. The C++ source code is also available, released under the Gnu GPL.




Tabular Terrain Elevation Data

The Zonums Terrain web app lets you define a terrain area, either by coordinates or extent in a Google Maps interface, and then downloads elevation data for that area in tabular format. The points for which elevation is given can be either randomly distributed, or evenly spaced in a cartesian grid. Select the area using the web app form:

terrainapp

With a random distribution, you only have to enter the total number of points; for a grid, enter rows and columns and the program spaces the points evenly. You can enter the limits of the area numerically in the Extent boxes; the app will check to make sure that min is < max (remember that for western longitudes, further west is more negative, which is the lower value). You can also zoom into an area in the Google Maps interface, click on “Take Extent From Map”, and have the extent coordinates filled in automatically based on the displayed area. When you’re done, click on Continue, then click on the “Click here to Start” button that pops up on the Google Maps interface. The points will be generated and plotted one at a time in a Google Maps interface. This may take a while depending on how many points there are, roughly two points per second. Once all the points are plotted…

terrainpoints

… select the separator/delimiter for the tabular data, and the units for elevation, and click “Create Report”. The app will open a new window with the latitude/longitude/elevation data in tabular format, which will have to be copied into another application like a text editor if you want to save it. From there, you can convert it to other formats; for example, if you use a comma as the separator, and save it as a CSV file, you can use a program like MapWindow to convert it to a point shapefile.

The true spatial resolution of the dataset you download will obviously depend on the number of points you select, the area chosen, and the fundamental spatial resolution of the data source. The app gets elevation data from the USGS seamless dataset, and automatically uses the best data available for a specific location. For most of the world, that will usually be the SRTM 90-meter data; for the US, that will usually be NED, with best resolution ranging from 30 meters to as good as 3 meters in some locations. Click on the About button at the top of the App, and then on the “Elevations source” link to get the following table showing the areal bounds for various levels of spatial resolution of the elevation data:

Data Source Extent (West,South, East, North) SRTM Contiguous South America 90-meter (3 arc_second) elevation data -93.0000000022799,-55.9999999977599 to -32.0000000047199,14.9999999993999
SRTM Contiguous North America 90-meter (3 arc_second) elevation data -180.000000005944,10.0000000008001 to 179.999999979387,60.9999999987549
SRTM.C_1TO19_3 -180.000000012589,42.0000000054 to 179.99999997275,60.00000000468
SRTM.C_20TO43_3 -179.000000007803,12.0000000044402 to 169.999999977999,42.0000000032401
SRTM.C_SA_3 -180.000000007038,-55.9999999942731 to 11.99999998515,30.00000000228
SRTM.C_AUS_3 -38.9999999991601,-55.9999999964333 to 179.999999992079,14.0000000007598
SRTM Contiguous U. S. 30-meter (1 arc_second) elevation data -180.0000000144,-15.0000000012 to -64.000000005144,61.00000000488
Tampa Bay Topobathy Meters -82.8750000000039,27.3749999992218 to -82.3750000000017,28.1249999992111
Delaware Bay Topobathy Meters -75.4966666666296,38.7527777768336 to -74.858611111023,39.4458333324399
California Topobathy Meters -124.979166666747,34.9169444435586 to -120.599722222299,38.9499999990807
Puget Sound Topobathy Meters -124.979166666747,34.9169444435586 to -120.599722222299,38.9499999990807
Afghanistan Digital Elevation Model -123.16037037040032,47.043796296291 to -122.1996296295827,48.168055555640194
NED Alaska 2 arc second (15 minute) elevation data -180.00333333334379,50.996666666667622 to -129.99666666663225,72.00333333335108
NED Contiguous U. S. 1 arc second elevation data -125,23.9999999973783 to -65.9983333286253,49.9999999992314
NED Hawaii 1 arc-second elevation data -161.0016666667,17.9983333327742 to -153.998333333366,23.0016666659869
NED Puerto Rico 1 arc-second elevation data -68.0016666666668,16.9983333328051 to -63.9983333330132,19.0016666662453
NED US territories 1 arc-second elevation data (Islands with east longitude) 133.9994444444,4.99944444427556 to 164.000555555645,16.0005555550985
NED US territories 1 arc-second elevation data (Islands with west longitude) -171.000555555605,-15.0005555550877 to -168.999444444485,-13.999444444001
NED Contiguous U. S. 1/3E arc second elevation data -99.00055555556,24.9994444436157 to -65.9994444443037,49.0005555546217
NED Contiguous U. S. 1/3W arc second elevation data -125.00055555557,25.9994444419356 to -98.9994444424024,49.000555554697
NED Hawaii 1/3rd arc-second elevation data -161.00055555563,17.9994444438804 to -153.999444444485,23.0005555548894
NED US territories 1/3rd arc-second elevation data (Islands with east longitude) 133.9994444444,4.99944444427556 to 164.000555555645,16.0005555550985
NED US territories 1/3rd arc-second elevation data (Islands with west longitude) -171.000555555605,-15.0005555550877 to -168.999444444485,-13.999444444001
NED Mount Saint Helens 1/9th arc-second elevation data -123.01299382719976,46.125000000000036 to -121.98700617287425,46.400000000001157
NED Puget Sound 1/9th arc-second elevation data -125.010000000012,46.4899999990561 to -121.489999999997,48.5099999990705
NED Harris City 1/9th arc-second elevation data -95.999999999999957,29.470000000000034 to -94.874999999995126,30.220000000003267
NED Lincoln, NE 1/9th arc-second elevation data -96.886929999156592,40.617497603779 to -96.4858805843566,41.007559363379
NED West Virginia 1/9th arc-second elevation data -83.000185185189991,36.999802029771907 to -79.999820566814307,38.500185185192592



High-Resolution Aerial Photography And DEM Data For Utah

The state of Utah’s Automated Geographic Reference Center (AGRC) has spectacular high-resolution color aerial photography and digital elevation model (DEM) data available for the entire state, with limited areas having even higher spatial resolution.

  • 5-meter DEM data derived from aerial orthophotos is available for the entire state in ASCII ArcGrid (*.asc) format. You can use the FTP site along with statewide index shapefile to determine which files to download, or use the Interactive Map site. You may have to right-click on the file and choose “Save Link (Target) As”, otherwise the ASCII Grid files may open up as text in your browser. MicroDEM can open ASCII ArcGrid files directly (if you get an error message, zip the DEM file, then open the zipped file). Here’s a reflectance image of a 5-meter DEM of the Zion National Park area:

Continue reading ‘High-Resolution Aerial Photography And DEM Data For Utah’




Sun Position During The Day For Any Location

Select a geographic location by continent, country and city, and SunPosition.Info will give you a table of the sun’s azimuth and altitude during the day, as well as a plot of its position in the sky:

sunposition

The stand-alone application MicroDEM can generate similar data, and if you have a digital elevation model (DEM) loaded, can tell you if the sun is blocked by local topography.




US/Global Terrain Shading Data And Landcover Imagery

Tom Patterson is a cartographer with the US National Park Service, and runs the Shaded Relief website, with many articles, tutorials and links related to terrain shading techniques in cartography. But he has also created fantastic terrain and landcover imagery and data, all of which is freely downloadable, license-free and reproducible in any format. These would make great background imagery for national and world maps created using GIS software. Some of the files are very large (well over 100 MB in size), so downloading them may take a while depending on your connection speed.

Continue reading ‘US/Global Terrain Shading Data And Landcover Imagery’




New "Fixed" Versions Of SRTM-90 Data Available

SlashGeo has a post up asking for feedback and info about the various version of SRTM-90 data. SRTM was the Shuttle Radar Topography Mission, an instrument package aboard a 2000 flight of the Endeavour space shuttle that mapped the earth’s topography at a resolution of 30 meters using radar. While one of the most inclusive and comprehensive worldwide topographic datasets, SRTM has a few drawbacks:

  • The original data had many voids, holes and other irregularities
  • The SRTM radar registered buildings and vegetation as terrain, and added their height to the actual terrain height
  • Radar mapping has problems with dry sand (e.g. sand dunes)
  • 30-meter data has only been released for the US; for the rest of the world, the 30-meter data was re-sampled to 90 meters (hence, SRTM-90)

NASA has released SRTM Version 2, a “cleaned-up” version of the original SRTM data with holes and voids filled, and the data irregularities supposedly cleaned up; this data is available from the USGS Seamless Server. There are still problems with this cleaned data, like the mountain I viewed in Mexico that had a hole in its summit that went all the way down to sea level. I’ve been using my own version of SRTM-90, with holes in the original data patched using GTOPO30 data. But since GTOPO30 data has a resolution of 1 km, my solution was less than ideal.

The SlashGeo post and comments mention two attractive-sounding alternative versions of SRTM-90 data:

  • The CGIAR Consortium For Spatial Information has released Version 3 of their cleaned-up SRTM-90 data, using contour interpolation and alternate data sources to fix voids and holes. I looked at CGIAR’s Version 2 before, and wasn’t satisfied with it. I’ve taken a cursory look at some of their Version 3 compared to NASA’s Version 2, and while the CGIAR data still isn’t perfect, it looks better than the NASA Version 2 data (and also better than my patched data). But be prepared to have the downloads timeout on you, as happened to me on multiple occasions on the main site (haven’t tried the mirror download sites yet). There’s also a Google Earth file that offers a more convenient interface for viewing and downloading the data.
  • The USGS has developed their own “cleaned-up” version of the SRTM-90 data for use with the WWF’s HydroSHEDs program. Haven’t looked at these yet, but more information and download links are available from their website (I wasn’t able to successfully download any data – curse you, ArcIMS). Also, data is currently only available for Central and South America, a small part of the US, and parts of Asia and Oceania.



Free 10-Meter UTM SDTS 24K DEMs

Among the highest quality DEM data you can get to go with a standard USGS 1:24K topo map is 10-meter SDTS DEM data, with heights specified to the nearest 0.1 meters (though the altitude accuracy of the DEM likely doesn’t warrant that resolution). I find it superior to the 10-meter NED data provided by the USGS Seamless Server, with fewer artifacts, although the SDTS format isn’t as well-supported as the DEM formats available at the Seamless Server. The SDTS DEMs are also in UTM NAD27, same as typical for USGS topo maps, versus the geographic projection for Seamless Server DEMs. There are a fair number of pay sites on the Web that offer these SDTS DEM files for a price, but there is one website where you can download them for free.

The GIS Data Depot has gone through some changes over the years, but is still around. It offers not just SDTS DEMs but a host of other GIS data, some free, other not free (you can often find the paid data for free elsewhere on the web). Data is classified as “statewide” or “countywide”, and you’ll find the SDTS DEMs in the “countywide” sections, listed in the Digital Elevation Models (DEM) – 24K section under the 1:24K topo map name whose area they cover (offered in both 10-meter and 30-meter resolutions) . The catch with the free “Normal” downloads is that they are at slower speeds than the paid “Premium” download (appears to be roughly 10 kilobytes per second or so).