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.
The steps below outline the details to publish the GeoMedia text labels into KML.
- Open up your GeoMedia Workspace and select Analysis > Functional Attributes.
The Functional Attributes dialog box appears. - In the Add Functional attributes for drop down list, select the label feature you want to publish to KML, e.g. StateNameLabels.
- Click New.
The Functional Attribute dialog box appears. - In the Functional attribute name field, enter a meaningful name, e.g. pointGeometry.
- 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. - Click Add.
The Functional attribute PointGeometry is added. The Functional Attribute dialog box resets to default values. - In the Functional attribute name field, enter a meaningful attribute name for the field to store the label string, e.g. theLabel.
- 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. - Click Add. Click Close.
The Functional Attributes dialog box appears. - In the Query name field, enter a meaningful name e.g. PointStateNameLabels. Toggle off Display functional attributes in data window.
- Click OK.
The PointStateNameLabels point feature is displayed in the map window. - Select File > Publish > Configure KML Publishing.
The Configure KML Publishing dialog box appears. - Under Legend Entries, choose PointStateNameLabels.
- In the Get placemark names from drop down list, select the exposed attribute field that contains the text string labels e.g. theLabel.
- Click OK.
- Select File > Publish > Publish Map.
The Publish Map dialog box appears. - 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:
Thanks for the post. I used the basic concepts for text labels of point features from Microstation files.
Thanks for the post. I used the basic concepts for text labels of point features from Microstation files.
Post a Comment