cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.1k stars 3.81k forks source link

geo/geomfn: implement ST_DistanceSpheroid({geometry,geometry,spheroid}) #48922

Open otan opened 4 years ago

otan commented 4 years ago

Implement ST_DistanceSpheroid on arguments {geometry,geometry,spheroid}, which should adopt PostGIS behaviour.

Observers: Please react to this issue if you need this functionality.

For Geometry builtins, please do the following:

You can follow #48552 for an example PR.

The following additional guidance has been issued on implementing this function:

use PROJ library to interpret spheroid

:robot: This issue was synced with a spreadsheet by gsheets-to-github-issues by otan on 2023-09-03T23:16:38Z. Changes to titles, body and labels may be overwritten.

timgraham commented 4 years ago

Was it an oversight that the spheroid argument to ST_DistanceSpheroid isn't implemented (if I read your commit correctly)?

I'm seeing unknown signature: st_distancespheroid(geometry, geometry, string) for a query like:

SELECT ...
FROM "distapp_australiacity"
WHERE ST_DistanceSpheroid(
    "distapp_australiacity"."point",
    ST_GeomFromEWKB('\x0101000020e6100000c3f5285c8f6a6240f0164850fc7045c0'::bytea),
    'SPHEROID["WGS 84",6378137.0,298.257223563]'
) <= ("distapp_australiacity"."radius" * 70)
otan commented 4 years ago

Oops