Showing results for 
Search instead for 
Do you mean 

Primary vs. Secondary Geometry Fields

by Technical Evangelist on ‎07-20-2016 08:47 AM (770 Views)


When working in GeoMedia sometimes multiple geometries are stored in the same feature class which can be somewhat confusing as it seems only possible to nsert into only one of the geometry fields.  Is it possible to insert geometry into any of the available geometry fields?


You can think of Geometry as just another database (or in memory record set) attribute field that holds values for graphics which can be viewed and manipulated in the map window.   While there can be multiple geometry fields in a single feature class or query, there can only be one primary geometry field; All other geometry fields (if any) are considered secondary.   While there are some exceptions, GeoMedia commands such as insert feature, edit geometry and most spatial analysis commands operate on the primary geometry.  Working with a single primary geometry greatly reduces complexities for commands that can vary greatly based on the geometry type.


GeoMedia’s Database Utilities command can be used to select which geometry field should be the primary geometry.  Be aware however, that changing the primary geometry could invalidate existing GeoWorkSpace legend entries.  If your goal is to store multiple geometry types in the same feature class you might consider setting the geometry type to Compound (spatial any). This allows selection of the geometry type prior to digitizing.


Other Geometry Notes:

Geometry fields are often created or added as a result of some query analysis.  Examples:

  • Geocode Coordinates adds a new geometry to the output query record set.
  • Certain Functional Attributes geometry based functions such as CENTERPOINT, SEGMENTS, STARTPOINT, ENDPOINT, etc add new geometry to the output query record set.

When a query adds a new geometry, the newly added geometry is considered to be primary for the record set even though the originating feature may have a different geometry as the primary.  Calculated geometry from queries cannot be directly edited but they may change based on changes made to the input feature class.


The Legend > Add Legend Entries command adds all geometries found in the feature class (both primary and secondary) thus adding a single legend entry may result in multiple legend entries.  Adding a query to the legend via the query command or Analysis > Queries commands will add only what is considered to be the primary geometry for the record set.


If you have secondary geometry in a read-write feature class, the Update Attributes command can be used to update geometry based on another geometry field.  For example if you have a point feature class with X and Y attributes, you might Geocode the X and Y values, then use the resulting Geocoded Coordinate query as input to update attribute to update the geometry field of the originating point feature class.   Note: When using update attributes to update geometry fields, care should be taken that the geometry used for the update is in the same coordinate system as the target field to be updated.  The Warehouse > Features command can be used to review the coordinate system assigned the feature class.  Geocode Coordinates, Geocode Addresses, and Dynamic Segmentation queries are output using the coordinate system of the GeoWorkSpace whereas geometry resulting from functional expressions (Functional Attributes, Aggregation and Analytical Merge) are output using the coordinate system of the feature class as it is stored in the warehouse.