aspectumapp / osm2geojson

Convert OSM and Overpass XML/JSON to GeoJSON
MIT License
97 stars 15 forks source link

Converting poligons and swapping/reordering issue #22

Closed cad0p closed 3 years ago

cad0p commented 3 years ago

Hi, I had to solve the issue of converting polygons of boundaries for municipalities but I was writing in Python, so I'm sharing here my solution for the need of swapping and reordering Polygons: https://gist.github.com/cad0p/463c805d93f48351d824e46cb8c98af6

arenzano_bad rapallo_bad

Let me know if this is useful!

rapkin commented 3 years ago

Hi. You mean that output of osm2geojson has problems with converting to polygon?

cad0p commented 3 years ago

Hi, I haven't tested osm2geojson since it starts from xml instead of json

rapkin commented 3 years ago

I should say that JSON !== GeoJSON. Osm2geojson uses XML or JSON as input format (XML and JSON from Overpass). Also osm2geojson uses Shapely to cope with complex situations with geometry. So I don't think that your solution is relevant for this project :)