How is the type generated (the way the location is determined) in the response from Yandex.The locator?

As far as I understand from the article on habr, when accessing the Yandex API.A locator with a request that contains both information about GSM networks and Wi-Fi networks, the service will determine the coordinates simultaneously for both GSM networks and Wi-Fi networks.

What is the way in which the location is determined, in this case, will be contained in the response from the service?

The documentation specifies three methods:

  • gsm-over mobile network cells.
  • wifi-by Wi-Fi access points.
  • ip-by IP address.

Is it true that if there is information about Wi-Fi in the request, the response will always specify the type "wifi"?

Or there may be situations when, if there is a small amount of information about Wi-Fi networks and a large amount of information about GSM networks, the service decides that using GSM networks, the coordinates are determined with less error, and the service response will contain the type "gsm", despite the presence of information about Wi-Fi networks?

Upd. Experimentally found out that even if there is information about Wi-Fi networks, the response can return the type " ip "or"gsm".

I selected 1000 points for which information about GSM networks and Wi-Fi networks is known, and sent three requests to Yandex for each of them.Locator:

  1. Over GSM networks
  2. Over Wi-Fi networks
  3. Over both GSM and Wi-Fi networks

~200 points if there is information about Wi-Fi networks, send type != "wifi". The coordinates that are obtained only via Wi-Fi differ from the combined data (GSM + Wi-Fi) by an average of ~ 100,000 meters. At the same time, for these ~200 points, the coordinates obtained via GSM + Wi-Fi almost always coincide with the coordinates obtained via GSM networks. The response to the GSM + Wi-Fi request contains the type "gsm". The response to the Wi-Fi request contains the type "ip", the coordinates correspond to Red Square in Moscow, the error is 100000.

I think this is due to the fact that the Yandex database does not it can contain information on all Wi-Fi points, so when the request contains information about unknown Wi-Fi points, the coordinates cannot be obtained.

The exception is 5 points, they have coordinates where GSM + Wi-Fi differs from both GSM (on average by ~3000 meters) and Wi-Fi (on average by ~100000 meters). The response to the GSM + Wi-Fi request contains the type "wifi"

Author: Vladimir Smirnov, 2018-11-28

1 answers

Is it true that if there is information about Wi-Fi in the request, the response will always specify the type "wifi"?

Right. If the request contains complete information, type will be set wifi. Even in the case of ambiguity resolution (for example, wifi "lit up" in two places), comparing with gsm data, type will be set wifi.

Accordingly, the type gsm will stand if there is no current wifi data. And ip will be in if there is no data on wifi and gsm.

Physical meaning is the most accurate data source that influenced the response.

 0
Author: neverd1m, 2018-11-29 12:38:50