luftdatenpumpe
luftdatenpumpe copied to clipboard
OSM: fields "category" and "type" importable?
When looking at a nominatim sample response I am keen to key:value pairs like "category":"highway" and "type":"motorway". Seems like line 44 in geo.py would that be the place to add this, but would be already enough?
Of course the intended interpretation (stations close to high-traffic roads) of these results could be easily misleading; maybe a high traffic-road is just at the junction of two roads (or the sensor is behind a big building).
Thanks for suggesting that.
It looks like these fields
category: "highway"
type: "motorway"
are only available when using the jsonv2
request format for Nominatim, see
- https://nominatim.openstreetmap.org/reverse?format=json&lat=-34.44076&lon=-58.70521 vs.
- https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=-34.44076&lon=-58.70521
However, the geopy package obviously uses the json
request format only, see
https://github.com/geopy/geopy/blob/1.20.0/geopy/geocoders/osm.py#L435-L439
I've just asked within https://github.com/geopy/geopy/issues/305#issuecomment-578976579 if there would be a chance to extend that package.