pelias / api

HTTP API for Pelias Geocoder
http://pelias.io
MIT License
218 stars 162 forks source link

Problem with address parser (libpostal,elasticsearch) #1235

Open wsukta opened 5 years ago

wsukta commented 5 years ago

As I mantioned in title i have a some problem with parsing addresses corectly. I use Pelias geocoder in Poland where lots of address don't have a street name. So my problem is that when i want to geocode for exampe address "192 Droginia " where "Droginia " is name of village and "192" i house number the geocoder does not return correct value or return nothing, despite the fact that in the database there is such an addressees with specified coordinates (Openaddress data). If i geocode address with street name ever everything work correctly. The next problem is that when i try to geocode the addres above the api automaticaly change the parser from "libpostal" to "addressit" despite the fact that i set up in pelias.json file the "text_analyzer" to libpostal. I tested this on Pelias in Docker and Pelias installed locally.

localhost:3100/v1/search?text=192%20Droginia and api returned : {"id":"pl/malopolski:3778b66c6a4ae1fa","gid":"openaddresses:address:pl/malopolski:3778b66c6a4ae1fa","layer":"address","source":"openaddresses","source_id":"pl/malopolski:3778b66c6a4ae1fa","name":"192 Ulica Śląska","housenumber":"192","street":"Ulica Śląska","postalcode":"00-000","confidence":0.1,"match_type":"unknown","distance":34.144,"accuracy":"point","label":"192 Ulica Śląska"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[19.920276,49.995343]},"properties":{"id":"pl/malopolski:2ded7004c99d9bc9","gid":"openaddresses:address:pl/malopolski:2ded7004c99d9bc9","layer":"address","source":"openaddresses","source_id":"pl/malopolski:2ded7004c99d9bc9","name":"192B Ulica Zakopiańska","housenumber":"192B","street":"Ulica Zakopiańska","postalcode":"00-000","confidence":0.1,"match_type":"unknown","distance":17.553,"accuracy":"point","label":"192B Ulica Zakopiańska"}},{"type":"Feature","geometry": but there is not this point that i woud like to geocode and have in database the record from database :

LON : 20.0059715 | LAT : 49.8475493 |NUMBER: 192 |STREET   | UNIT   |CITY: Droginia |DISTRICT: myślenicki, Myślenice |REGION: małopolskie |POSTCODE: 00-000 |ID: 56495543 |HASH: 2ddf2ac613d44ded |  

If i geocode address with street name everething work corectly. What should i do to fix this problem ? Thanks for help in advance.

orangejulius commented 5 years ago

Hey @w0jtis, This looks like its related to https://github.com/pelias/pelias/issues/642, where others are discussing how to work with places in Czechia that don't have a street name.

Right now, officially, Pelias requires a street name, but we're considering making it optional, to support cases like yours.