[postgis-tickets] [PostGIS] #2918: Use GeographicLib functions for ST_Azimuth, ST_Distance and ST_Project
PostGIS
trac at osgeo.org
Mon Sep 8 16:09:43 PDT 2014
#2918: Use GeographicLib functions for ST_Azimuth, ST_Distance and ST_Project
---------------------+------------------------------------------------------
Reporter: mwtoews | Owner: pramsey
Type: patch | Status: new
Priority: medium | Milestone:
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
Comment(by mwtoews):
Looking at the existing Vincenty methods in PostGIS, it looks like "near
antipodal" is just under 1 mm distance away from the true antipode for
ST_Distance to provide reliable numbers, and about 100 m distance for
ST_Azimuth to provide reliable numbers. So it seems that "near antipode"
is a corner case.
More importantly, I'm yet to compare the results between existing
Vincenty's to Karney's methods. It is claimed that Vincenty's is less
accurate, but I'd like to quantify this figure. The round-off errors are
less than 15 nanometers. Also, the benchmarking done in Karney (2013) is
essentially the same what I've found for the inverse methods (ST_Distance,
ST_Azimuth): compare 2.34 μs to 1.34 μs for Vincenty's, or just over twice
as slow. So there were never claims that GeographicLib were faster than
existing methods. However, for things like ST_Segmentize for straight
lines, each additional point can be found in 0.37 μs. Section 7 of the
paper describes the implementation, and is a good and short read that is
highly relevant for this ticket.
I'll set-up `ptarray_area_spheroid` to do something similar to
[http://geographiclib.sourceforge.net/html/C/planimeter_8c_source.html the
`planimeter.c` example] to get a good idea of the area calculation
abilities. The error in the area calculation in GeographicLib is about 0.1
m².
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2918#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list