Use Nominatim LocationIQ

smsoousa8 years ago

Hello Anton, can you help me with the configuration to use the geocoder nominatim on the locationIQ server, I already browsed the configuration tab but did not get answers, I also did a previous search for the site and found nothing that could help me. I use the configuration but the address does not appear, returning to google geocoder, it returns to normal operation.

Currently I used the following settings, but both to no avail:

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>http://locationiq.org/v1/reverse</entry>
<entry key='geocoder.key'>My Key Api</entry>

and

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>http://locationiq.org/v1/reverse.php</entry>
<entry key='geocoder.key'>My Key Api</entry>

Can you help me? Thanks in advance

smsoousa8 years ago

I'm using version 3.10

Anton Tananaev8 years ago

This is the right config:

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>http://locationiq.org/v1/reverse.php</entry>
<entry key='geocoder.key'>KEY</entry>
smsoousa8 years ago

I did the procedure correctly, but the address still does not appear for me.

Anton Tananaev8 years ago

Are there any errors in the log?

smsoousa8 years ago
2017-03-15 21:00:32 DEBUG: [9801BBAA: 5001 > 177.79.31.115] HEX: 4f4e
2017-03-15 21:00:35 DEBUG: [9801BBAA: 5001 < 177.79.31.115] HEX: 696d65693a3435393731303034303433313938342c747261636b65722c3137303331363039303033332c2c462c3031303032382e3030302c412c303330312e333433372c532c30363030302e343933312c572c302e30302c303b
2017-03-15 21:00:35  WARN: Geocoding failed - Empty address - GeocoderException (JsonGeocoder:74 < ...)
2017-03-15 21:00:35  INFO: [9801BBAA] id: 459710040431984, time: 2017-03-15 21:00:28, lat: -3.02240, lon: -60.00822, speed: 0.0, course: 0.0
2017-03-15 21:01:32 DEBUG: [9801BBAA: 5001 < 177.79.31.115] HEX: 3435393731303034303433313938343b
2017-03-15 21:01:32 DEBUG: [9801BBAA: 5001 > 177.79.31.115] HEX: 4f4e
2017-03-15 21:01:35 DEBUG: [9801BBAA: 5001 < 177.79.31.115] HEX: 696d65693a3435393731303034303433313938342c747261636b65722c3137303331363039303133332c2c462c3031303132392e3030302c412c303330312e333433372c532c30363030302e343933312c572c302e30302c303b
2017-03-15 21:01:35  WARN: Geocoding failed - Empty address - GeocoderException (JsonGeocoder:74 < ...)
2017-03-15 21:01:35  INFO: [9801BBAA] id: 459710040431984, time: 2017-03-15 21:01:29, lat: -3.02240, lon: -60.00822, speed: 0.0, course: 0.0
2017-03-15 21:02:32 DEBUG: [9801BBAA: 5001 < 177.79.31.115] HEX: 3435393731303034303433313938343b
2017-03-15 21:02:32 DEBUG: [9801BBAA: 5001 > 177.79.31.115] HEX: 4f4e
2017-03-15 21:02:35 DEBUG: [9801BBAA: 5001 < 177.79.31.115] HEX: 696d65693a3435393731303034303433313938342c747261636b65722c3137303331363039303233332c2c462c3031303232382e3030302c412c303330312e333433372c532c30363030302e343933312c572c302e30302c303b
2017-03-15 21:02:35  WARN: Geocoding failed - Empty address - GeocoderException (JsonGeocoder:74 < ...)
2017-03-15 21:02:35  INFO: [9801BBAA] id: 459710040431984, time: 2017-03-15 21:02:28, lat: -3.02240, lon: -60.00822, speed: 0.0, course: 0.0
2017-03-15 21:03:32 DEBUG: [9801BBAA: 5001 < 177.79.31.115] HEX: 3435393731303034303433313938343b
2017-03-15 21:03:32 DEBUG: [9801BBAA: 5001 > 177.79.31.115] HEX: 4f4e
2017-03-15 21:03:35 DEBUG: [9801BBAA: 5001 < 177.79.31.115] HEX: 696d65693a3435393731303034303433313938342c747261636b65722c3137303331363039303333332c2c462c3031303332392e3030302c412c303330312e333433372c532c30363030302e343933312c572c302e30302c303b
2017-03-15 21:03:35  WARN: Geocoding failed - Empty address - GeocoderException (JsonGeocoder:74 < ...)
2017-03-15 21:03:35  INFO: [9801BBAA] id: 459710040431984, time: 2017-03-15 21:03:29, lat: -3.02240, lon: -60.00822, speed: 0.0, course: 0.0
2017-03-15 21:04:32 DEBUG: [9801BBAA: 5001 < 177.79.31.115] HEX: 3435393731303034303433313938343b
2017-03-15 21:04:32 DEBUG: [9801BBAA: 5001 > 177.79.31.115] HEX: 4f4e
2017-03-15 21:04:35 DEBUG: [9801BBAA: 5001 < 177.79.31.115] HEX: 696d65693a3435393731303034303433313938342c747261636b65722c3137303331363039303433332c2c462c3031303432392e3030302c412c303330312e333433372c532c30363030302e343933312c572c302e30302c303b
2017-03-15 21:04:35  WARN: Geocoding failed - Empty address - GeocoderException (JsonGeocoder:74 < ...)
2017-03-15 21:04:35  INFO: [9801BBAA] id: 459710040431984, time: 2017-03-15 21:04:29, lat: -3.02240, lon: -60.00822, speed: 0.0, course: 0.0
Anton Tananaev8 years ago

