Segments to polygons
Functionality
The Segments to Polygons operation automatically polygonizes a supposedly error free segment map. The operation is designed to be used after you have imported vector files from another package. All segments in the segment map must be connected to other segments or to themselves (islands) by nodes; dead ends, self overlap and/or intersections are not allowed. A mask can be specified to polygonize specific segments.
A polygon is a list of a linked segments representing the (complete) boundary of an area. Provinces, soil units, cadastral lots and other mapping units can be stored as polygons. Polygon maps are generally used as a stepping stone to raster maps.
A segment map may contain different classes or IDs representing different 'layers'. From each segment class name/ID and from sets of class names/IDs, you can create different polygon maps. By selecting a mask the user specifies the segment class names/IDs that are to be used to create a polygon map.
Topological polygonization vs. non-topological polygonization:
When using the Segments to Polygons operation, you can choose whether use topological polygonization or non-topological polygonization.
You should select topological polygonization when:
- you digitized the segments in ILWIS,
- you wish to polygonize imported segments and when you are sure that each segment can be used both to define the boundary of a polygon to its left and a polygon to its right (topological structure).
Before the segments will be polygonized, they are first checked on dead ends, self overlap and intersections, see below.
You should select non-topological polygonization when:
- you imported non-topological polygons (e.g. DXF) into ILWIS earlier on, and now wish to polygonize the segment map which is the result of the import. In this type of segment maps, each segment has only 1 node (serving both as begin node and as end node), and each segment encloses exactly 1 polygon. Neighbouring polygons thus do not share the same segment as their boundary (non-topological structure).
Only segments with a single node will be polygonized.
Tip:
You can check the structure of the segment map for instance by:
- Open the segment map you wish to check in the Segment editor;
- Select a segment:
- if the segment is just a part of the boundary of a complete future polygon, you may have the topological structure;
- if the segment seems a nice boundary of a complete future polygon, you may have the non-topological structure as meant above;
Check for some other segments as well.
- Go to Move Points mode and zoom in a bit.
Take a node and move it a bit away, then redraw the map:
- if the segment just seems relocated and no other line appears on the previous position, you may have the topological structure;
- if the moved segment is relocated but when also another line appears on the position from where you just moved the segment (segment seems to be 'double'), you may have the non-topological structure as meant above.
- When the checks and criteria in steps 2 and 3 are true for the same thing (either topological or non-topological), you can draw the conclusion.
- When you have the non-topological structure of 1 node per segment, the segment check Closed Segments in the segment editor should not give any errors.
- Don't forget to Undo All Changes in the segment editor; then close the editor.
Segment check during topological polygonization:
Prior to the actual topological polygon creation, segments are checked for possible topological errors. Segment checking is carried out in three steps:
- Self overlap check: to check whether a segment crosses itself (finding flase polygons);
- Dead ends check: to check whether begin and end nodes of segments are properly snapped to other nodes;
- Intersections check: to check whether different segments which cross each other have a node at the intersection.
Optionally, you can use the Auto Correction option to automatically remove any errors that may be encountered during the Check Segment phase:
- false polygons will be automatically deleted;
- segments which exactly overlay another segment will be deleted;
- dead end segments will be deleted;
- crossing segments will be split and snapped to each other.
Erroneous segments will only be deleted from a temporary copy of the input segment map, not from the input segment map itself.
If Auto Correction is not selected, the program will stop with an error message when a topological error is encountered.
Note:
As the user has no control over the Auto Correction procedure, it is advised to polygonize segments within the Segment editor where you can correct errors yourself.
Naming the polygons:
Polygons can be named using different methods:
- Label Points: you need to specify a point map which contains the label points for the polygons. Each polygon will obtain the class name, ID or value of the point that is found to be located in a polygon.
- Unique Identifiers: the polygons will be automatically and sequentially named as Pol 1, Pol 2, etc. These polygon names will be stored by the output map (internal UniqueID domain).
- Segment Codes (only available for non-topological polygonization): each polygon will obtain the name of the segment which encloses that polygon.
- Domain (mainly used when segments are polygonized from within the segment editor): the user has to specify a domain which will be linked to the output polygon map. The output polygons will not have names yet. After polygonization, you need to assign names to the polygons manually, i.e. edit the polygon map. For more information, see Segment editor : polygonize.
Input map requirements:
No special requirements for the input segment map.
If the Label Points option is selected, the point map with the labels and the segment map should use the same or a compatible coordinate system. When the coordinate systems of the input maps are different (e.g. different projections) but compatible, the point coordinates will be transformed to the coordinate system of the segment map.
Domain and coordinate system of output map:
Domain of output polygon map:
- When the Label Points option is used, the output polygon map will use the same domain as the specified point map containing the labels.
- When the Unique Identifiers option is used, the Unique IDs will be stored by the output map, i.e. the output map will use an internal Unique ID domain. For more information on internal domains, see How to open and edit internal domains.
- When the Segments option is used, the output polygon map will use the same domain as the input segment map.
- When, in the segment editor, the Domain option is used, the output polygon map will use the specified domain.
The output polygon map will use the same coordinate system as the input segment map.
See also:
Segments to polygons : dialog box
Segments to polygons : command line
Segments to polygons : algorithm
Segment editor : check segments
Segment editor : polygonize