Reverse Geocode less data

jaimzj9 years ago

Dear Anton,

I setup own Nominatim instance, When I do a query on the reverse geocode url I get the complete output, with street,city,state,country etc. in the display_name object.

However I have given Traccar the same url/server, However Traccar stores only this much info

Road, State, Country.

Please advice how to handle this.

jaimzj9 years ago

Data returned by Nominatim, I feel The nominatim related code, does not have all this objects included right?

{
"place_id":"3xxx",
"licence":"Data © OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright",
"osm_type":"way",
"osm_id":"99xxx",
"lat":"19.xxxxx",
"lon":"72.xxxxx",
"display_name":"xxxx Road, xxxx ar 1, xxxxxxon East, xxxxxx xxxg, xxxxxx xxxxxy, xxxxxxxa, xxx65, xxxxa",
"address":{
"road":"xxxx Road",
"neighbourhood":"xxxx ar 1",
"suburb":"xxxxxxon East",
"hamlet":"xxxxxx xxxg",
"county":"xxxxxx xxxxxy",
"state":"xxxxxxxa",
"postcode":"xxx65",
"country":"xxxxa",
"country_code":"xn"
}
}
Anton Tananaev9 years ago

You can use "geocoder.format" configuration parameter to change format. For more info see:

https://github.com/tananaev/traccar/blob/master/src/org/traccar/geocode/AddressFormat.java

jaimzj9 years ago

I am unable to understand how to write the format. could you please show me a small sample.

<entry key='geocoder.format'>%h %r, %t, %s, %c</entry>

Did I understand it correct,? and also If I want to use parameters from nominatim such as ,

neighbourhood, hamlet, etc how do I set those?

Anton Tananaev9 years ago

You already have a sample. Other parameters are not available, but I can add extra if required.

jaimzj9 years ago

Yes please can you add the whole list of parameters from the one I shared in my 2nd post in this thread?

Anton Tananaev9 years ago

No, I can't. I need explanation of what those mean and why they should be part of the address.

jaimzj9 years ago

I have shortened it and tried to explain below.

"display_name":"Topaz Road, Mira, Kashmimira, Greater Bombay, Maharashtra, 401104, India",
"address":{
"road":"Topaz Road", 
"suburb":"Mira", 
"village":"Kashmimira", 
"county":"Greater Bombay",
"state":"Maharashtra",
"postcode":"401104",
"country":"India",
"country_code":"in"
}

display_name : Is the summarised address in whole. (This maybe not required).

I am listing below whats missings, specially for regions such as India, Bangladesh, Nepal, Sri-Lanka, Pakistan, Philipines, Vietnam where these parameters will come in use.
suburb : A sub area within a locality of a radius of 10 to 20km.
village : This is self explainatory, however a cluster of suburbs were also given a village name. and still exists.

county : In the case of Nominatim County is of ut-most importance as the whole of a city is identified by the county parameter (Such as Mumbai,) So if county is not included We only know the state which and street, thus the address is of no use. (Village also plays a key role in many cases to identify the city name.)

Anton Tananaev9 years ago

I'm sure it's possible to map those to existing parameters like "state", "district", "settlement" and "suburb".