Polygons to points
Algorithm
The Polygons to points operation creates a point for each polygon in the polygon map. Each point obtains the class name, ID, or value of the corresponding polygon. In this way, polygon label points are created. Optionally, you can also obtain label points for polygons which have no class name, no ID or no value, i.e. for undefined polygons.
Label points:
For each polygon:
- The Y-coordinate of a label point is determined as the mean value of the minimum and maximum Y-coordinate used by the polygon. In other words, the Y-coordinate of the label point will be positioned on the horizontal middle line of the polygon.
- In case the polygon is convex, the X-coordinate of a label point is determined as the mean of the minimum and maximum X-coordinate used by the polygon.
- In case the polygon is concave, it is possible that the horizontal middle line is cut into several pieces by the polygon boundary. Then, the X-coordinate of the label point is positioned at the middle of the longest piece of the horizontal middle line inside the polygon.
This means that:
- for circular polygons, the label point lies more or less at the center of the polygon;
- for vertical half-moon shaped polygons, the label point lies in the middle of the broader part of the polygon.
- for horizontal half-moon shaped polygons, the label point lies in one of the tips of the half-moon.
- for hour-glass shaped polygons, the label point may lie at the narrowest part of the polygon.
- for polygons containing one or more islands, the label point may lie at a narrow part close to an island.
When you are not satisfied with the position of a label point, display the polygon boundaries and the label points in the same map window, break the dependency link of the point map, and use the Point editor to move a label point to another position.
See also:
Polygons to points : functionality