[postgis-tickets] [PostGIS] #2634: regression failure ST_DWithin between 2.0.4 and 2.1.2

PostGIS trac at osgeo.org
Tue Feb 4 15:48:09 PST 2014


#2634: regression failure ST_DWithin between 2.0.4 and 2.1.2
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.1.2
Component:  postgis  |     Version:  2.1.x        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by robe):

 With this one I am getting mixed results

 {{{
 CREATE TABLE test_geogs(gid integer, geog geography );
 INSERT INTO test_geogs(gid, geog)
 VALUES ( 1, 'MULTIPOINT Z (-10 40 1,-10 65 1,10 40 1,10 65 1,30 40 1,30 65
 1,50 40 1,50 65 1,-10 40 2,-10 65 2,10 40 2,10 65 2,30 40 2,30 65 2,50 40
 2,50 65 2,-10 40 3,-10 65 3,10 40 3,10 65 3,30 40 3,30 65 3,50 40 3,50 65
 3)'::geography ),
  (2, 'POLYGON((-9.1111111 40,-9.14954053919354
 39.6098193559677,-9.26335203497743 39.2346331352698,-9.44817187539491
 38.8888595339608,-9.6968975376269 38.5857864376269,-9.99997063396079
 38.3370607753949,-10.3457442352698 38.1522409349774,-10.7209304559677
 38.0384294391935,-11.1111111 38,-11.5012917440323
 38.0384294391935,-11.8764779647302 38.1522409349774,-12.2222515660392
 38.3370607753949,-12.5253246623731 38.5857864376269,-12.7740503246051
 38.8888595339608,-12.9588701650226 39.2346331352698,-13.0726816608065
 39.6098193559677,-13.1111111 40,-13.0726816608065
 40.3901806440322,-12.9588701650226 40.7653668647302,-12.7740503246051
 41.1111404660392,-12.5253246623731 41.4142135623731,-12.2222515660392
 41.6629392246051,-11.8764779647302 41.8477590650226,-11.5012917440323
 41.9615705608065,-11.1111111 42,-10.7209304559678
 41.9615705608065,-10.3457442352698 41.8477590650226,-9.9999706339608
 41.6629392246051,-9.69689753762691 41.4142135623731,-9.44817187539491
 41.1111404660392,-9.26335203497743 40.7653668647302,-9.14954053919354
 40.3901806440323,-9.1111111 40))'::geography);

 SELECT t1.gid As t1_gid, t2.gid As t2_gid
  , ST_DWithin(t1.geog, t2.geog,100)
  , ST_Distance(t1.geog, t2.geog) As dist
  , _ST_DistanceUncached(t1.geog,t2.geog) As dist_cache,
 _ST_DistanceTree(t1.geog, t2.geog) As dist_tree
 FROM test_geogs As t1 CROSS JOIN test_geogs As t2;


 }}}

 When run from pgAdmin the 1 x2 gives a st_dwithin: f and dist (
 75661.624157771)

 But 2, 1 gives the right answer of 0

 This is running on


 {{{
 SELECT version() || ' ' || postgis_full_version();

 PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 32-bit
 POSTGIS="2.1.2dev r12220" 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
 }}}


 I'm going to test next on my 64-bit.  I rarely test on my 32-bit but
 that's the only one I have 2.0.4 easily setup to compare.

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