This is an old version of LandSerf. For the latest release please visit

Chapter 2. Getting Data In and Out of LandSerf

LandSerf uses its own platform independent compressed file format for storing surface models. Opening and saving of files in this format is achieved via the File->Open and File->Save menu items or the button and button buttons respectively. When saving a file to disk, it is the primary raster map or primary vector map that is output.

Import and export of files to and from LandSerf can be in a range of formats. See file formats used by LandSerf for more details. You may also wish to view some guidelines on importing elevation models to help with this process.

The file format for both importing and exporting data is selected from the File dialogue in the Files of type: drop-down menu. When typing the name of a file to save, the name with file extension should be typed (e.g. dem.srf, rivers.vec etc.). In some cases, the type of file extension will determine the precise format of the output file (e.g. image files can have the extension .jpg, .gif or .png; VRML files can will be uncompressed if given the extensions .wrl or .vrml, but compressed if given the extension .wrz).

File type selection File type selection.

Any number of raster or vector maps may be imported into LandSerf, limited only by the memory capacity of the machine running the software. Multiple files of a given type can be imported in a single operation by shift-selecting a range of files in the file chooser. Maps for processing or display can be selected by clicking on the relevant thumbnail image on the left-hand side of the LandSerf window.

2.1 GIS Files

LandSerf can import and export rasters as ArcGIS ASCII or binary (BIL) files. Even if you do not have access to ArcGIS or ArcView, you may find these facilities useful for sharing data. ArcGIS vector files can also be imported as shapefiles or ASCII 'generate' vector coverages, and exported as as ASCII 'generate' vectors and attribute tables.

If you have access to the GIS GRASS, both rasters and vectors may be exported using the GRASS modules r.out.ascii and v.out.ascii. These files may be read directly into LandSerf. Note that to import vector attributes as well as geometry, you will need the relevant file from GRASS' dig_att file in addition to the output produced by v.out.ascii.

If you have access to the landscape visualisation software Terragen or VistaPro or the you can import and export rasters directly to and from LandSerf. To export from VistaPro, choose the finest polygon resolution (1), and select Save ASCII Z from the Save menu. To export or import files to or from Terragen, rasters are scaled to the nearest 'power of 2 plus 1' (e.g. 257x257, 513x513, 1025x1025) pixels by adding a padding border of zero values where necessary.

