Monday, March 30, 2009

Global Mapper export to GeoTiff

GeoMedia Professional's Output to GeoTiff command can be a pain to use. Sometimes it just refuses to create GeoTiff files (in lat,lng WGS84)  and all it tells you is that it was "unable to put the GeoTiff tags in the image" as shown in the screen shot below. GeoMedia Image is not an improvement either. 

So I tried out Global Mapper 10.1 and I was pleasantly surprise to see how little hassle it is to use it to create GeoTiff images from Tiff files with associated TFW world files.
  1. First, I click the Open Your Own Data Files button.

    The Unknown Projection message pops up.


  2. Click OK.

    The Select Projection for image dialog box appears.


  3. Choose the correct projection system and datum appropriate for the image. Click OK.

    Global Mapper displays the image.


  4. Select File | Export Raster and Elevation Data | Export GeoTiff.



    The GeoTiff Export Options dialog box appears.


  5. Set the output options such as the compression and the bit depth. Click OK.

    The GeoTiff image is created.
That's it. Done. I've successfully created a GeoTiff image from a Tiff file and TFW world file with Global Mapper. The process is staightforward and painless.

Related books

  1. Introductory Digital Image Processing: A Remote Sensing Perspective (2nd Edition)
  2. Processing Digital Images in GIS: A Tutorial Featuring ArcView and ARC/INFO

Wednesday, March 25, 2009

Publishing KML from GeoMedia

GeoMedia 6.1.5.19 now has the capability to publish the contents of your map window to a Google KML file. The command is not found under the standard export pulldown menus at Warehouse | Export To but rather under the File | Publish pulldown menus. Unlike the other export commands which work at the feature class level, the Publish to KML command operates at the map window level. Whatever you see in your map window – the features, the color, images, fonts, style, etc. will be published to the KML file, almost WYSIWYG like. That is why you have to layout your map window nicely first before activating the Publish to KML command. 
  1. Nicely setup your map window first, e.g. like the screenshot below.


  2.  Select File | Publish | Configure KML Publishing.



    The Configure KML Publishing dialog box appears.


  3. For each of the Legend entries, click on the legend entry name. Then in the Get placemark names from drop down list, select an attribute from the legend entry to be used as the placemark name. Or choose Legend Entry Title to use the legend entry’s name as the placemark name.



  4. Toggle on Publish Attributes if you want to see the legend entry’s attributes in the KML file. This is optional.

  5. Click OK.

    The Publish Map dialog box appears.


  6. In the Target format drop down list, select KML. In the Publish to field, click Browse and enter the name of the output KML file.

  7. Toggle on Display in target application if you want Google Earth to display the new KML file. This is optional.

  8. Click OK.

    The Google Earth application displays the new KML file.
    Note: the color of the KML lines is the same as the color in GeoMedia
    .

Tuesday, March 17, 2009

Defining Geocoding Model for GeoMedia 6.1

In my previous post, I showed how to define a rule to parse 6-digits postal codes. The next step in setting up address geocoding in GeoMedia is to define the geocoding model. In this step of the workflow, there are two geocoding model types - roof top or center line (with left and right house number ranges) that you can choose to create. 

To make it easier to define the geocoding model, Intergraph has provided a hidden utility in the {GeoMedia}\Program\ folder. If you can't find it then you have to install the latest GeoMedia 6.1 hot fix 6.1.5.19 or later. In this post, we are going to define a roof top geocoding model that will transform 6-digits postal code strings from reference GeoMedia features into address indexes. At the same time, we will have to define the user prompts and the transformation of the 6-digits postal code strings entered by the user. We are going to make use of the 6-digits postal code parsing rule defined in the earlier post. 

Base Address Definition

Here you have to define the components that make up your addresses e.g. house number, street name, street type, postal or zip code, etc. In our simple example, we have only one component i.e. postal code. 
  1. In Windows Explorer, double click the file DefGCM.exe in the {GeoMedia}\Program\ folder.

    The Define Geocoding Model Utility dialog box appears.


  2. Click Base Address Definition.



  3. Click the Add  button.

    The Base Address Element dialog box appears.


  4. In the Address element name field, enter a meaningful name, e.g. postalcode. In the Address element description field, enter a meaningful description, e.g. 6-Digits postal code.

    Note: the description will be used later in the GUI of other address functions.

    The Base Address Element dialog box may look like this at this point.


  5. Click OK.

    The new base address definition appears in the Define Geocoding Model Utility dialog box.




