Expand description
Map generalization operators following the ICA (International Cartographic Association) taxonomy.
This module implements three canonical generalization operations:
§Collapse
Reduces a polygon or short line below a minimum-size threshold to a representative point (the geometric centroid or midpoint). This mirrors the ICA “collapse” operator which converts areal/linear features to point symbols when they are too small to be rendered at the target scale.
§Exaggerate
Scales a polygon or linestring outward (or inward, for scale < 1) from an anchor point, thereby making the feature visually larger without moving its symbolic location. Corresponds to the ICA “exaggeration” operator used e.g. for roads or buildings that would otherwise disappear at small scales.
§Displace
Resolves positional conflicts between point symbols that are too close together by iteratively pushing overlapping positions apart until all pairwise distances exceed a minimum separation. Corresponds to the ICA “displacement” operator.
§References
- Mackaness, W., Ruas, A. & Sarjakoski, L.T. (2007) Generalisation of Geographic Information: Cartographic Modelling and Applications. ISPRS Book Series, Elsevier.
- Ruas, A. (1998) “OO-Generalisation with a multi-agent system”, in Proceedings of the 8th International Symposium on Spatial Data Handling, pp. 325–337.
Structs§
- Collapse
Options - Options that govern when a feature is considered small enough to collapse.
- Displace
Options - Options for the iterative displacement solver.
- Displace
Stats - Summary statistics returned after the displacement solver finishes.
- Exaggerate
Options - Options controlling the exaggeration transform.
Enums§
- Exaggerate
Anchor - Specifies the fixed point from which exaggeration is applied.
Functions§
- collapse_
linestring_ to_ point - Collapses
lineto its arc-length midpoint when the line’s total Euclidean length falls below the configured threshold. - collapse_
polygon_ to_ point - Collapses
polyto its area-weighted 2-D centroid when the polygon’s absolute area falls below the configured threshold. - displace_
points - Displaces a mutable slice of point coordinates so that all pairwise
distances are at least
options.min_distance. - displace_
polygons_ by_ centroid - Displaces a mutable slice of polygons by operating on their centroids.
- exaggerate_
coord - Applies an affine scale-from-anchor transform to a single coordinate.
- exaggerate_
linestring - Exaggerates every vertex of
linefrom its computed (or specified) anchor. - exaggerate_
polygon - Exaggerates all rings of
polyuniformly from the polygon’s anchor. - should_
collapse_ polygon - Returns
truewhen the polygon’s absolute planimetric area is strictly belowoptions.min_polygon_area, i.e. the polygon should be collapsed.