Open kronick opened 7 years ago
@kronick - thanks for putting this together.
I agree that the near
, within
and intersects
operators are good for evaluating options.
Looking over the geohashes post, my quick take-aways are:
Just as a reference, the current approach the DynamoDB branch is using in this repo is based on Quadkey indexes and stores the index fully in the RANGE.
Have you thought about using Neo4j? Here is a good article on geospatial indexing w/ neo4j-spatial (graph database).
cc @ryanbaumann @kronick
Motivation
Without duplicating the full feature set of a heavyweight spatial database like PostGIS, what spatial features and queries could we offer with Cardboard that would capture a significant number of spatial analytics use cases? How can we efficiently serve basic queries like:
What are the lowest-common-denominator features that would meet this challenge?
Two technical enablers
near
" filter with a min and max distance filterwithin
" filter that returns features contained entirely within an arbitrary query geometryintersects
" filter that returns features that intersect with an arbitrary query geometryWhat we don't need right now (or maybe ever)
near
,within
, andintersects
mapped to single API endpoints, that could be useful enough for many use cases.References
Geomesa, "an open-source, distributed, spatio-temporal database built on a number of distributed cloud data storage systems"
Spatial index library for DynamoDB - very old and Java-only bindings, but the core idea looks like it calculates and stores a Geohash for each feature, which can then efficiently be sorted to find nearby features
Details on how the above DynamoDB spatial index works
Another implementation of Geohashes on DynamoDB
Find Restaurants with Geospatial Queries, a tutorial on how to use Mongodb's spatial queries for a common use case
cc @mtirwin @YunjieLi @ryanbaumann @mcwhittemore