This commit is contained in:
Andras Schmelczer 2026-07-03 18:39:34 +01:00
parent 1ee796b282
commit ab688243d7
36 changed files with 307 additions and 135 deletions

View file

@ -21,7 +21,7 @@ from tqdm import tqdm
logger = logging.getLogger(__name__)
MIN_AREA_SQM = 5_000 # ~70m x 70m skip pocket parks and small ponds
MIN_AREA_SQM = 5_000 # ~70m x 70m: skip pocket parks and small ponds
# OSM tags that indicate non-residential green/water areas
GREENSPACE_TAGS = {
@ -108,7 +108,7 @@ class GreenspaceHandler(osmium.SimpleHandler):
return
# Invalid geometries are often the largest, most complex park/water
# multipolygons (self-touching rings from OSM) repair like pois.py
# multipolygons (self-touching rings from OSM): repair like pois.py
# rather than silently dropping them. make_valid may return a
# GeometryCollection with stray lines/points; keep only the polygons.
if not geom.is_valid:
@ -161,7 +161,7 @@ def main():
df.write_parquet(args.output)
print(f"Saved to {args.output}")
else:
print("No geometries found skipping output")
print("No geometries found, skipping output")
if __name__ == "__main__":