Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Collision detection in large regions

Hi Eric,

This is a great question. I do have a suggested approach using GeoHashes. For a given resolution, GeoHashes define a way to index longitude/latitude rectangles of the same 'size'*. Odd resolution GeoHashes are a bit easier to work with since they are 'square'.

Assuming that the SimpleFeature's geometry is a point, then each feature is in one GeoHash. If you pick a GeoHash resolution small enough, then any objects within X meters would be within one GeoHash.

With that resolution, in Spark, you could output 9 tuples for the SimpleFeature with its GeoHash (and the adjacent ones). With all those tuples, then groupBy GeoHash. Inside each group, you can compute the actual distances between features and implement the business logic.

Does that sound reasonable? (It should be pretty similar to Chris's suggestion.)

Cheers,

Jim

* Each rectangle has the same dimensions in terms of degrees of longitude/latitude.

On 3/1/2016 7:05 AM, Eric Ahlberg wrote:
Hi,

I have an application where I intend to perform collision detection between items in a very large region (potentially the whole world). To avoid calculating all possible combinations, I intend only to detect collisions between nearby items.

With GeoMesa and Spark, is it possible to construct a query for this kind of use case in an efficient manner or will it become a simple brute force search? What I'd like is something like "for all items, perform collision detection in a range of X meters".

Greatful for any kind of input or pointers to other suitable alternatives!
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.locationtech.org/mailman/listinfo/geomesa-users



Back to the top