4 ms·
Some of your documentation is 404ing. How many dimensions are supported? Also, does this support many projections, or just a few. I see "geoSystem: 'WGS84'" w
by jimktrains2 12y ago
Some of your documentation is 404ing.
How many dimensions are supported?
Also, does this support many projections, or just a few. I see "geoSystem: 'WGS84'" which isn't an EPGS identifier. Along those lines, are distance calculations done on a geodesic, a plane, or is that configurable (some projections are a planer, others aren't).
Also, what does this mean? geometry.distance(geometry[, {geoSystem: 'WGS84', unit: 'm'}]) Does this do a correct interpolation of degrees to meters along the path (again based on the projection) or is there a fixed constant?
EDIT: Are there commands to export WKT or WKB?
- coffeemug 12y ago> Some of your documentation is 404ing. 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/ 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/ 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 https://github.com/rethinkdb/docs/issues/521) -- we'll address all of these in the docs.
- TkTech 12y agoNot the OP, but I noticed: > Commands to create points, lines, polygons and circles All of the links in that sentence 404.
- coffeemug 12y agoThanks, fixed!
- danielmewes 12y ago> The implementation is based on the S2 library (https://code.google.com/p/s2-geometry-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)
- jimktrains2 12y ago> Two dimensions. The commands are designed primarily with Earth geometry Earth has elevations:)
- coffeemug 12y agoYes, though most location-aware apps typically don't deal with those (yet :)) It would be a great addition, though.
- jimktrains2 12y agoVery 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:)
- danielmewes 12y ago> Also, does this support many projections, or just a few. RethinkDB doesn't do any planar projections of spherical coordinates (if that's what you are asking for). There are many independent tools available to perform such projections if you need to draw a map or convert to a Euclidean coordinate system. As coffemug noted, WGS84 is not a projection but just a reference ellipsoid used for distance calculations along earth's surface. (Edit: Ok, I guess that can be considered a projection as in projection from earth's actual geometry onto an ellispoid. It's not a projection with respect to latitude and longitude though, if that makes sense.) > Along those lines, are distance calculations done on a geodesic Yes, along the geodesic between the two points on an oblate ellipsoid. We use the algorithm from Karney 2013, see http://charles.karney.info/biblio/papers/karney13-geod.pdf http://charles.karney.info/biblio/papers/karney13-geod.pdf > geometry.distance(geometry[, {geoSystem: 'WGS84', unit: 'm'}]) Does this do a correct interpolation of degrees to meters along the path (again based on the projection) Yes, again using Karney's algorithm (but not by doing a projection first).
- jimktrains2 12y ago> WGS84 is not a projection but just a reference ellipsoid used for distance calculations along earth's surface. Fair enough, it only handles a single GCS and no PCSs. WGS84 is more than just a datum, it is a GCS. It's also used for more than just distances; it defines a mean sea level used for elevation as well. WGS84 is also used to mean EPSG 4326, hence why I asked like I did. > There are many independent tools available to perform such projections if you need to draw a map or convert to a Euclidean coordinate system Sure there are, but if I can't import EPGS 4269 (NAD83, used by the census), EPGS 3857 (Spherical Mercator), a state plane, or a UTM data source without first converting it, then I need to know that.
- danielmewes 12y agoOk, got it. Guess I mis-represented what WGS84 in my earlier post. What I should have said is that in RethinkDB we only mean a specific reference ellipsoid for computing distances between latitude/longitude coordinate pairs when referring to WGS84. If you have data in other projections you will definitely have to convert it first. On a side-note, in case it's of any help: There is a currently undocumented feature that allows you to specify an oblate reference ellispoid other than the one from WGS 84 in ReQL. The way you do that is by passing an object `{a: ..., f: ...}` to the `geo_system` optional argument. The value of 'a' must be the major radius of the ellipsoid in meters, and 'f' must be the flattening of the ellipsoid. This feature is not heavily tested though and should be used with caution.