How to use other reverse geocoding providers

IoSonoPiero4 years ago

Hello people,
I've used with success Google, LocationIQ and Nominatim provider.

In documentation page regarding Reverse Geocoding, I've seen you can use the following providers, too:

  • MapQuest
  • Bing Maps
  • Factual
  • Geocode.xyz
  • Here
  • MapMyIndia
  • TomTom
  • PositionStack

My question is: how?
I think I need a 'geocoder.url' and 'geocoder.key'.
For the key, no problem, just register for the provider and use it.
But for the URL, where can I get it? How can I get it?

There is someone that currently Bing Maps or Here maps?
Someone can help me, please?

I'm currently using Google, but in a few months, I'll be billed 5$/month for the usage.
So, I'm looking for a different solution, excluding LocationIQ and Nominatim that works ok, but in my region give a very generic response when I ask for position.

Anton Tananaev4 years ago

For most of those providers you don't need URL.

IoSonoPiero4 years ago

Hello Anton,
ok, thanks.

I'm not so skilled, so I'm trying to understand what parameters every service need.
Until now, I've checked that following services:

  • Here Maps - API key only - here as geocoder.type
  • Mapquest - API key only - mapquest as geocoder.type

I'm putting that here for people like me.
If someone can help me populate this, I'll be glad.

IoSonoPiero4 years ago

Updated list:

  • Here Maps - API key only - here as geocoder.type
  • Mapquest - API key only - mapquest as geocoder.type
  • TomTom - API key only - tomtom as geocoder.type

Until now, TomTom gives me better results and for low volumes of request is completely free!!!

Thanks, Anton for your great job!!

Anders Yuran4 years ago

I have just tested Tomtom and it give me correct address, But it gives it in Greek, which is the official language here. Can that be changed?

After translating the address I have changed back because TomTom only give village and country. Google also give street

ritesh2 years ago

What is the url for tomtom in reverse geocoding? I am getting Geocoder network error - HTTP 404 Not Found when

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>tomtom</entry>
<entry key='geocoder.key'>---</entry>
Anton Tananaev2 years ago

Looks correct. Try URL like this with your coordinates and the key (replace placeholders including square brackets):

https://api.tomtom.com/search/2/reverseGeocode/[lat],[lon].json?key=[key]
IoSonoPiero2 years ago

Hello people. Using the URL Anton showed, I got the correct JSON in the browser.
But, if I try to click on "Show Address" in WebApp, I get into tracker-server.log:

2022-12-12 19:17:50  WARN: Geocoder network error - HTTP 404 Not Found - NotFoundException (... < JsonGeocoder:126 < ServerResource:89 < ...)
Anton Tananaev2 years ago

That's the URL Traccar uses, so I'm not sure why the difference. You double-checked the coordinates?

IoSonoPiero2 years ago

Yes, Anton. I got the coordinates directly from the LOG. I can share my data with you if needed.

Anton Tananaev2 years ago

Feel free to email us the details for a quick check.

IoSonoPiero2 years ago

Done right now. You can find the email I sent to the support email address.

Anton Tananaev2 years ago

I think I know what the problem is. Try removing geocoder.url from the default config file or adding geocoder.url to your config.

IoSonoPiero2 years ago

I can confirm that removing:

geocoder.url key

from default.xml file in /opt/traccar/config, I correctly get the position in webapp.

Just a question: if I'd like to put it into traccar.xml file,
what do I need to put in?
From https://www.traccar.org/reverse-geocoding/ I can't see the value related to TomTom.

Anton Tananaev2 years ago

The value should be

https://us1.locationiq.com/v1/reverse.php