Reverse geocoding for traccar 4.4 - nominatim

Pratik Sharma 7 years ago

Hi,

I tried changing the config file (referred https://www.traccar.org/reverse-geocoding/) and restarted the services. But the 'Show Address' says "Reverse geocoding is not enabled - RuntimeException (ServerResource:59 < ...)"

My config file looks like this:

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>https://nominatim.openstreetmap.org/reverse</entry>

initially trying with nominatim

Gonzalo Parada 7 years ago

Hi, use only

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>

Restart service.

Pratik Sharma 7 years ago

Hi Gonzalo Parada,

Still getting the same error even after removing geocoder.url and restarting the services

Anton Tananaev 7 years ago

Which config file are you modifying?

Pratik Sharma 7 years ago

traccar.xml

Anton Tananaev 7 years ago

You must be missing something because "Reverse geocoding is not enabled" means that you don't have those lines in the config.

Pratik Sharma 7 years ago

This is what my entire traccar.xml looks like:

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <entry key="config.default">./conf/default.xml</entry>

    <entry key='web.port'>80</entry>

    <entry key='geocoder.enable'>false</entry>

    <entry key='database.driver'>com.mysql.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost/traccar?allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>myusername</entry>
    <entry key='database.password'>mypassword</entry>

    <entry key='server.timeout'>120</entry>

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
</properties>
Anton Tananaev 7 years ago

Have you looked through it yourself first?

<entry key='geocoder.enable'>false</entry>
...
<entry key='geocoder.enable'>true</entry>
Pratik Sharma 7 years ago

oops my bad!

Rectified it but still says the same,

my config file looks:

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <entry key="config.default">./conf/default.xml</entry>

    <entry key='web.port'>80</entry>

    <entry key='geocoder.enable'>true</entry>

    <entry key='geocoder.type'>nominatim</entry>

    <entry key='database.driver'>com.mysql.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost/traccar?allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>root</entry>
    <entry key='database.password'>root</entry>

    <entry key='server.timeout'>120</entry>
    
</properties>

and I am using :

sudo systemctl stop traccar.service
sudo systemctl start traccar.service
Pratik Sharma 7 years ago

Can someone please help me out, I am unable to get it even with the above config file