Showing results for 
Search instead for 
Do you mean 

Creating linear geometry from area boundaries

by Technical Evangelist on ‎04-01-2016 08:15 AM - edited on ‎04-06-2016 01:59 PM by Moderator (1,303 Views)


How can area geometry polygons be converted to linear geometry lines?


Area geometry can be converted to linear geometry using either a functional approach or a topological approach.  The functional approach results in unbroken line work which traverses completely around each area geometry.  The topological approach results in linear geometry that is broken where there are boundary/linear intersections


Functional Approaches:

The SEGMENTS function can be used in the Analysis > Functional Attributes command to convert the boundaries of area geometries to 2 point line segments. 




The segments function is an expansive function meaning that 1 input record (geometry) can result in many output records.   An attribute query on STATES in USSampleData.mdb where STATE_NAME = TEXAS would return a single record.  Inputting the single state record for Texas into the SEGMENTS function however would result in more than 2,000 output records in the resulting functional attribute query.

One means of creating a single output polyline would be to use the Functional Attributes command to enclose the SEGMENTS expression in a MERGE.




If geometry collections are not desired the previous expression could be modified to:




Functional Considerations:

Functional Attributes command calculates new functional values and adds the newly calculated values as new columns (attributes) in the output query table.  All of the originating attributes are preserved, including geometry.  This means that the SEGMENTS expression adds a new functional geometry column, in addition to the existing polygon column.   When adding the query to the legend using the Analysis > Queries command, only the primary geometry is added (the functional geometry in this case).  If however the functional geometry query is added to the legend using Legend > Add Legend Entries, ALL geometry types found are added to the legend resulting in multiple legend entries, one for the new functional segments linear geometry and 1 for the original area geometry.  Recalling the example of 2,000+ segment s for Texas, this would mean that there would be one legend entry for the segments as well as one legend entry for the state geometry; where both of these would have 2,000+ entries.  Hence the use of the MERGE can be helpful to simplify the multi-record output to a single record (polyline) output.


Topological Approaches:

The Toolbox > Base Geometry > Generate Base Geometry command can be used to generate Edges for the area geometries.  The result is single polylines that are broken at intersections with other area boundaries.  The attributes carry a feature count that can be useful to determine or locate edges which are shared or not shared.  Unshared edges (for example States along coastlines) will have a feature count of 1 whereas shared edges feature count will be greater than 1.


Post Base Geometry Processing Options:

If it is desirable to have originating attributes on the base geometry line, the Analysis > Spatial Intersection command could be used to locate where the Area feature Meets the Base Geometry query.

The result of the spatial intersection is a compound (spatial any) geometry representing the geometry of intersection between the states and the base geometry edges.

The Spatial Intersection geometry (query) can be input into Analysis > Functional Attributes to filter for the linear components only.




The FILTERLINEAR expression will return all linear components.  Any points present will be returned as a NULL geometry.  Records where the previous functional geometry (the result of FILTERLINEAR) is null can be filtered out using a standard Analysis > Attribute Query.  The key to constructing attribute query filter statements that work with geometry is to know the geometry field name.  In the example above the functional attribute name was simply called “Geometry” thus the Attribute Query could look like:

Geometry IS NOT  NULL;


Finally if desired the previous attribute query could be input into Analysis > Selection (Attribute Selection) command to turn off the old IntersectionGeometry fieldname, leaving only the geometry field with the true lines.