]> granicus.if.org Git - postgis/commitdiff
st_dwithin(geog, geog, 0) doesn't work (#1264)
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 25 Apr 2012 18:49:42 +0000 (18:49 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 25 Apr 2012 18:49:42 +0000 (18:49 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9669 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography_measurement.c
regress/tickets.sql
regress/tickets_expected

index a8b859cf2177ce8bfee736abe64d0c0c9546b456..467c5e8455e61e401adf5ee33a0b45ebe586a45d 100644 (file)
@@ -156,7 +156,7 @@ Datum geography_dwithin(PG_FUNCTION_ARGS)
                PG_RETURN_BOOL(FALSE);
        }
 
-       PG_RETURN_BOOL(distance < tolerance);
+       PG_RETURN_BOOL(distance <= tolerance);
 }
 
 
index ba9dd89c26f16e01386808d3554b2a64c667d580..879e45f97640dca356617db0176fa6c5ed9d1cce 100644 (file)
@@ -588,6 +588,9 @@ select '#1042',round((st_ymax(st_minimumboundingcircle('LINESTRING(-1 -1, 1 1)')
 -- #1170 --
 SELECT '#1170', ST_Intersection( ST_GeogFromText( 'POINT(0 90)'), ST_GeogFromText( 'POINT(0 90)' ) );
 
+-- #1264 --
+SELECT '#1264', ST_DWithin('POLYGON((-10 -10, -10 10, 10 10, 10 -10, -10 -10))'::geography, 'POINT(0 0)'::geography, 0);
+
 -- #1398
 select '#1398a', st_astext(st_snaptogrid(st_project('POINT(-120 45)'::geography, 100000, radians(45))::geometry,0.000001));
 select '#1398b', st_astext(st_snaptogrid(st_project('POINT(20 85)'::geography, 2000000, radians(0.1))::geometry,0.000001));
index 8b4e0615a6a5dff2103783a9d47fba825026b938..24060f7c8569ed701f428c9f49d7d8eb1b777f2a 100644 (file)
@@ -194,6 +194,7 @@ ERROR:  AddToPROJ4SRSCache: could not parse proj4 string ''
 #1038|
 #1042|2
 #1170|0101000020E610000001000000000044C00000000000805640
+#1264|t
 #1398a|POINT(-119.093153 45.632669)
 #1398b|POINT(-160.137654 77.091608)
 #1543|MULTILINESTRING((0 0,10 0,10 10,0 0),(0 0))|POLYGON((0 0,10 10,10 0,0 0))