earthobservations / luftdatenpumpe

Acquire and process live and historical air quality data without efforts. Filter by station-id, sensor-id and sensor-type, apply reverse geocoding, store into time-series and RDBMS databases, publish to MQTT, output as JSON, or visualize in Grafana. Data sources: Sensor.Community (luftdaten.info), IRCELINE, and OpenAQ.
https://luftdatenpumpe.readthedocs.io/
GNU Affero General Public License v3.0
35 stars 3 forks source link

OSM: fields "category" and "type" importable? #22

Open wetterfrosch opened 4 years ago

wetterfrosch commented 4 years ago

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).

amotl commented 4 years ago

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


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.