Ordnance Survey Raster DEMs at both 10m ('Profile data) and 50m ('Panorama' data) resolutions may be read using the Ordnance Survey NTF raster DEM format. Ordnance Survey vector data (e.g. LandLine, Strategi, Meridian and MasterMap) can also be imported using either the Ordnance Survey NTF vector file or Ordnance Survey MasterMap formats. On import of vector data with multiple attributes, you are presented with the option of importing only a subset of these attributes (see figure below). Once imported, data are stored in LandSerf's own attribute table that may be edited later.

Ordnance Survey attribute selection Ordnance Survey attribute selection.

Most elevation data from the US Geological Survey (USGS) are now distributed in one of the ArcGIS raster formats. However, some are still distributed in 'Native DEM' format. These data tiled to either 1 degree or 7.5 minutes can be imported directly by selecting the USGS Native DEM format.

Image data such as areal photos, rasterized scanned maps and remotely sensed images can be imported directly using the image format selector. Formats available for import include GIF, JPEG, PNG, TIFF and GeoTIFF (LZW compression not yet supported). Georeferencing information may be stored in a 'world' file sharing the same name as the image, but with a modified extension name as indicated below:

Image name World file name

To import other raster text files, use the Generic text raster format option. Files in this format consist of text of nrows rows running North to South, with each row consisting of ncols columns of whitespace separated z-values. These numbers may be integer or real. There should be no header information associated with the file, although lines starting with a # symbol may be used as comments and are ignored. Note that to import ASCII data that run row-wise from South to North use the VistaPro raster format instead. To import text rasters stored column-wise from South to North, select the EDX format.

The Shuttle Radar Topography Mission provides freely available elevation data for most of the globe. These are available at a 3 arc-second resolution, which corresponds to about 90m in an East-West direction at the equator and approaching 50m for northern Europe. An SRTM 'hgt' file can be imported into LandSerf by selecting the SRTM format from the file dialogue window. Once imported you will probably want to remove any voids from the surface by selecting the Transform->Void removal menu item. After removal, the surface can be reprojected to a more useful coordinate system by selecting the appropriate option from the Transform->Reproject menu.

Other freely available global elevation data including GTOPO30, SRTM30Plus and ETOPO2 bathymetry can also be directly imported into LandSerf by selecting the appropriate file format.

If you wish to share data with software (or data) that use (x,y,z) coordinate triplets to locate elevation values (e.g. a spreadsheet), you can use the import/export Generic Point File formats. Export converts the primary raster values into a set of (x,y,z) triplets row-wise from North to South. Import will create a series of dense vector points that can be converted into a raster using Transform->Vector to raster....

2.2 Virtual Reality

VRML output from LandSerf VRML output from LandSerf. While LandSerf contains its own 3d viewer for interactive exploration of surfaces, you may also wish to export a surface as a VRML world so that it may be viewed by common VRML browsers. Selecting the VRML world format will export the primary raster surface and create a simple VRML world in which to display it. The image above shows such a file viewed by the Cortona VRML browser. Note that to store the VRML file in compressed format, the file extension .wrz should be used. If you do not wish to compress the file (some older VRML viewers cannot process compressed files), choose either .wrl or .vrml as a file extension.

LandSerf will also import the binary 'BT' raster format used by the Virtual Terrain Project. Again, even if you do not use any of the VTP software directly, this can be a useful DEM interchange format for exchanging data.

2.3 Graphical Export

The spatial objects currently displayed in LandSerf's main window can be saved as a GIF, PNG or JPEG graphics file by selecting the Image format from the save dialogue. The image dimensions will be determined by the full extent of any raster or vector maps displayed and will be independent of any particular zoomed or panned view. Note that if a vector map is displayed over a raster, and its extent is significantly wider than the raster, the resulting image can be quite large, possibly leading to memory problems. To reduce the risk of such problems, consider subsetting the vector map to be closer in extent to the raster.

Vector data may be exported in SVG format for sharing on the Web. For browsers with a suitable SVG plug-in, web-based maps may be created that allow users to zoom and pan while maintaining high quality output. This is also useful for producing high quality printed output. Data may be compressed depending on whether a .svgz (compressed) or .svg (uncompressed) extension is supplied.

2.4 Printer Output

Print preview window Print preview window. LandSerf can print summary sheets of the current raster and vector display as well as output from the 3d viewer. 2D print output consists of the display in the main window and the title of the spatial objects displayed. A preview of the printed page can be viewed using Print Preview from the File menu. Printer output can be selected from the same menu or the button button.

2.5 GPS Input and Output

If you have a Garmin GPS (Global Positioning System) receiver and a serial connection with you computer, you can import and export vector data directly from and to the device. First ensure that the receiver is connected to your computer and switched on. Select the Configure->GPS... menu item and then press the Scan for GPS button (see figure below). After a pause of a few seconds, LandSerf should detect the GPS device and the port used to connect to it. If you have more than one GPS connected to your computer, select the one you wish to communicate with using the appropriate tick box.

GPS detection window GPS detection window.

After configuring the GPS connection, you will be able to import waypoints, routes and tracks from the GPS or export waypoints to it. Selecting the File->Import from GPS... menu item will bring up a window similar to the one shown below. You can choose to download waypoints (sets of named point locations), tracks (lines representing the location of the GPS recorded at regular intervals) or routes (an ordered collection of waypoints defining a path) by clicking the appropriate button in the window. Depending on the volume to be downloaded, importing data can take from a few seconds to several minutes. Progress is reported in the status bar at the bottom of the window.

Once downloaded you can choose which items are stored as a LandSerf vector by selecting the appropriate tick box. By default, position data are downloaded as global latitude/longitude coordinates. You can reproject directly into OSGB or UTM coordinate systems by selecting the relevant tick box. Alternatively, you can reproject later using the Transform->Reproject menu. If you have downloaded any tracks from the GPS, you have the additional option of saving a detailed 'position/time' file which records (x,y) position, elevation (if recorded on the GPS receiver) and time. These data can be analysed in a spreadsheet or reimported into LandSerf as a collection of vector points.

GPS import GPS location and time points GPS import (left) and display of (x,y,time) points along GPS route (right).

If you have a LandSerf vector containing point values, these can be exported to the GPS as waypoints. This can be useful for route planning by, for example, digitizing key points along a route in LandSerf with a raster map as backdrop. To export waypoints, select the File->Export to GPS... menu item to bring up window similar to the one shown below. If the currently selected vector contains point values, these will be identified in the window as available for upload. Note that only vector maps with a defined map projection can be exported to the GPS.

GPS waypoint export GPS waypoint export.