Thursday, April 30, 2009

Publish GeoMedia Text Labels to Google Earth KML

In my previous post I showed how easy it is to use GeoMedia and GeoMedia Professional 6.1.5.x to publish features into Google Earth's KML format. This works for point, line, and polygon geometries. However, you may have noticed that GeoMedia text label features in your legend are not published to KML. An example of text label features is shown in the screen shot below. 
In this post, I describe a method to enable your text labels to be published to KML from GeoMedia. The method can be summarized in two points - (1) convert the text label feature to a GeoMedia point feature, and (2) expose the text label string as an attribute field in the point feature.

The steps below outline the details to publish the GeoMedia text labels into KML. 
  1. Open up your GeoMedia Workspace and select Analysis > Functional Attributes

    The Functional Attributes dialog box appears.


  2. In the Add Functional attributes for drop down list, select the label feature you want to publish to KML, e.g. StateNameLabels.

  3. Click New.

    The Functional Attribute dialog box appears.


  4. In the Functional attribute name field, enter a meaningful name, e.g. pointGeometry.
  5. Now define the Expression. Choose Geometry under Categories. Double click ORIGIN under Functions. Under attributes, double click the text label feature's geometry field name e.g. Input.Offset

    The Expression ORIGIN(Input.Offset) is formed.


  6. Click Add.

    The Functional attribute PointGeometry is added. The Functional Attribute dialog box resets to default values

  7. In the Functional attribute name field, enter a meaningful attribute name for the field to store the label string, e.g. theLabel

  8. Now form the Expression to extract the text string. Double click Geometry under Categories. Under Functions, double click on GRAPHICSTEXTSTRING. Under Attributes, double click the text label feature's geometry field name, e.g Input.Offset

    The Expression GRAPHICSTEXTSTRING(Input.Offset) is formed.


  9. Click Add. Click Close.

    The Functional Attributes dialog box appears.

  10. In the Query name field, enter a meaningful name e.g. PointStateNameLabels. Toggle off Display functional attributes in data window.



  11. Click OK

    The PointStateNameLabels point feature is displayed in the map window.


  12. Select File > Publish > Configure KML Publishing

    The Configure KML Publishing dialog box appears.


  13. Under Legend Entries, choose PointStateNameLabels

  14. In the Get placemark names from drop down list, select the exposed attribute field that contains the text string labels e.g. theLabel

  15. Click OK.

  16. Select File > Publish > Publish Map.

    The Publish Map dialog box appears.


  17. Specify the output KML file name and click OK.

    The KML file is published with the text labels and displayed in Google Earth.

2 comments:

Michael said...

Thanks for the post. I used the basic concepts for text labels of point features from Microstation files.

Michael said...

Thanks for the post. I used the basic concepts for text labels of point features from Microstation files.

Related Posts with Thumbnails