SurGe conversion utilities
 



.                                                                       

The purpose of this package is to provide command line utilities for conversion between commonly used map formats and map objects used in the SurGe software. Up to now there are three utilities:
DEMGRD.EXE Conversion from 7.5-minute DEM file to ASCII GRD file and ASCII basic input data file.
GRSGRD.EXE Conversion from GRASS grid file to ASCII GRD file and ASCII basic input data file.
ARCGRD.EXE Conversion from ArcGIS grid file to ASCII GRD file and ASCII basic input data file.
SHPDAT.EXE Conversion from ESRI Shapefile format to SurGe data objects.

It is supposed, the package will extend to other map file formats according to users demands (of course, if there is a complete description of the map file format).

Download

SurGe conversion utilities can be downloaded from
http://mujweb.cz/www/SurGe/SGutil.zip
or
http://www.geocities.com/miroslavdressler/SGutil.zip

DEMGRD

Command line syntax:  DEMGRD name_of_DEM_file suffix

Command line example:
C:\DEMFILES>DEMGRD MSH.DEM a
Enter resolution (minimal is 1): 2

MSH.DEM is the name of DEM file
a       is the suffix

This command reads DEM file MSH.DEM and creates files MSH.GRa (grid in ASCII format) and MSH.DTa (basic input data).
7.5-minute DEM file contains grid file, where size of grid block is 30x30 metres. Number of grid nodes is usually greater than 300000 - that is why DEMGRD asks for "resolution". In our example the resolution is 2, which means, each second node in x and y direction is written in MSH.DTa file. If, for example, the resolution is 3, then every third node is written and so on.
File MSH.DTa can be used as a basic input file for SurGe. Grid file MSH.GRa can be imported into SurGe using the menu item "File / Read grid from ASCII file".

GRSGRD

Command line syntax:  GRSGRD name_of_GRASS_file suffix

Command line example:
C:\DEMFILES>GRSGRD SFACE.TXT a
Enter resolution (minimal is 1): 2

SFACE.TXT is the name of GRASS ASCII grid file
a         is the suffix

This command reads GRASS grid file SFACE.TXT and creates files SFACE.GRa (grid in ASCII format) and SFACE.DTa (basic input data).
Number of grid nodes can be greater than 300000 - that is why GRSGRD asks for "resolution". In our example the resolution is 2, which means, each second node in x and y direction is written in SFACE.DTa file. If, for example, the resolution is 3, then every third node is written and so on.
File SFACE.DTa can be used as a basic input file for SurGe. Grid file SFACE.GRa can be imported into SurGe using the menu item "File / Read grid from ASCII file".

ARCGRD

Command line syntax:  ARCGRD name_of_ArcGIS_file suffix

Command line example:
C:\DEMFILES>ARCGRD SFACE.GRD a
Enter resolution (minimal is 1): 2

SFACE.GRD is the name of ArcGIS ASCII grid file
a         is the suffix

This command reads ArcGIS grid file SFACE.GRD and creates files SFACE.GRa (grid in ASCII format) and SFACE.DTa (basic input data).
Number of grid nodes can be greater than 300000 - that is why GRSGRD asks for "resolution". In our example the resolution is 2, which means, each second node in x and y direction is written in SFACE.DTa file. If, for example, the resolution is 3, then every third node is written and so on.
File SFACE.DTa can be used as a basic input file for SurGe. Grid file SFACE.GRa can be imported into SurGe using the menu item "File / Read grid from ASCII file".

SHPDAT

Command line syntax:   SHPDAT name_of_Shapefile name_of_SurGe_file [a]

Command line example:
C:\SHAPEFILES>SHPDAT SHXYZ.SHP SHXYZ.DTa

SHXYZ.SHP is the name of Shapefile
SHXYZ.DTa is the name of SurGe basic input file.

This command reads X,Y and Z coordinates contained in the binary file SHXYZ.SHP and writes them in the ASCII file SHXYZ.DTa, which can be used as a basic input file for SurGe.
SHPDAT can convert not only points, but also boundaries, faults or polylines - it depends of type of shape in the Shapefile (see ESRI Shapefile Technical Description). The following types can be converted:
Type of Shapefile Content SurGe object
PointZ (type 11) X, Y and Z coordinates of points points XYZ (DTs) or
added points (DBs)
Polyline (type 3) or
Polygon (type 5)
X and Y coordinates of polyline(s) boundary (HR) or
faults (ZL)
PolylineZ (type 13) or  
PolygonZ (type 15)
X, Y and Z coordinates of polyline(s) spatial polylines (LNs)

If, for example, boundary is stored in two or more Shapefiles, parameter a can be used to create single SurGe boundary file:
C:\SHAPEFILES>SHPDAT SHBOUND1.SHP SHBOUND.HR
C:\SHAPEFILES>SHPDAT SHBOUND2.SHP SHBOUND.HR a

SHPDAT distinguishes between boundary and faults according to used extension in the output file name (HR or ZL) and creates appropriate data format. 


Return to main page.