Support for other map formats
 



.                                                                       

Surge supports the following commonly used map formats:

Conversion command line utilities

GRIDCONV

GRIDCONV.EXE is a standalone command line utility, which is also utilized for import of grid files into SurGe and SurView (see How to import other map/GIS grid formats in SurGe Tutorial).

Command line syntax:
GRIDCONV BD IF OF file_name suffix
,  where:

BD = D means that basic data file will be created
BD = N
means that basic data file will not be created

IF ... input data format:
D = DEM
G = GRASS
R = ArcGis
A = Surfer ASCII
S = SurGe

OF ... output data format:
G = GRASS
R = ArcGis
A = Surfer ASCII
S = SurGe

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

This command reads the 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 a grid file, where size of grid block is 30x30 metres. The number of grid nodes can be greater than 5000000 (the maximal number of input points for SurGe) - that is why GRIDCONV asks for "resolution". In our example the resolution is 2, which means, each second node in x and y direction is written in the MSH.DTa file. If, for example, the resolution is 3, then every third node is written and so on.
The file MSH.DTa can be used as a basic input file for SurGe. The grid file MSH.GRa can be imported into SurGe using the menu item "File / Read grid from ASCII file".

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

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.