[postgis-tickets] [PostGIS] #2918: Use GeographicLib functions for ST_Azimuth, ST_Distance and ST_Project

PostGIS trac at osgeo.org
Thu Sep 11 03:36:26 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):

 More testing with ST_Area on
 [http://thematicmapping.org/downloads/TM_WORLD_BORDERS-0.3.zip with this
 more detailed shapefile] shows very different results of comparisons of
 area from both difference of areas in km² and in %. Here are some  samples
 of these results:

  * -0.2264 km² -0.01968% MB Martinique
  * -4.7335 km² -0.00038% ML Mali
  * -3.9577 km² -0.00020% MX Mexico
  * -2.2862 km² -0.00002% US United States
  * 0.0000 km² 0.00000% AY Antarctica
  * 0.0022 km² 0.00075% SC Saint Kitts and Nevis
  * 0.5005 km² 0.00001% CA Canada
  * 1.1292 km² 0.00001% CH China
  * 6.5751 km² 0.00056% NG Niger
  * 6.6234 km² 0.00156% YM Yemen
  * 0.0127 km² 0.01337% AV Anguilla
  * 0.1483 km² 0.02382% IM Isle of Man

 As with the earlier simplified world borders, the errors have a mean close
 to zero, but they are different for the same countries in simplified and
 detailed datasets, so I don't think there is much bias of latitude in the
 Vincenty's vs. Karney's methods. However, it does indicate that there are
 errors in one or both calculations, which is expected. I can't say which
 errors are worse, unless I can find a slower/more precise geodesic method
 to test against.

 Using the detailed world borders mentioned above, I've run some
 performance tests, which similarly shows that Karney's methods are about
 twice as slow as Vincenty's. E.g.:
 {{{
 SELECT ST_Area(geog) INTO UNLOGGED foo FROM world;
 }}}
 which is (on typical average) 539 ms for Vincenty's and 1144 ms for
 Karney's method.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2918#comment:9>
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