skip over empty geometries (Issue #117)

Umap may create exports with empty geometries, containing

  "coordinates": []

Mapnik does not consider those geometries as valid, so we
now test for these and skip over them when generating the
converted GEOjson output for rendering
master
Hartmut Holzgraefe 2025-10-18 18:27:27 +00:00
rodzic b04960045a
commit 7fe57f1015
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -247,6 +247,8 @@ class UmapStylesheet(Stylesheet):
# now go over the actual geometry features in that layer
for feature in layer['features']:
if not feature['geometry']['coordinates']:
continue
try:
# feature properties override previous defaults
new_props = get_default_properties(feature, layer_defaults)