Wednesday, February 3, 2010

Create donut polygons in Global Mapper

Global Mapper has a neat function to create donut polygons. It can be useful if you have some islands in closed water bodies like lakes and you need to retain the island polygons while cutting out holes from the enclosing water body polygons. Here's how to use the function.
  1. Run Global Mapper and display or digitize a water body polygon.


  2. Press ALT+D or click the Digitizer Tool icon. Then click the Create New Area Feature  icon.

    The cursor changes to an arrow with the label Area.
  3. Click on the map view to place an island polygon.Right click to complete.

    The Modify Feature Info dialog box appears.

  4. Change the Feature Type to island if needed. Change the Feature Layer if necessary. Click OK.

    The island polygon is created.
  5. Press ALT+D or click the Digitizer Tool  icon.

    The cursor changes to a cross hair with the label Edit.
  6. Click on the newly created island polygon.

    The island polygon is selected.

  7. Right click anywhere on the map view.

    A pop up menu appears.

  8. Choose Cut Selected Area(s) from Another Area (Add Islands).

    The cursor changes to an arrow with the label Parent.
     
  9. Click on the enclosing water body polygon.

    The message below appears.

  10. Click Yes.

    Note: If you want to keep the island polygon as a separate feature, then click No. Otherwise, if you click Yes, the command will delete the island polygon after cutting out the donut hole.

    The donut polygon is created.

Monday, February 1, 2010

Global Mapper's Find Unconnected Line End Points Command


Global Mapper has a basic function to find unconnected line end points. It is an interactive function, where you can choose to graphically select the line features to check. This is useful for a quick validation of the line vectors you have digitized. If you want to find unconnected line end points in batch, you have to use other software like FME.
Here are the general steps to use the Find Unconnected End Points command:
  1. In Global Mapper, digitize some line vectors as shown below.


  2. Click the Digitizer Tool  icon on the toolbar.

    The cursor changes to a cross hair with the label Edit.

  3. Drag a box to select one or more line vectors.

    The line vectors are selected and highlighted in red.

  4. Right click anywhere in the map window.

    A pop up menu appears.


  5. Choose Find Unconnected Line Endpoints.

    The Find Unconnected Endpoint Options dialog box appears.


    Note: if you want the function to find only those nearly snapping endpoints, then toggle on Find Unconnected Endpoints with Another Line Endpoint Nearby and type in a tolerance.

  6. Click OK.

    A status message appears.


  7. Click OK.

    The unconnected end points are displayed as blue circles.


  8. Zoom in. Press CTRL+N to scroll through the unconnected end points one by one.

Thursday, January 21, 2010

Easier way to find free end points in GeoMedia

In my previous post, I went about a long winded way to determine the free end points using GeoMedia. At the least, it was a good workout of using GeoMedia's query and analysis tools. There is an easier way to do the same thing in GeoMedia by breaking down the line geometries into their base geometries.

Here is the simpler method:

  1. Start up GeoMedia and open up a workspace e.g. C:\GeoWorkspaces\USSampleData.gws.

  2. Select Legend > Add Legend Entries to display the line geometry feature to analyse e.g. Rivers if it is not displayed in the Map Window.

    The feature is displayed.


  3. Select Tools > Generate Base Geometry.

    The Generate Base Geometry dialog box appears.


  4. In the Generate base geometry from drop down box, choose the line feature e.g. Rivers.

  5. Toggle Output types Nodes on and Edges off. Toggle on Display in map window.

  6. Click OK.

    The base nodes query Base Geometry of Rivers are generated and displayed.


  7. Select Analysis > Attribute Query.

    The Attribute Query dialog box appears.

  8. In the Select features in combo box, choose the query Base Geometry of Rivers. Click Filter.

    The Base Geometry of Rivers Filter dialog box appears.

  9. In the Filter text box, type in the string: FeatureCount = 1.

    The Base Geometry of Rivers Filter dialog box should look like this.


  10. Click OK.

    The Attribute Filter dialog box is updated with the new filter string.

  11. In the Query Name text box, change the value to Free End Points of Rivers.

    The Attribute Filter dialog may look like this.


  12. Click OK.

    The free end points are generated and displayed in red.


Thursday, January 14, 2010

Edit Global Mapper's workspace file with a text editor

Global Mapper can use workspace files (with .gmw extension) to store map displays, projection, raster data layers, elevation data layers, as well as vector layers. If you create any new point, line or polygon vector features with the digitizing tools, the digitized data layers e.g. lakes (as shown in the screenshot below) are also stored in the workspace file.



If you open up the workspace file in a text editor e.g. Notepad, you would find that it is actually a text file containing a series of Global Mapper scripting commands, as shown below.


The workspace file is really a text script file that you can edit to add in your own scripting commands. What you can do is up to your imagination.

For example, you can put in the EXPORT_VECTOR script command to export out the digitized vector data layers as ESRI shape files. You can even write some sophisticated script automate the process to run for many workspace files at one go.

In the screenshot below, the line:
EXPORT_VECTOR TYPE="SHAPEFILE" FILENAME="c:\temp\lakes.shp" SHAPE_TYPE="AREAS"
 is appended to the workspace file to export out the digitized lakes layer into the shape file C:\temp\lakes.shp.



Note: The edited workspace file should be renamed as a Global Mapper script file with a .gms extension e.g. workspace.gms.

You can either double click the renamed file in the Windows Explorer window or you can open up a Command Prompt window and run the global_mapper11.exe executable with the Global Mapper script file name as the argument, as shown below.

C:\> "\Program Files\GlobalMapper11\global_mapper11" workspace.gms



After running the script file, the shape files are created from the digitized data layers in the workspace.

Tuesday, January 5, 2010

Global Mapper 11 Export to GeoPDF for Acrobat Reader