Define Address Transformations

There are two address transformations you have to set up. The first transformation to define is the transformation from the GeoMedia warehouse feature's address strings to the components (base address) of your addresses. The GeoMedia feature data is called the reference data here. For example, I may have a GeoMedia feature class named ADDRESS with an attribute field called POSTCODE that stores my postal code strings. I need to define how to map the POSTCODE field to the postalcode base address component.

The second transformation is the transformation from the address strings the user keys in to the base address components. For instance, the user may key in 123 or 123456;  I need to define the transformation that will map 123456 to the postalcode (base address) component.

  1. Click the Address Transformation tab.

    The transformations entry fields for reference data and user addresses appear
    .

  2. Click the Add  button for reference data.

    The Address Transformation dialog box appears.

  3. Click the Add  button.

    The Address Transformation dialog box appears.


  4. In the Address transformation name, enter a meaningful name, e.g. Postal code from database.

  5. Click the Add  button.

    The Source Address Element dialog box appears.


  6. In the Address element name field, enter a meaningful name, e.g. postalcode.

    Note 1: As we have only a single address element i.e. a 6 digits postal code, we can toggle on the This is a required address element option.

    Note 2: When you run the Publish to Address Geocoding Index utility, if you want it to automatically fill in the database field name for this address element, you can enter the database field name in the Suggested Name field.

  7. Click the Add  button.

    The Suggested Name dialog box appears
    .

  8. In the Suggested field name field, enter the database field name e.g. POSTCODE. Click OK.

  9. Click OK to close the Source Address Element dialog box.

    The new source address definition is added to the Address Transformation dialog box.

  10. Click the Direct Transformation tab. Then Click the Add  button.

    The Mapping Properties dialog box appears.


  11. Toggle on Apply parsing rules. Click Browse.

    The Open Address Parsing Rules dialog box appears.

  12. Browse and select the rules file we defined earlier (in my previous post) e.g. mypostalcode.xml. Click Open.

  13. Click OK twice.

    The new address transformations for reference data definition is added to the Define Geocoding Model Utility dialog box.

  14. Click the Add button  in the user address section.

    The New Address Transformation dialog box appears.

  15. Toggle on Existing reference data address transformation. Select PostalCode from database and Click OK.

    The Address Transformation dialog box appears and the address definition from the reference data section is copied over.


    Note: instead of copying over the reference data definition, you can start from blank and create a new definition for transforming user addresses.

  16. In the Address transformation name, enter PostalCode from user entry.

    Click OK.

    The new definition is added to the address transformation for user addresses.


Define Suggested Names (optional)

Suggested names are used by the Publish to Address Geocoding Index utility and GeoMedia's address geocoding functions e.g. Find Address. As the name indicates, Suggested Names are simply names that GeoMedia will use and find the matching feature classes and field names. If GeoMedia can't find the matching class/field, then the user will be prompted to select.
  1. Click Suggested Names tab.



  2. Click the Add  button.

    The Suggested Names dialog box appears.


  3. In the Suggested feature class name, type in the name of the GeoMedia Warehouse feature class name that stores the reference addresses e.g. ADDRESSES.
  4. Click the Add  button.

    The Suggested Name dialog box appears.


  5. In the Suggested field name field, type in the name of the database field in the GeoMedia feature class, e.g. POSTCODE.




  6. Click OK.

    The new suggested name is added.

Define Matching Indices

Here is where you can define how the user inputs will be matched with the geocoded address indexes. You can have sound like matching or the actual value matching.
  1. Click the Matching Indices tab.


  2. Click the Add  button in the upper half.

    The Matching Index Properties dialog box appears.


  3. In the Matching Index name field, enter postalcode. Press OK.

  4. Click the Add  button in the lower half.

    The Add to Matching Index dialog box appears.

  5. In the Include the first characters of drop down list, select a number e.g. 3. In the Address element drop down list, select postalcode. In the Using method, select Actual Value.



    Click OK.


  6. Select File > Save As and save the Geocoding Model definitions to an XML file, e.g. mypostalcode_gcm.xml.

The final setup step is to run the Publish Address Geocoding Index utility.