Skip to content

Commit

Permalink
fix: Add support for GeoJson polygons
Browse files Browse the repository at this point in the history
  • Loading branch information
rsavoye committed Oct 10, 2024
1 parent 5c00184 commit 6102d12
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion osm_merge/utilities/geojson2poly.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ def main():
outfs.write("END\n")
index += 1
continue
else:
elif poly["geometry"]["type"] == "Polygon":
for coords in (poly["geometry"]["coordinates"][0]):
outfs.write(f" {str(coords[0])} {str(coords[1])}\n")
counter += 1
outfs.write("END\n")
elif poly["geometry"]["type"] == "LineString":
# It's a LineString
for coords in regions:
if type(coords) == list:
Expand Down

0 comments on commit 6102d12

Please sign in to comment.