mvexel / overpass-api-python-wrapper

Python bindings for the OpenStreetMap Overpass API
Apache License 2.0
368 stars 90 forks source link

Inner rings GeoJSONs are incomplete #163

Open mvexel opened 7 months ago

mvexel commented 7 months ago

Consider this query in Overpass Turbo.

Using Overpass Turbo's 'download as GeoJSON' function, we end up with this GeoJSON

As you can see, the inner rings of the polygons are defined as they are in the original OSM relation. They are not holes.

If we retrieve the same relation as GeoJSON using overpass:

import json
import overpass
api = overpass.API()
query = "rel(11038555);out;>;out;"
resp = api.get(query, responseformat="geojson")
json.dumps(resp)

...we get a polygon with holes instead.