The Landserf Manual the Landserf Manual Version 1.0, 3Rd December 2009 for Landserf 2.3.1 C Jo Wood, 2009
Total Page:16
File Type:pdf, Size:1020Kb
Jo Wood The LandSerf Manual The LandSerf Manual Version 1.0, 3rd December 2009 for LandSerf 2.3.1 c Jo Wood, 2009 LandSerf my be freely downloaded from www.landserf.org along with documentation and this manual. You may make copies of the LandSerf Manual provided it is for personal or educational use and the original documentation remains intact. You are not permitted to sell or otherwise charge for the use of LandSerf or the LandSerf Manual. Contents 1 The LandSerf Tutorial 1 1.1 Importing an elevation model. 1 1.2 Georeferencing Information. 2 1.3 Importing an elevation model. 2 1.4 Displaying the Surface. 4 1.5 Attaching metadata to Rasters. 8 1.6 Simple morphometric analysis. 11 1.7 Advanced morphometric analysis. 17 2 User’s Guide 23 2.1 Starting LandSerf . 23 2.2 Getting Data In and Out of LandSerf . 31 2.3 Creating, Editing and Transforming Data . 40 2.4 Visualising Spatial Data . 57 2.5 Viewing and Navigating in Three Dimensions . 65 2.6 Getting Information From Spatial Objects . 73 2.7 Performing Analysis on Surfaces . 80 3 ‘How to’ Guides 89 3.1 Importing Data into LandSerf . 89 3.2 Importing Shuttle Radar Topography Mission (SRTM) elevation data . 92 3.3 Converting file formats using LandSerf . 100 4 LandScript 123 4.1 LandScript - Controlling LandSerf by scripting . 123 iii iv LandSerf User’s Guide 4.2 LandScript - Language Basics . 126 4.3 LandScript - Tutorial . 139 4.4 LandScript - Functions and Operators . 143 4.5 LandScript Command Reference . 147 4.6 Creating New Raster and Vector Maps . 164 4.7 File Format Conversion . 166 4.8 Combining the contents of two objects . 168 4.9 Tiling Objects . 170 4.10 Transforming Between Elevation Models . 172 4.11 Transforming Raster Values . 173 4.12 Drawing Vector Maps . 175 4.13 Cartographic Shaded Relief . 177 4.14 Processing Colour Components . 180 4.15 Image Filtering . 184 4.16 Detecting Peaks and Summits . 186 4.17 Measuring Characteristic Scales . 188 5 Programming with Java 191 5.1 Introduction to Java Programming with LandSerf . 191 5.2 Getting Started . 192 5.3 Manipulating Raster Maps . 196 5.4 Manipulating Vector Maps . 202 5.5 Using the jwo.landserf.process classes . 208 1 The LandSerf Tutorial This simple tutorial describes the process that you might go through when using LandSerf for terrain analysis. You can follow the steps using the sample data provided with LandSerf or you can adapt it to use with your own elevation data. You can start LandSerf by using one of the following methods: • Selecting it from the Start menu (Windows) • Click on the LandSerf icon on the desktop (Windows or in the Applications folder (MacOSX ) • running landserf.sh from the command line (UNIX/Linux/MacOSX) • run or click on landserf.bat (Windows) 1.1 Importing an elevation model. The first stage of any terrain analysis is to import a digital model of the land surface to analyse. Much of LandSerf’s functionality concerns processing Digital Elevation Models (DEMs) so we will concentrate on that here. A DEM is simply a matrix of elevation values that describes the height of some surface at regular spatial intervals. For this tutorial, we shall import a DEM from the United States’ National Elevation Dataset representing part of the Columbia River area in Washington state. You may wish to substitute an alternative area of interest (in which case you can find further details on importing data into LandSerf). The DEM we wish to import for this exercise is taken from the United States Geological Survey (USGS)Seamless data server that allows data to be selected from user-defined regions of the American continent. The data are provided in ArcGISBinary Interleaved Layer (BIL) format and can be found in the data sub-directoryof the LandSerf installation. To import the elevation file: • Select either the File!Open... menu or the button. • In the drop-down menu labelled Files of Type, select the ArcGIS Binary Image (.bil) format. • Use the dialogue window to navigate to the data sub-directory of the LandSerf directory (if you have used this version of LandSerf before, the file dialogue will default to the last directory you have used). Select the file lincolnNED.bil to load this file. 2 The LandSerf Manual Figure 1.1: Lincoln DEM in LandSerf You should see a square image of the elevation surface as shown in Figure 1.1. The smaller thumbnail image on the left-hand side of the LandSerf window acts as an ’index’ entry. Every time a new object is loaded into LandSerf, a new thumbnail will be added to this index. 1.2 Georeferencing Information. The elevation model provided by the USGS is currently georeferenced using global latitude and longitude values. That is, each of the four corners of the surface are associated with particular locations on the earth’s surface. To find out these values we can view the georeferencing information by doing the following: 1.3 Importing an elevation model. Figure 1.2: Georeferencing information The LandSerf tutorial 3 • Select either the Info!Summary Info menu item or the button. This should produce a new window, part of which is shown in Figure 1.2. The problem with using global latitude and longitude values for analysis is that they do not cor- respond to fixed distances on the ground. One degree of longitude will vary in length depending on the latitude of the measurement. It is therefore useful for us to be able to reproject the surface onto a planar coordinate system where there is a fixed scale between the units used and measurements on the ground. For this tutorial, we will firstly store the fact that the imported file uses global latitude/longitude coordinates, then transform the DEM onto a Universal Transverse Mercator (UTM) projection: • Double-click on the thumbnail image of the raster on the left of the main display, or select the Edit!Edit raster menu item. In the new window that appears, click the Edit button in the Map Projection section. • Set the projection information to Latitude/longitude from the drop-down menu. Press the OK buttons in the projection and edit windows to confirm your selections. • Select the Transform!Reproject... menu item and in the window that appears, select UTM as the New Projection. This will produce a new window allowing you to set the dimensions of the new projected raster (see Figure 1.3) • In the new window, enter 30 in both the E-W Res and N-S Res fields. All the remaining fields can be left with their default values. • Click the OK button to create the reprojected raster. Figure 1.3: Editing georeferencing information After a few seconds, a new surface should appear as shown in Figure 4. Note that the index area now shows two images - the original as well as the reprojected surfaces. You can select any of the index objects at any time by clicking on the chosen image with the left mouse button. The more rectangular shaped surface now has a fixed resolution where each DEM cell represents a square of 30m x 30m on the ground. 4 The LandSerf Manual Figure 1.4: The reprojected raster map • Remove the original unprojected (square) DEM by clicking on its small thumbnail image with the left mouse button and then selecting File!Close raster. Once closed, click on the reprojected raster in order to select it. • Check that the resolution of the reprojected raster is indeed 30m in both an east-west and north-south direction by displaying the summary information as you did above. You should also confirm that the raster now has 321 columns and 469 rows. • We will use this new surface in later stages of this tutorial, so save it by selecting either the File!Save... menu or the button. Call the file lincolnNED30m.srf and save it somewhere where you can later open it. 1.4 Displaying the Surface. The images we have seen so far that represent the surface are made by allocating a colour to each cell value in the raster model. So for example, all cells that represent an elevation of around 500m above sea level are coloured green and all those that are 800m above sea level are purple. LandSerf can use this same elevation information to model the amount of light or shade on each raster cell by calculating local slope direction and steepness. This can be combined with the colouring scheme you have already seen to produce a shaded relief map of the surface: • To view a shaded relief representation select the Display!Relief menu item. This should produce an image similar to that shown in Figure 1.5. • Try altering the shaded relief parameters by selecting either the Configure!Shaded relief menu item or the button. In the new window that appears, you can move the sliders for each parameter and see the effect each has on the image. When you are happy with the parameter settings you have selected, press the OK button. After a second or two, the new shaded relief image should be displayed in the main window. The LandSerf tutorial 5 Figure 1.5: The surface with shaded relief The colour scheme associated with any object can be changed, either by selecting one of Land- Serf’s pre-defined colour schemes, or by creating a series of colour rules to be associated with the object. At this stage, we will select one of the pre-defined colour schemes: Figure 1.6: Selecting preset colour schemes • Double-click on the raster thumbnail or select the Edit!Edit raster menu option.