Closed jinzo closed 1 week ago
So I refactored the code as in the previous comment. Renamed Photon Geocoder to "standard" GeocodeJSON and refactored the Ban Geocoder based on it because Ban does not provide the country with it's output, and every other solution I thought about was worse. I changed the test (and Ban geocoder behaviour) in two ways:
name
is no longer used as a Street
name as this was plain wrong. name
is housenumber
+ street
in Ban, therefore it is correct to store/use them separately.context
is no longer used as District
, as this looks plain wrong too and we now store district
key that is provided with Ban in District
. The context is now discarded as I don't think this can be sanely fit into the current system.This changes make Ban geocoder more in line with what other Geocoders store in Address
but still does not break any actual running systems.
Merged, thank you.
This is a basic implementation of the open source Photon Geocoder for reverse geocoding. There isn't much documentation, but the source reveals that only the
lang
optional parameter is useful for Traccar. After some tests, it seems that the fields are mostly present always and there is little to no deviation (for example, Settlement is always in keycity
ect.)