[postgis-tickets] [PostGIS] #2638: geography ST_Intersects bugginess with Polygon/multilinestring M

PostGIS trac at osgeo.org
Wed Feb 5 22:51:46 PST 2014


#2638: geography ST_Intersects bugginess with Polygon/multilinestring M
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.5
Component:  postgis  |     Version:  2.1.x        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by robe):

 definitely some instability here -- run on postgis 2.2

 {{{
 PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 32-bit
 POSTGIS="2.2.0dev r12228" GEOS="3.4.2-CAPI-1.8.2 r0" PROJ="Rel. 4.8.0, 6
 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8"
 LIBJSON="UNKNOWN" RASTER
 }}}


 {{{
 SELECT ST_Intersects(geog1, geog2) As g1_in_g2, ST_Intersects(geog2,geog1)
 As g2_in_g1, _ST_DistanceUncached(geog1,geog2) As dist_unc
  , _ST_DistanceTree(geog1,geog2) As dtree_g1_g2
  , _ST_DistanceTree(geog2,geog1) As dtree_g2_g1
 FROM ST_GeogFromText('MULTILINESTRING M ((-71.0821 50.3036 1,50 -71
 1),(-56.0821 50.3036 1,50 -56 1),(-41.0821 50.3036 1,50 -41 1),(-26.0821
 50.3036 1,50 -26 1),(-11.0821 50.3036 1,50 -11 1),(3.9179 50.3036 1,50 4
 1),(18.9179 50.3036 1,50 19 1),(33.9179 50.3036 1,50 34 1),(48.9179
 50.3036 1,50 49 1),(-71.0821 50.3036 2,50 -71 2),(-56.0821 50.3036 2,50
 -56 2),(-41.0821 50.3036 2,50 -41 2),(-26.0821 50.3036 2,50 -26
 2),(-11.0821 50.3036 2,50 -11 2),(3.9179 50.3036 2,50 4 2),(18.9179
 50.3036 2,50 19 2),(33.9179 50.3036 2,50 34 2),(48.9179 50.3036 2,50 49
 2))') As geog1,
 ST_GeogFromText('MULTIPOLYGON M (((0 0 2,10 0 1,10 10 -2,0 10 -5,0 0
 -5),(5 5 6,7 5 6,7 7 6,5 7 10,5 5 -2)))') As geog2;
 }}}


 I got the same answer as 2.1.2dev the first run and on second run got this
 magical answer


 {{{
  g1_in_g2 | g2_in_g1 | dist_unc             | dtree_g1_g2 | dtree_g2_g1
 ----------+----------+----------------------+-------------+-------------
  t        | f        | 184534.350787176;0;0 |           0 |           0

 }}}

 which suggests the uncached distance may be unstable as well for this M
 thingy

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