Digital elevation model: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
Line 202: Line 202:


Get a data file from CGIAR-CSI. The earth is divided into squares.
Get a data file from CGIAR-CSI. The earth is divided into squares.
[[File:SRTM_Data_Search_-_2017-03-03_11.49.33.png|thumb|800px|SRTM Data Search allows to identify squares that you then can dowload]]
[[File:SRTM_Data_Search_-_2017-03-03_11.49.33.png|thumb|none|800px|SRTM Data Search allows to identify squares that you then can dowload]]
* Either use the website where you can select the squares (see figure above)
* Either use the website where you can select the squares (see figure above)
* Or write down the square number and change the URL below. 38_03 represents parts of Western Switzerland, French Haut-Savoie etc. (are where University of Geneva is located)
* Or write down the square number and change the URL below. 38_03 represents parts of Western Switzerland, French Haut-Savoie etc. (are where University of Geneva is located)
Line 239: Line 239:


Here is the result as seen in Meshlab:
Here is the result as seen in Meshlab:
[[File:geneva-area-600x600.png|thumb|800px|Geneva terrain model made with [ hills] and [ SRTM data]]
[[File:geneva-area-600x600.png|thumb|none|800px|Geneva terrain model made with [ hills] and [ SRTM data]]


== Bibliography, links and footnotes ==
== Bibliography, links and footnotes ==

Revision as of 14:56, 3 March 2017

Draft

“A digital elevation model (DEM) is a digital representation of ground surface topography or terrain. It is also widely known as a digital terrain model(DTM). A DEM can be represented as a raster (a grid of squares) or as a triangular irregular network.” (Wikipedia, retrieved 17:39, 12 May 2010 (UTC)).

A digital surface model (DSM) on the other hand includes buildings, vegetation, and roads, as well as natural terrain features. The DEM provides a so-called bare-earth model, devoid of landscape features. While a DSM may be useful for landscape modeling, city modeling and visualization applications, a DEM is often required for flood or drainage modeling, land-use studies, geological applications, and much more. (Wikipedia, retrieved 17:39, 12 May 2010 (UTC)).

Models and file Formats

Both digital elevation and surface models can either be represented as raster or vector graphics.

  • Raster data can present either just images (as in any image format like *.jpg*) or include specific data about a cell.
  • Vector data either can be points (locations), lines or polylines (e.g. for topographics lines or roads), or polygons.

“Additional non-spatial data can also be stored along with the spatial data represented by the coordinates of a vector geometry or the position of a raster cell. In vector data, the additional data contains attributes of the feature. For example, a forest inventory polygon may also have an identifier value and information about tree species. In raster data the cell value can store attribute information, but it can also be used as an identifier that can relate to records in another table.” (Wikipedia, retrieved 17:39, 12 May 2010 (UTC)).

Digital elevation models

USGS DEM
“The USGS DEM standard is a geospatial file format developed by the United States Geological Survey for storing a raster-based digital elevation model. It is an open standard, and is used throughout the world. It has been superseded by the USGS's own SDTS format but the format remains popular due to large numbers of legacy files, self-containment, relatively simple field structure and broad, mature software support.” (Wikipedia, retrieved 17:39, 12 May 2010 (UTC))
SDTS

“The The Spatial Data Transfer Standard (SDTS) is a robust way of transferring earth-referenced spatial data between dissimilar computer systems with the potential for no information loss. It is a transfer standard that embraces the philosophy of self-contained transfers, i.e. spatial data, attribute, georeferencing, data quality report, data dictionary, and other supporting metadata all included in the transfer.” (USGS, retrieved 17:39, 12 May 2010 (UTC))

DTED

“DTED (or Digital Terrain Elevation Data) is a standard of digital datasets which consists of a matrix of terrain elevation values. This standard was originally developed in the 1970s to support aircraft radar simulation and prediction.” (DTED (Wikipedia, retrieved 17:39, 12 May 2010 (UTC))

Other/combined models

SRTM
“The Shuttle Radar Topography Mission (SRTM) is a partnership between NASA and the National Geospatial-Intelligence Agency (NGA). Flown aboard the NASA Space Shuttle Endeavour (11-22 February 2000), SRTM fulfilled its mission to map the world in three dimensions.” (EORS.usgs.gov)
Advanced Spaceborne Thermal Emission and Reflection Radiometer

General pupose 3D formats

Available terrain maps

STRM

The Shuttle Radar Topography Mission (SRTM) Maps.

Download links:

GTOPO30

GTOPO30 is a global digital elevation model (DEM) of the whole world with a horizontal grid spacing of 30 arc seconds (approximately 1 kilometer). GTOPO30 was derived from several raster and vector sources of topographic information.

Download links:

Links

Overviews

Visualization and GIS

(these are related subjects)

Overviews and indexes of File formats

Actors

Online maps to look at

(some can show relief).

  • Maps-For-Free.com. Allows to display various Layers on either satellite, terrain, relief or OSM view. Allows to take a picture (jpg).
  • GloVis (USGS Global Visualization) is an online search and order tool for selected satellite data. It includes
  • WIST (Warehouse Inventory Search Tool) is a web-based client to search and order earth science data from various NASA and affiliated centers, e.g. GloVis.
  • MRTWeb combines familiar capabilities of the USGS Global Visualization Viewer (GloVis) and the downloadable MODIS Reprojection Tool (MRT)

Software

Viewing
  • TerraLook (Wikipedia) a free satellite image viewing tool, developed by Sujoy Chaudhuri of Ecollage, India.
  • Google Earth (Wikipedia)
Multipurpose
  • ArcGIS (Wikipedia) Commercial group of geographic information system (GIS) software products produced by ESRI.

To sort out


Printing elevation models

The outline of the workflow is the following:

  1. Get a model
  2. Translate it to STL (this may need passing through an intermediary format)
  3. Make the model manyfolded with a flat bottom
  4. Slice and print it

Creating STL from elevation maps with gdal and phstl.py

Installation under Ubuntu 16x

Install the gdal library

sudo apt-get install libgdal-dev
sudo apt-get install gdal-bin

Test if something is there:

ogrinfo

Install the python interface (?)

sudo apt-get install python-gdal

Install the gdal python library

sudo easy_install gdal

Download the phstl.py script

git clone https://github.com/anoved/phstl.git

Copy the script to some place that is in the PATH,e .g. ~/bin or /usr/local/bin

Transforming a geoTIFF to STL

Get an example file, e.g. from CGIAR-CSI[1] that provide elevation models for the whole world.

You can select a square in an area of interest. However this will create huge files. Most of Sicily sits in a square that is represented by a 72 GB tiff file. Translated this produced a 565 GB (!) STL File, which will be very difficult to handle.

Transform the tif into a non printable STL with phstl.py

Example:

phstl.py srtm_39_05.tif sicily.stl

Since the STL was too huge I did not pursue this. Maybe cropping the tif file before translating could be a solution, but which program can do it without deleting the height information data ?

Using Terrain2STL

Terrain2STL is an online service that allows selecting a square on Google maps. From the coordinates it then will extract a region from the Nasa/cgiar-csi data and produce the STL. Quote: “Terrain2STL is a free-to-use service, but if you want to help support the site, donations are welcome. Terrain2STL creates STL files using the SRTM3 dataset from 2000, which has a resolution of about 90 meters on the equator.” (Terrain2STL home page, feb 2017)

It only will need some cropping and a little repair, e.g. something that Netfabb Studio can handle very well.

I tested this service and it works really well, e.g. I printed the Teide and Caldera Blanca volcanoes. The only caveat is the 90m resolution of the SRTM3 data set. The Caldera Blanca is a small 300m mountain on Lanzarote and did not come out in a very interesting way. The Teide (including the old huge caldera) created a fine enough model.

Hills

Hills is another package that can generate 3D models of areas in STL format of the earth's surface using SRTM 90m elevation data from CGIAR-CSI w(see http://srtm.csi.cgiar.org/).

This command line tool is programmed in Haskel and requires some installation. It's advantage with respect to phstl.py is that it can directly extract the right squares before doing the STL translation.

Installation under Ubuntu

To install Haskel and cabal

sudo apt install cabal-install

To install hills:

cabal update
cabal install hills

I found the program in ~/.cabal/bin/ so you might add this to your path:

  • Edit ~/.bashrc
  • Prepend /home/your_login/.cabal/bin to :$PATH, e.g.
export PATH=/home/_____/.cabal/bin:$PATH

Using hills

Get a data file from CGIAR-CSI. The earth is divided into squares.

SRTM Data Search allows to identify squares that you then can dowload
  • Either use the website where you can select the squares (see figure above)
  • Or write down the square number and change the URL below. 38_03 represents parts of Western Switzerland, French Haut-Savoie etc. (are where University of Geneva is located)
wget http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_v41/SRTM_Data_ArcASCII/srtm_38_03.zip
unzip srtm_36_01.zip

You now should have the following 150 GB file

150147952 Nov 24  2008 srtm_38_03.asc

From there you can extract rectangles that will be translated to STL models. You need the following information:

Get center coordinates

  • Coordinates of the center, defined as decimal latitudes and longitudes. North of the equator is positive, south is negative. East from Greenwich is positive, west is negative. A good trick is to ask Google. E.g. longitude Geneva gives:
46.2044° N, 6.1432° E

Exactly what we need to extract terrain around geneva. If you cannot retrieve this directly from google search, you could use google maps or google earth and then click on a point. E.g. my building is around:

46.194644, 6.140955

Define rectangle size

  • Hill requires an area in arcseconds, latitude first. Default values are 300x600. An arcsecond is 1/3600 of a degree and roughly represents 30 meters (it depends where you are). Therefore:
1km = 33

10km = 330

Since any decent STL tool allows you to cut way slides, you do not need to be very precise. Better take 50% extra terrain.

Define elevation

  • By default, the model will start a sea level. Again you easily could cut this way. But you may consider giving a height. Again, you simply can ask goole, e.g. elevation geneva. Add enough height to cover the lowest point.

Example using the three paramaters. By default hills will look at all the *.asc files that sit in the same directory.

hills --position 46.194,6.140 --dimensions 600x600 --base-altitude 300 --scale 1000 geneva.stl

generating for

 46-6-36N 6-3-24E to 46-16-39N 6-13-24E
 603 arcsec N/S x 600 arcsec E/W
 18.618km N/S x 12.865km E/W

Here is the result as seen in Meshlab:

Geneva terrain model made with [ hills] and [ SRTM data

Bibliography, links and footnotes

  1. Quote: "The CGIAR is a global partnership dedicated to reducing rural poverty, increasing food security, improving human health and nutrition, and ensuring more sustainable management of natural resources. The Consortium for Spatial Information, CSI, is the CGIAR community of geo-spatial scientists that promotes and practices the application of spatial science to achieving these goals most effectively." http://www.cgiar-csi.org/ Feb 2017