Open fsteeg opened 5 years ago
@acka47: Are you aware of any replacement for https://wdq.wmflabs.org/api?
We have our own Pelias instance running at http://aither.hbz-nrw.de:3100/v1/search. I think it contains map data for the whole DACH area, doesn't it @dr0i?
See the documentation for reverse geocoding with Pelias at https://github.com/pelias/documentation/blob/master/reverse.md.
Hmm, looks broken to me, see e.g. http://aither.hbz-nrw.de:3100/v1/search/?text=ehrenfeld or http://aither.hbz-nrw.de:3100/v1/reverse?point.lat=50.63057899475098&point.lon=7.055196762084961
Testing it with the newly set up geo index (see https://github.com/hbz/lobid-organisations/issues/419), it already looks quite good: http://gaia.hbz-nrw.de:4000/v1/reverse?point.lat=50.63057899475098&point.lon=7.055196762084961
However, we obviuosly should exclude a lot of data from the index as restaurants etc. are currently part of the index:
{
"type":"Feature",
"geometry":{
"type":"Point",
"coordinates":[
7.055463,
50.630557
]
},
"properties":{
"id":"node/2178633594",
"gid":"openstreetmap:venue:node/2178633594",
"layer":"venue",
"source":"openstreetmap",
"source_id":"node/2178633594",
"name":"Merler Hof",
"confidence":0.8,
"distance":0.019,
"accuracy":"point",
"label":"Merler Hof"
}
}
For example, "layer": "venue"
should be excluded.
Hmm, I tried around with it a bit more but can not get it to work. Generally, we want a results with layers=locality
. But if I set this parameter, I won't get anything at all, even when adding a larger radius (I guess) with boundary.circle.radius
, e.g. http://gaia.hbz-nrw.de:4000/v1/reverse?point.lat=50.63057899475098&point.lon=7.055196762084961&layers=locality&boundary.circle.radius=100.
Maybe it would be best to first query with layers=address
Unfortunately, the results do not include a locality name, see the first result from http://gaia.hbz-nrw.de:4000/v1/reverse?point.lat=50.63057899475098&point.lon=7.055196762084961&layers=address:
{
"type":"Feature",
"geometry":{
"type":"Point",
"coordinates":[
7.055118,
50.630773
]
},
"properties":{
"id":"way/222172874",
"gid":"openstreetmap:address:way/222172874",
"layer":"address",
"source":"openstreetmap",
"source_id":"way/222172874",
"name":"39 Godesberger Straße",
"housenumber":"39",
"street":"Godesberger Straße",
"postalcode":"53340",
"confidence":0.8,
"distance":0.022,
"accuracy":"point",
"label":"39 Godesberger Straße"
}
}
You can hopefully lookup the address by (g)id to get the locality but I have not found out yet how...
Reason: https://wdq.wmflabs.org/api is gone (redirects to https://query.wikidata.org).
See map at https://nwbib.de/search?location=50.63057899475098%2C7.055196762084961
Should be
Merl
, but is1 Ort
(the failure fallback).