[postgis-tickets] [PostGIS] #4290: bug in Postgis geodetic code impacting distance calculation with geography multipolygon

PostGIS trac at osgeo.org
Thu Jan 10 06:53:24 PST 2019


#4290: bug in Postgis geodetic code impacting distance calculation with geography
multipolygon
---------------------------+---------------------------
  Reporter:  dmkaplan2000  |      Owner:  pramsey
      Type:  defect        |     Status:  new
  Priority:  medium        |  Milestone:  PostGIS 2.5.2
 Component:  postgis       |    Version:  2.4.x
Resolution:                |   Keywords:
---------------------------+---------------------------

Comment (by pramsey):

 Test that ignores cache code line and exposes that the problem is for
 MULTIPOLYGON in the tree distance code line
 {{{
 SELECT t1.gid AS gid1, t2.gid AS gid2,
        ST_Distance(t1.geom,t2.geom) AS dist_lonlat,
        ST_Distance(ST_Transform(t1.geom,26918),
                    ST_Transform(t2.geom,26918)) AS dist_utm,
        _ST_DistanceTree(t1.geom::geography,t2.geom::geography) AS
 dist_geography_tree,
        _ST_DistanceUncached(t1.geom::geography,t2.geom::geography) AS
 dist_geography_uncached,
        _ST_DistanceTree(ST_GeometryN(t1.geom,1), ST_GeometryN(t2.geom,1))
 AS dist_geography_tree_simple,
        _ST_DistanceUncached(ST_GeometryN(t1.geom,1),
 ST_GeometryN(t2.geom,1)) AS dist_geography_uncached_simple
 FROM tt t1, tt t2
 WHERE t1.gid=1 AND t2.gid=3;
 }}}

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