Bases: catatom2osm.geo.layer.base.BaseLayer
Base class for polygon layers.
Clean geometries.
Delete invalid geometries and close vertices, add topological points and simplify vertices.
Delete invalid geometries.
Test if any of it acute angle vertex could be deleted. Also removes zig-zag and spike vertex (see Point.get_spike_context).
Split multipolygons.
Creates a new WKBPolygon feature for each part of any WKBMultiPolygon feature in request. This avoid relations with many ‘outer’ members in OSM data set. From this moment, localId will not be a unique identifier for buildings.
Auxiliary indexes for adjacency of geometries.
(list) groups of adjacent polygons (dict) feature id: geometry
Auxiliary indexes for contact of geometries.
(list) groups of polygons with at least one common node (dict) feature id: geometry
Auxiliary indexes for vertex of geometries.
(dict) parent fids for each vertex, (dict) geometry for each fid.
Called before reproject.
Return True if a segment is used by another geometry.
Given a dictionary of parents per vertex check if segment va-vb in geometry of feature with id ‘feature_id’ is shared with another geometry.
Merge groups of fids from geometries.
groups (list) – groups of adjacent polygons
geometries (dict) – feature id: geometry
sort (lambda or None) – key to sort group
reverse (bool) – reverse sort if True
split (bool) – split multipart geometries if True
feature id: geometry changed geometries
(dict)
Reduce the number of vertices in a polygon layer.
Delete vertex if the angle with its adjacents is near of the straight angle for less than ‘straight_thr’ degrees in all its parents.
Delete vertex if the distance to the segment formed by its parents is less than ‘cath_thr’ meters.