Transform - Geometry: Convert

The Convert template appears in the template list when a geometry field, of type geom, geommfd, or geomwkb, has been picked in the Transform pane.   It converts between object types.

 

Convert

Convert objects to their equivalent as area, line, or point objects.  Converting areas to lines or to points will created branched lines (multilines) or branched points (multipoints).  Converting lines to points will create branched points.   Such branched points can be converted into lines or areas, and branched lines can be converted into areas, because branched points and branched lines contain within their coordinate ordering the sequence information required to construct a higher level object, such as lines or areas from branched points, and areas from branched lines.

 

Launch the template by choosing a geometry field and then double-clicking the Convert template.  When the template launches we can specify options.

 

 

Convert : area

For each object in the source field, take the sequence of defining coordinates and create an area to put into the Result destination.

 

For an example, we will use a version of the Objects Drawing that has had area object replaced with their boundary lines.

 

 

With the focus on the Objects Drawing, in the Transform pane we choose the Geom field and then the Convert template.

 

 

We choose area for the Convert to option.  We choose the Tgeom field (a geometry field we have in the table to use for temporary results) as the Result destination.    Press Transform.

 

 

Our Temp Objects Drawing shows the contents of the Tgeom geometry field.   Areas that are created from point coordinates are dimensionless area objects that begin and end at the same coordinate.  To avoid such dimensionless area objects, apply the Convert template using the area option only to line and area objects, but not to points.

 

When creating areas from lines this template is normally used with lines that form closed figures since an area object will be constructed from an unclosed line by connecting a final segment from the last coordinate of the line to the first coordinate, as seen above.

 

Convert : line

For each object in the source field, take the sequence of defining coordinates and create a line to put into the Result destination.

 

 

With the focus on the Objects Drawing, in the Transform pane we choose the Geom field and then the Convert template.

 

 

We choose line for the Convert to option.  We choose the Tgeom field (a geometry field we have in the table to use for temporary results) as the Result destination.    Press Transform.

 

 

Our Temp Objects Drawing shows the contents of the Tgeom geometry field.   Lines that are created from point coordinates are dimensionless line objects that begin and end at the same coordinate.  To avoid such dimensionless line objects, apply the Convert template using the line option only to line and area objects, but not to points.

 

Convert : point

For each object in the source field, take the defining coordinates and create a point at each such coordinate to put into the Result destination.

 

 

With the focus on the Objects Drawing, in the Transform pane we choose the Geom field and then the Convert template.

 

 

We choose point for the Convert to option.  We choose the Tgeom field (a geometry field we have in the table to use for temporary results) as the Result destination.    Press Transform.

 

 

Our Temp Objects Drawing shows the contents of the Tgeom geometry field.   We show it as a layer above the source drawing to illustrate how the Convert template using the point option creates lines from coordinates that define the original objects in the Objects Drawing.  The original Objects Drawing is shown with 10% opacity.  

 

Important: The Convert to Point template creates multipoints, that is a single geom object that can have more than one point in it.   That is so that each source record is matched by exactly one target record.  If an area is defined by a few hundred points the resulting geom will still be a single record, but it will be a multipoint with a few hundred points in it.

 

Note how the curvilinear segment in the line object in the center of the view has been converted into points using coordinates at the beginning and end of the segment.  If we would like a sequence of many points that match the curve, we should first convert curvilinear segments to equivalent straight line segments using the Clean : convert curves to lines template.

 

See the Notes at the end of the Transform Pane topic for a discussion and illustration of how the points created by Convert : point are multipoints but the points created by Split : coordinates are all separate points in separate records.

 

 

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Expression

 

Transform - Geometry