Tuesday, September 23, 2008

Create Labels from Point Geometries with Functional Attributes

Unlike CAD formats like DGN or DWG, some GIS formats like Shape File do not have a geometry type for text labels. The closest are point geometries with attached database attributes for storing the text label string, angle of rotation, size, etc. See the screenshot below of an example.



As these are point geometries, they are displayed as point geometries (no surprise) in GeoMedia. But, there is a way to make use of the associated text attributes and point geometries to create text label features in GeoMedia. The tool to use is the Functional Attributes.

Here are the steps to create the text labels in GeoMedia.
  1. Select Analysis > Functional Attributes.

    The Functional Attributes dialog box appears.

  2. In the Add functional attributes for combo box, select the point feature, e.g. PIPE_LABEL.

    The Functional Attributes dialog box may look like this.


  3. Click New.

    The Functional Attribute dialog box appears.

  4. In the Functional attribute name field, type in a meaningful name, e.g. TextLabel.
  5. In the Categories list box, click Geometry.
  6. In the Functions list box, click CreateTextPoint.

    The description of the CreateTextPoint function appears below.
    CREATETEXTPOINT(Geometry, Text, Alignment, Orientation)
    Creates a text point geometry from the given parameters.

  7. In the Expression field, type in the following. Note: Replace Geometry with the name of your data's geometry field; replace LABEL with the name of your data's text label field' replace ROTATION with the name of your data's angle of rotation field.

    CREATETEXTPOINT(Input.Geometry, Input.LABEL, 0, Input.ROTATION)

    The Functional Attribute dialog box may look like this.


  8. Click OK and Close.

    The Functional Attribute dialog box is closed.

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

    The Functional Attributes dialog box may look like this.


  11. Click OK.

    The text label feature is created and displayed in the map window.

No comments:

Related Posts with Thumbnails