pyguymer3.geo.clean¶
- pyguymer3.geo.clean(shape, /, *, debug=True, prefix='.', tol=1e-10)[source]¶
Clean a shape
This function cleans a shape by removing bad points.
- Parameters:
shape (shapely.coords.CoordinateSequence, shapely.geometry.polygon.LinearRing, shapely.geometry.linestring.LineString, shapely.geometry.multilinestring.MultiLineString, shapely.geometry.polygon.Polygon, shapely.geometry.multipolygon.MultiPolygon) – the shape
debug (bool, optional) – print debug messages
prefix (str, optional) – change the name of the output debugging CSVs
tol (float, optional) – the Euclidean distance that defines two points as being the same (in degrees)
- Returns:
cleans – the cleaned shape
- Return type:
shapely.coords.CoordinateSequence, shapely.geometry.polygon.LinearRing, shapely.geometry.linestring.LineString, shapely.geometry.multilinestring.MultiLineString, shapely.geometry.polygon.Polygon, shapely.geometry.multipolygon.MultiPolygon
Notes
According to the Shapely documentation for the function shapely.geometry.polygon.orient() :
“A sign of 1.0 means that the coordinates of the product’s exterior ring will be oriented counter-clockwise.”
Copyright 2017 Thomas Guymer [1]
References