In a memory database supporting spatial query

I am trying to solve the "Find the point of interest" problem in java. those. I have a few lats, a lot of gap points. And I want to find those who say 800 meters. Assuming I know my current lat and log.

My problem is that this application should be standalone. Therefore, I cannot rely on a spatial database query to find results, for example. using mysql I found this useful: http://xebee.xebia.in/2010/10/28/working-with-geolocations/

Currently, I cannot find in memeory db that supports spatial queries. I was going to resort to using R-Tree something like http://jsi.sourceforge.net/

But I know that this will not be right, given the fact that he is using a fix, not a cirical search.

Are there any recommendations?

+6
source share
2 answers

Actually the jsi library (http://jsi.sourceforge.net) is perfect for this problem. It was written to support this exact scenario.

When searching for the closest rectangles (or points) you can provide the maximum distance, and it will return the results in increasing order of distance.

It does not support the request "return every point within a radius of 800 m", but in practice you need a limit. Thus, the jsi library supports the more useful "returning the nearest 50 points within a radius of 800 m."

If you really want every point in the radius, you can increase the number of points to a large number and run the closest queryN, or execute the intersection query and filter by distance in your own code.

+1
source

The database has a database called Altibase, which supports Spatial functions. It complies with the OGC specification. You can use it.

+1
source

Source: https://habr.com/ru/post/913873/


All Articles