Wednesday, February 10, 2010

Import ArcGrid ASCII files into GeoMedia Grid

ArcGrid ASCII files are convenient to pass data between application software. Before using terrain data in ArcGrid ASCII format files (*.asc, *.agr), they must be imported into GeoMedia Grid's native format raster files (*.mfm) and placed as layers under what is termed a Study Area. I have no idea what .mfm stands for and I could not find any documentation details on the extension name. 

To import an ArcGrid ASCII file, the following steps can be done. 
  1. Run GeoMedia and open up or create a GeoWorkspace with the desired coordinate system and a read/write warehouse connection.

  2. Select Grid | Study Area | Import File(s).

    The Import File(s) dialog box appears.


  3. Click Browse and select an ArcGrid ASCII file e.g. B3.asc.



  4. Click Open.

    The File Type(s) Found dialog box may appear.


  5. Choose ArcGrid ASCII. Click OK.

  6. Click the Coordinate system file Browse button. Choose the appropriate coordinate system file (*.csf) and click Open.

    The Import File(s) dialog box is updated with the selected.

  7. Click Next.

    The selected file is scanned and then the ASC Input data dialog box appears.

  8. Click the X Coordinate and Y Coordinate units drop down list and select the appropriate horizontal units e.g. feet.

  9. In the Cell resolution text field, type in the correct cell spacing e.g. 2.

  10. In the Cell resolution units drop down list, select the correct vertical units e.g. feet.

    At this point, the ASC Input data dialog box may look like this.

  11. Click OK.

    The Import File(s) dialog box appears.


    Note: By default the Study Area name will be Study Area 1. Right click on the name to rename it to something else if necessary.

  12. Click Next.

    The Import File(s) dialog box is updated with statistical information about the file.

  13. Click Finish.

    The ArcGrid ASCII file is imported into GeoMedia Grid and is ready to be used.

Friday, February 5, 2010

GeoMedia Export to Shape File Annoyances

GeoMedia has been able to export features and queries out into ESRI Shape Files for the longest time. Users of ArcGis can be a little miffed if they find out they have to read in shape files created from GeoMedia because the shape files lack .prj files, which contain the coordinate projection information associated with the exported files.

The shape files created by GeoMedia will only have the following files created: .dbf, .shp, and .shx, as shown in the screen shot below. GeoMedia will also create a file with the extension .csf that contains the coordinate system of the exported shape file. However, this is a proprietary file and can only be read using Intergraph software.
When these GeoMedia created shape files are read in ArcMap with the Layer | Add Data command as shown below, ArcGis will not be able to determine the correct coordinate system and the software will pop up a warning message: 



The shape files can be displayed in ArcMap but the coordinates are plain XY coordinates; the units and projection are unknown as highlighted in red below. The shape layers cannot be reprojected to another projection system. 
In order to resolve this problem, ArcGis users will have to create the .prj file by copying over some existing .prj file from perhaps the ArcGis product folder or through some other means. This task can get very tedious if there are a large number of shape files. 
If the shape files have associated .prj files, then ArcMap can read the shape files including the coordinate system defined in the .prj file successfully, as shown in the figure below. Note the projection information highlighted in red. 
I have heard from Intergraph that the next version of GeoMedia will be able to generate the .prj file when exporting out the shape files. I hope this will come to pass.

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