Wiki

Clone wiki

BaristaSource / UserGuide / ImportDEM

Import DEM

Import DEM has two import options for DEM data. Multiple DEM files in a format supported by Barista should be imported as Formatted DEM File(s). Other files might be imported via the Unformatted DEM File option.

Grafik

Menu Import DEM

Import Formatted DEM data

Barista supports different DEM formats provided as ASCII-, binary- and image files. Formats supported by the GDAL library, ASCII and binary files from Surfer (Golden Software) as well as the Barista DEM files can readily be imported. Due to the use of the GDAL library (see www.gdal.org/) a whole range of different formats can be imported. Information about the different formats supported by GDAL can be found on www.gdal.org/formats_list.html.

The dialog for the import of formatted DEMs allows to set a sigma Z, the DEM's no data value, a scale and an offset. The no data value can usually be read automatically from the files. The default value for the scale is 1.0, for the offset it is 0.0. A global sigma Z for DEMs can be set, its default value 0.5. During the import *.hug-files are created for every imported DEM. Barista's no data value for DEMs is -9999, therefore a height value of -9999 indicates that no height value is available for the respective planimetric position. Only files with georeferencing information (integrated and/or provided as separate file) can be imported with this dialog.

Grafik

Import formatted DEMs Dialog

The supported DEM formats which can be imported in Barista are listed below, in any case, the DEM will be imported as a single precision image file.

  1. GDAL DEM Files: These are DEM files which are provided as georeferenced image files as well as ARC/INFO, ESRI, GTOPO30, SRTM30 and SRTM90 data. The used file extensions are .tif, .jpg, .adf, .grd, .DEM with an asscociated .hdr-file. Binary ARC/INFO files are often organized in their own data set folder containing several files. The files to be imported have the file extension .adf. There might be several .adf-files in one folder, where probably only one of them actually contains the DEM data and the other files only "point" to the DEM data file. From the file sizes it should be possible to figure out which of the files contain the DEM data, but any of the .adf-files can be imported, and a .hug-file according to the selected file name will be created. For details about the Binary ARC/INFO format see http://home.gdal.org/projects/aigrid/aigrid_format.html.

  2. Surfer DEM Files: These are ASCII or binary DEM files which are provided in data formats used by Surfer, Golden Software. The used file extension is *.grd.

    1. Surfer ASCII format: The header start with the code DSAA, followed by a line describing the number of rows and columns. Followed by three lines for minimum and maximum values for X, Y, Z

DSAA
1071 1453
508150.8354 532761.5308
5239107.586 5272493.971
-138.25022468479 1263.3960095946

This header is followed by the rows*columns values for the grid heights.

2. **Surfer Binary formats**: There are currently two type of Surfer binary files supported by Barista, Surfer format 6 and 7. Files of the format 6 start with DSBB, those of format 7 start with DSRB.

More information about Surfer is available under http://www.goldensoftware.com/products/surfer/surfer.shtml.

  1. ASCII DEM format: The DEM is contained in an ASCII file.

    1. Grid format: This is a a simple format consisting of a header and the actual height grid. The header consists of the following lines:

Number of rows (Nr)
Number of columns (Nc)
Grid point spacing in X
Grid point spacing in Y
X of the lower left grid point
Y of the lower left grid point

This header is followed by the actual grid heights. There have to be exactly Nr lines in the file, and each line has to contain exactly Nc height values. Note that the X and Y coordinates of the upper left grid point and the grid point spacings in X and Y have to be given in the same units, e.g. [m]. Using the Formatted Import the lines of the height values in the file have to be in top- to-bottom order (top line first), to flip the DEM contains vertically use the Unformatted Import, which offers bottom-to-top option for the import.

In most cases the reference information of the DEM data will be incomplete and can be set during the import. DEMs in WGS84 Geographic, WGS84 Geocentric, UTM, TM and Local system can be imported. In the case of UTM coordinates the hemisphere and the zone have to be specified during the import. In the case of TM coordinates, the central meridian and the latitude of origin, the scale at the central meridian, and the TM coordinates of the origin (Easting, Northing) have to be specified during the import.

Import unformatted DEM data

DEM in unrecognizable or not supported format might be imported via the function Unformatted DEM File, which opens a dialog to import unformatted data as DEM. The user will at least have to specify if the file to be imported is stored in ASCII or binary.

Grafik

Import unformatted DEM Dialog

  1. XYZ Format: This type of file is basically a gridded 3D point list, where each line contains one grid point in the format X Y Z. No header must be provided. This import function has not yet been optimised. This type of file must have the file extensions *.xyz and the import will generate a converted ASCII DEM in the Barista format first, which eventually will be imported.

  2. Binary data: The import of binary data requires the specification of different parameters for the import. The import will only be possible if the specified settings match with the file size. SRTM files with the extension *.hgt can be imported via this dialog, size setting, georeferencing information, data depth etc. has to be set accordingly, the providers of this type of data might also supply a documentation of their data. Barista tries to guess some of the parameters from file size and by assuming square DEM extensions and different data depth, which should be checked by the user prior import.

After the import of the DEM is finished, a DEM node icon will be created and added under the thumbnail view. Functions which can be performed from a thumbnail view DEM node are described in the section Barista thumbnail view.

A DEM node will be represented with the following icon Inline Graphik.

Back to File Menu

Updated