Custom geodecoder

Leif Neland4 years ago

In Denmark we have the public API

https://dawa.aws.dk/adgangsadresser/reverse?y=55.33&x=10.479290&struktur=mini

It returns

{
  "id": "0a3f5089-c51f-32b8-e044-0003ba298018",
  "status": 1,
  "darstatus": 3,
  "vejkode": "8022",
  "vejnavn": "Stavkærvej",
  "adresseringsvejnavn": "Stavkærvej",
  "husnr": "86",
  "supplerendebynavn": "Thorup",
  "postnr": "5220",
  "postnrnavn": "Odense SØ",
  "stormodtagerpostnr": null,
  "stormodtagerpostnrnavn": null,
  "kommunekode": "0461",
  "x": 10.48426028,
  "y": 55.33118031,
  "href": "https://dawa.aws.dk/adgangsadresser/0a3f5089-c51f-32b8-e044-0003ba298018",
  "**betegnelse**": "Stavkærvej 86, Thorup, 5220 Odense SØ"
}

betegnelse is the item to be displayed, if it should not be built from the individual data items
Can that be configured directly in traccar?

Or should I write a proxy to transform its output to one of the standards implemented in traccar?
I should probably modify the output to omit the house number if the input location is more than x meters from the found address.

As this is only valid in Denmark, if I make a proxy, it should check if the location is in Denmark, and fallback to another locater.

Anton Tananaev4 years ago

It can't be used directly, but you can add a new geocoder class.