S
S
Sergey Saveliev2016-10-25 10:54:26
PHP
Sergey Saveliev, 2016-10-25 10:54:26

How to get an object knowing that there is a certain highway next to it?

In particular, I need cottage settlements. Since my searches did not return any results, I use php-yandex-geo :

$geo->setQuery('коттеджный поселок 12 месяцев симферопольское шоссе');
$geo->setLimit(1)->load();
$f = $geo->getResponse();

$collection = $f->getList();
foreach ($collection as $item) {
  $lat = $item->getLatitude();
  $lon = $item->getLongitude();
  break;
}

return isset($lat) ? $lat.','.$lon : '';

As a result, Yandex returns all the checkpoints it found, without the highway I specified. And if there is no CP as a result, then it displays the highway. I guess there's a lot I don't understand, it should be possible to get anything, up to the distance to the nearest highway and so on, but I can't find any examples. I would be grateful for any useful information in this direction.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2016-10-25
@freeExec

In a classical GIS, this would be like: find a highway, build a buffer around it with the size "nearby" and select "KP" objects from the objects included in it. The trouble with all Yande-Googles is that they can only be used in the way the developer intended. Step to the left, step to the right in logic and they are already useless.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question