The Adobe Acrobat Reader 9.x has a Geospatial Location Tool function which can be used to display geographical positions in latitude, longitude and easting, northing values in GeoPDF (PDF with geo-location information) files.

The new Global Mapper 11 has an Export to GeoPDF function which can create PDF files that can be viewed in the Acrobat Reader. It is quite straightforward to use this function - simply stylize and layout the map display then export to GeoPDF.

Creating the GeoPDF file
  1. Before creating the GeoPDF, the layers you want to export need to be displayed and stylized in Global Mapper as shown below.

    Note: the example screenshot shows three layers - a GeoTiff image, State polygons and city point features.


  2. Select File | Export PDF/GeoPDF File.

    The PDF Export Options dialog box appears.


  3. Change any settings as required. For example, change the Orientation setting to Landscape from Portrait. Click OK.

    The Save As dialog box appears.


  4. Browse to the output folder and type in the output File name. Click Save.

    The GeoPDF file is created.

Viewing the GeoPDF Coordinates in Acrobat Reader
  1. In Windows Explorer, double click on the GeoPDF file created previously.

    The file is displayed in Acrobat Reader.
  2. Click the Layers icon on the left to display the list of layers (as shown above).

  3. Using the Layer list, layers can toggle on or off as shown below by clicking the eye icon.


  4. Select Tools | Analysis | Geospatial Location Tool or click the right icon on the Analysis toolbar.

    The coordinate readout display is shown on the bottom right.


    Note: the readout can be a combination of latitude/longitude and/or easting/northing coordinates depending on the Acrobat Reader Preferences settings.

  5. Move the cursor around the map display.

    The cursor coordinates are displayed dynamically.

Marking Locations on the GeoPDF
  1. Right click anywhere on the map display.

    A pop up menu appears.


  2. Choose Find a Location.

    The location entry fields are displayed at the bottom right.


  3. Type in a coordinate. Press RETURN.

    The typed in coordinate is marked on the map display.


Now with GeoPDF files, geospatial information can be easily generated and distributed for viewing using a simple Adobe Acrobat Reader desktop application.

Related material

  1. GeoPDF map files: all regional digital maps on one DVD.: An article from: Engineer: The Professional Bulletin for Army Engineers
  2. PDF Hacks: 100 Industrial-Strength Tips & Tools

Thursday, December 17, 2009

Flagging intersection points with elevation differences

Typical GIS applications have the capability to determine unbroken intersections but only from the perspective of a 2D plane i.e. as if the spatial intersection analysis is done only after the line work is projected entirely onto the 2D plane; if the line work has a elevation or Z component, then the Z component is ignored entirely in the analysis. In 3D GIS applications like terrain modeling, sometimes it is useful to be able to determine the elevation difference of the line work at the point of intersection. If one spatial feature represents a lake, then a river line feature flowing out of the lake should have the same elevation at the point of intersection. It would be useful to be able to flag the intersection points that have elevation differences.

In the example dataset below, there are a few line features with different elevation values - the values are labelled along the line work. All of them are at 0 elevation except for one, which is on 10 elevation.

We want to flag out the intersection point where there is a difference in elevation. One of the tools that can help us perform this is Safe FME. FME has some transformers that you can string together to perform the flagging of intersection points with elevation differences.

  1. Run FME Workbench. Add in a Source Dataset e.g. lines.shp. Add in a Destination Dataset e.g. flags.shp.

  2. Drag and drop the Intersector, Matcher, Counter Transformers onto the Main pane. Connect them up as shown in the figure below.


    Note: the Counter transformer is used to simply count the number of flags.

  3. Open up the Intersector transformer's Parameters. The settings should be set as shown below.


    Note: Duplicate Nodes as Each Elevation should be set to Yes. Then when an elevation difference is detected at the point of intersection, the Intersector transformer will output 2 nodess.

  4. Open up the Matcher transformer's Parameters.The settings should be set as shown below.


    Note: The Matcher will find(match) all duplicate nodes i.e. the nodes that have elevation differences. 

  5. Run the translation.

    The intersection points where there are elevation differences are flagged (shown as a red cross below).


Tuesday, December 15, 2009

Global Mapper Snapping to Line Work

Snapping to existing points, lines and polygons is important while digitizing. Knowing how Global Mapper handles snapping can help improve the data collection work. Sometimes, you may want to snap only to the vertices. At other times, you may want to snap along the line work. And sometimes, you may not want to snap at all.

Setting the Snap Mode
The snapping mode of Global Mapper can be set using the Configuration dialog box

  1. Select Tools > Configure.

    The Configuration dialog box appears.


  2. Click the tab Vector Display.

  3. In the list box, scroll down until the Only Snap to Area and Line Vertices by Default setting is shown.

  4. Depending on your situation, toggle on or off the Only Snap to Area and Line Vertices setting.

    Note: the keyboard shortcut V behavior would be reversed depending on this setting.

  5. Click OK.

    The snapping mode is set.

Using Snapping with Only Snap to Area and Line Vertices by Default off
  1. Digitize a new line and bring the cursor near to a line or polygon as shown below.

    The new line snaps on the line work and vertices of line or polygon.


  2. Press down and hold V.

    The new line will snap only to the vertices of the line or polygon.

  3. Now press down and hold ALT.

    The new line will not snap to anything.

Using Snapping with Only Snap to Area and Line Vertices by Default on


  1. Digitize a new line and bring the cursor near to a line or polygon.

    The new line snaps only to the vertices.


  2. Press down and hold V.

    The new line snaps on the vertices and along the line work.

  3. Press down and hold ALT.

    The new line will not snap to anything.




While digitizing lines, polygons and points in Global Mapper, you will probably want to snap to existing vectors' vertices, on the existing vectors' line work, or not at all.