address (gis_geocode)
Wialon allows determining coordinates by address as well as determining the address by coordinates. To get the address knowing the coordinates, use the following request:
https://geocode-maps.wialon.com/<host>/gis_geocode?coords=[{"lon":<double>,"lat":<double>}]&city_radius=<uint>&
dist_from_unit=<uint>&txt_dist="<text>"&flags=<uint>&uid=<long>&gis_sid="<text>"&search_provider="<text>"
The
Parameters
The required parameters are marked with an asterisk (*).
Name | Description |
---|---|
coords* | Array of coordinates [{"lon":<double>,"lat":<double>}]. |
city_radius | Minimum city radius, km. If no city is found within the maximum distance from the unit (the following option), the address will be associated with another city. In this parameter, you can specify the minimum size of a city that should be used to form the address. This helps to exclude small cities from addresses. |
dist_from_unit | Maximum distance from the unit, km. If the unit is located near the road and there is a city, town, or village within the indicated distance, then the road name and the distance to this city will be shown in the address line. |
txt_dist | Units of measurement for the maximum distance from the unit. |
flags* | Flags of the output format (see below). |
uid | ID of the current user. Deprecated, always use gis_sid. |
gis_sid* | Unique ID of the user session. |
search_provider* | Provider name. Possible values of search_provider are google, sygic, yandex, here, trimble. |
lang | Language. |
house_detect_radius | If the nearest address is a street, a house is searched for at a distance of house_detect_radius (25 meters by default) in order to specify the location on this street if possible. If the house is found and the street of the house coincides with the street where the object was found, the house is taken as the address. Otherwise, only the street is taken. |
The default address format is: 45321 (street, house, city, region, country). You can change it using the digits from 1 to 5:
Digit | Description |
---|---|
1 | Country |
2 | Region |
3 | City |
4 | Street |
5 | House |
For formatting use any of these digits five or fewer times. This output format is placed into flags according to the following algorithm: any digit is specified by 3 bits, beginning from bit 31. It means that the maximum quantity of the involved bits equals to 15 (from 31 to 17).
Format | Decimal | Binary | Result |
---|---|---|---|
45321 | 1255211008 | 0 100 101 011 010 001 0000000000000000 | Street, house, city, region, country. |
45 | 1241513984 | 0 100 101 000 000 000 0000000000000000 | Street, house. |
33333 | 920322048 | 0 011 011 011 011 011 0000000000000000 | City, city, city, city, city. |
Additional flags
Value | Description |
---|---|
512 | Return MGRS data. |
Error codes
Error code | Description |
---|---|
1 | Invalid session. |
4 | Wrong input parameters. |
6 | Unknown error. |
7 | Access denied, unknown provider. |
Response
["<text>"] /* array of addresses */