It means that the Nominatim server doesn't return any address.

smsoousa8 years ago

Any chance for it to work? I could not clearly understand why I did not return any address

Anton Tananaev8 years ago

I use LocationIQ on some of my servers with exactly the same config and it works perfectly, so the problem is either with their server or you are missing something.

smsoousa8 years ago

The configuration of traccar.xml is correct, could it be some configuration not done on the server? I use the host1plus servers, would you recommend me? I have already used and tested

smsoousa8 years ago

My traccar.xml setting:

<entry key="config.default">./conf/default.xml</entry>
    
<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>http://locationiq.org/v1/reverse.php</entry>
<entry key='geocoder.key'>key</entry>

<entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
<entry key='database.url'>jdbc:mysql://localhost:3306/mydatabase?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>my_user</entry> 
<entry key='database.password'>my_passwd</entry>
    
<entry key='logger.enable'>true</entry>
<entry key='logger.level'>all</entry>
<entry key='logger.file'>./logs/tracker-server.log</entry>

<entry key='event.enable'>true</entry>
<entry key='event.overspeedHandler'>true</entry>
<entry key='event.overspeed.notRepeat'>true</entry>
<entry key='event.motionHandler'>true</entry>
<entry key='event.geofenceHandler'>true</entry>
<entry key='event.alertHandler'>true</entry>
<entry key='event.ignitionHandler'>true</entry>
<entry key='event.statusHandler'>true</entry>
<entry key='event.maintenanceHandler'>true</entry>
    
<entry key='processing.copyAttributes'>power,ignition,battery</entry>
<entry key='processing.copyAttributes.enable'>true</entry>	
    
<entry key='report.trip.minimalTripDistance'>1</entry>
<entry key='report.trip.minimalTripDuration'>30</entry>
    
<entry key='database.positionsHistoryDays'>120</entry>
Anton Tananaev8 years ago

I'm not sure what the problem, but I would recommend to send request from your server manually and see what you get in response.

As for your config, it looks very outdate. It's definitely not 3.10 config.

Ferdina Kusumah6 years ago

I Had same problem, the problem i think traccar use key instead token, cause traccar use ?key=xxxx instead ?token=xxxx.
may i missed something ?