[postgis-tickets] [PostGIS] #4835: ST_Distance returning wrong results near the pole

PostGIS trac at osgeo.org
Wed Feb 17 16:26:36 PST 2021


#4835: ST_Distance returning wrong results near the pole
-----------------------------+---------------------------
  Reporter:  matthiasheuser  |      Owner:  pramsey
      Type:  defect          |     Status:  new
  Priority:  high            |  Milestone:  PostGIS 3.1.2
 Component:  postgis         |    Version:  3.1.x
Resolution:                  |   Keywords:
-----------------------------+---------------------------

Comment (by pramsey):

 Just going to store this here for future use
 {{{
 WITH foo AS (
         SELECT
         'POINT(0 90)'::geography as p1,
         'LINESTRING(15.55 78.216667, -166.11 68.875)'::geography as l1,
         ST_Segmentize('LINESTRING(15.55 78.216667, -166.11
 68.875)'::geography, 5) as l2,
         ST_Segmentize('LINESTRING(15.55 78.216667, -166.11
 68.875)'::geography, 10) as l3
         )
 SELECT
 _ST_DistanceUnCached(p1, l1) as dist_p1_l1,
 _ST_DistanceUnCached(p1, l2) as dist_p1_l2,
 _ST_DistanceUnCached(p1, l3) as dist_p1_l3
 FROM foo;
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4835#comment:6>
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