traccar icon indicating copy to clipboard operation
traccar copied to clipboard

On demand reverse geocoding not saving addrrsses

Open karls4 opened this issue 8 years ago • 12 comments

When running a trips report the on demand reverse geocoding works great but if I run that report again it has to request them addresses again.

It would be great if we could save these to save requests and costs.

karls4 avatar Feb 04 '18 21:02 karls4

As a partial solution, you can enable geocoder cache (geocoder.cacheSize). It is in memory address cache, works until server restart. It might help to save you some requests.

Abyss777 avatar Feb 05 '18 06:02 Abyss777

Hi @Abyss777, when running a routes report the addresses all come back as undefined.

Is it possible to request these when running the report the same as the trips report works?

Thanks

karls4 avatar Feb 21 '18 11:02 karls4

No, it is currently not implemented. Why do you need this? Such reports will produce a lot of geocoding requests and slow down route report generating.

Abyss777 avatar Feb 21 '18 11:02 Abyss777

It still works out cheaper in the long run to request these and save them instead of saving every address that comes into the server.

Would it be possible to implement this and turn it on/off using a parameter in the config?

Thanks

karls4 avatar Feb 21 '18 12:02 karls4

image

As you can see the amount of reverse geocoding is considerably less since I have implemented your changes to work with onrequest which is great.

karls4 avatar Feb 21 '18 12:02 karls4

I still do not understand why do you need address in every position in Route report? You can click on desired and request it, but why you need all?

Abyss777 avatar Feb 21 '18 12:02 Abyss777

I do get what you are saying but some users/use cases are different from what you imagine.

Would this be something you would be willing to implement?

karls4 avatar Feb 21 '18 16:02 karls4

Doing reverse geocoding for every location would most likely cause request to timeout in browser because it will require a lot of requests to third party service.

tananaev avatar Feb 21 '18 19:02 tananaev

It doesn't look like there's much interest. What is the use case to requesting same reports repeatedly?

tananaev avatar Jul 11 '22 17:07 tananaev

When running large reports it often failed. Instead of having to run the geocoder everytime it could of saved it.

I think if we get an address for coordinates at any stage it should be saved in the database for future reference

karls4 avatar Jul 12 '22 16:07 karls4

If you have failing reports, it should probably be fixed first instead. Is there any other valid reason?

tananaev avatar Jul 12 '22 16:07 tananaev

I run my own custom reports on data extracted from Traccar. We use a Nominatim local database for reverse coding, installed on the same server. Much faster than lookups across the internet.

tshelver avatar Jul 12 '22 19:07 tshelver