S
S
Santiago K2015-11-06 17:02:34
PHP
Santiago K, 2015-11-06 17:02:34

Is it possible to search for objects by coordinates?

There is a table of objects in the database, each has latitude / longitude coordinates. One object is taken, and you need to find other objects that are within a radius of 500 meters from it. Is it possible to make such a search by coordinates?
ps I don't mean search using api maps, namely the database, using coordinates

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nirvimel, 2015-11-06
@nirvimel

Под PostgreSQL существует PostGIS, который создан для рения задач, подобных вашей.
На русском о нем мало материалов, но кое-какие примеры есть тут и тут

E
Emil Revencu, 2015-11-06
@Revencu

I won’t say about the radius, but in a square of 500 meters you can

H
hostwell, 2015-11-06
@hostwell

can. there is a formula for calculating the distance between two geocoordinates. Find on the internet. But the request to the database will be complicated habrahabr.ru/post/179157

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question