K
K
kambulovd2019-11-22 09:40:29
satellite navigation
kambulovd, 2019-11-22 09:40:29

MongoDB. How to organize a search by gps coordinates?

Good afternoon. I have MongoDB and am having some issues with it.
1) In what format is it best to store gps coordinates in mongodb, for further search on them?
2) I use Java, how to organize the search for the necessary gps coordinates (stored in Mongo) that are included in a given circle? I will be very grateful if you give an example

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2019-11-22
@firedragon

Details here. In short, in Mongo (as in any other database) there is a special data type.
On the backend, you simply run queries
https://docs.mongodb.com/manual/geospatial-queries/
Distance calculation example
https://docs.mongodb.com/manual/tutorial/calculate...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question