Transform - Geometry: Topology

The Topology template appears in the template list when a geometry field, of type geom, geommfd, or geomwkb, has been picked in the Transform pane.  Using the clean (generalize) operation, the template adjusts object coordinates based on topological relationships.



Using the clean (generalize) operation, the template simultaneously adjust coordinates that define points, lines and areas to accomplish several tasks at once, considering all of the objects in the drawing.   Alters any clockwise rotation area boundary sequences to OGC style counter clockwise rotation boundaries.   Frequently used to prepare drawings for use as a network or for similar purposes.  Formerly known as Normalize Topology.    See the Normalizing Topology topic.


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



The clean (generalize) operation is most frequently used to correct topological errors such as spikes in vector shapes, but it is also handy as a generalization / simplification transform.


We begin with a drawing of Mexico that has been projected into Pseudo-Mercator projection.   The drawing appears as the only layer in a map.



With the focus on the open map window, we choose the Geom field and we double-click on the Topology template to launch it in the Transform pane.



In the Transform pane, clean (generalize) appears for the Operation.  We enter 25000 for Tolerance, leaving the Unit setting at the default Meter setting.


The Result is automatically set to New Table, the only allowed result choice.   We specify Generalized Mexico for the name of the New drawing to be created by the template, with an analogous name for the New table.   


Press Transform.


A new drawing and its table called Generalized Mexico appears in the Project pane.   We drag and drop the new Generalized Mexico drawing into the map as a layer:



The result forces coordinates to locations set by a proximity of 25000 meters from each other, which results in a simplification of shapes.  The result is free of overlaps and gaps because the generalization process considers the fitting of neighboring areas.  


See the Normalizing Topology topic for a more detailed discussion and a comparison to the Reshape : smooth transform operation.




Curvilinear segments - As a practical matter, most people doing GIS will use straight line segments for lines and areas.   Few GIS systems do a good job of supporting curved segments, so there is much less data published using curved segments.   Manifold's ability to work with curved segments allows us to use that data within Manifold in a limited way, at least for display and interactive editing.  


However, most processing tools in Manifold, such as Transform templates and various Geom SQL functions, do their work by first converting a curvilinear segment into a straight line segment between the same two start and finish coordinates.  That will often lead to weird or otherwise unexpected results.  To avoid such problems, first convert curvilinear segments into equivalent constellations of straight line segments at whatever resolution is desired, using the Clean transform template with the convert curves to lines operation option and the number of linear segments desired to approximate the curve in the Curve limit parameter.   See the Curved Segments discussion in the Drawings topic.


See Also

Transform Pane


Transform Reference


Transform - Expression


Transform - Geometry


Normalizing Topology