Re:RethinkDB 1.15: Geospatial queries
by danielmewes on Thursday September 25, 2014 @03:28PM
(#8369196)
> The implementation is based on the S2 library (https://code.google.com/p/s2-geometry-library/) also used by PostGIS, which AFAIK does spherical linear interpolation.
Note that RethinkDB actually doesn't use S2 for computing distances. S2 is used for computing intersections and for indexing though. (also as another poster already pointed out, S2 is not used by PostGIS)
Re:RethinkDB 1.15: Geospatial queries
by jimktrains2 on Thursday September 25, 2014 @03:47PM
(#8369315)
> Two dimensions. The commands are designed primarily with Earth geometry
Earth has elevations:)
Re:RethinkDB 1.15: Geospatial queries
by coffeemug on Thursday September 25, 2014 @04:04PM
(#8369429)
Yes, though most location-aware apps typically don't deal with those (yet :)) It would be a great addition, though.
Re:RethinkDB 1.15: Geospatial queries
by jimktrains2 on Thursday September 25, 2014 @04:23PM
(#8369530)
Very true:) I just found how you phrased it amusing:)
I don't mean to sound disparaging, for it's use-case it's a great addition:)
Not the OP, but I noticed:
> Commands to create points, lines, polygons and circles
All of the links in that sentence 404.
Thanks, will fix momentarily! EDIT: fixed, thanks!
> How many dimensions are supported?
Two dimensions. The commands are designed primarily with Earth geometry in mind to help people build location-aware apps.
> Also, does this support many projections, or just a few.
It supports WGS84 (a commonly used ellipsoid model) or a unit sphere. Currently you can't use a plane. Check out http://rethinkdb.com/api/javascript/get_nearest/ for an example.
> Does this do a correct interpolation of degrees to meters along the path
The implementation is based on the S2 library (https://code.google.com/p/s2-geometry-library/) also used by PostGIS, which AFAIK does spherical linear interpolation.
> Are there commands to export WKT or WKB?
No, currently only GeoJSON (which you could later post-process and export to other formats with existing tools). This is a great idea, though, if there is more demand for it we'll definitely add other exporters.
EDIT: all great questions, I opened an issue in the doc repo (https://github.com/rethinkdb/docs/issues/521) -- we'll address all of these in the docs.