mvexel / overpass-api-python-wrapper

Python bindings for the OpenStreetMap Overpass API
Apache License 2.0
359 stars 89 forks source link

Wrapper doesn't return OSM Feature version. #155

Closed viksuper555 closed 4 months ago

viksuper555 commented 1 year ago

Introduction:

Each feature in OSM contains a version property of type int, which defines how many changes were applied to the feature. image

Problem:

This property is currently not passed back to the caller, even with the verbosity="meta" flag.

Reproduction sample:

api = overpass.API(timeout=500) response = api.get('way[name="Belsenplatz"];', responseformat="geojson", verbosity="meta")

Expectations:

response.get('features')[0] to contain the version property. It currently doesn't.

mvexel commented 5 months ago

If you request an element with verbosity="meta" you do get the OSM version number as well as the other OSM metadata elements:

>>> api.get("node(1)", verbosity="meta")
{"features": [{"geometry": {"coordinates": [13.569003, 42.795719], "type": "Point"}, "id": 1, "properties": {"communication:microwave": "yes", "communication:radio": "fm", "description": "Radio Subasio", "frequency": "105.5 MHz", "man_made": "mast", "name": "Monte Piselli - San Giacomo", "tower:construction": "lattice", "tower:type": "communication", "uid": 29598, "user": "owene", "version": 33}, "type": "Feature"}], "type": "FeatureCollection"}
mvexel commented 4 months ago

going to close this b/c the version info is available as described above