[postgis-devel] [PostGIS] #1625: ST_Within and ST_DWithin disagree
PostGIS
trac at osgeo.org
Tue Feb 28 09:25:15 PST 2012
#1625: ST_Within and ST_DWithin disagree
---------------------+------------------------------------------------------
Reporter: strk | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
Comment(by nicklas):
One way to quantify how much the two algorithms disagree is to see how
much the point have to be buffered to intersect with the line. The answer
seems in this case to be 0.0000000001 units which is far less than the
precision of the input.
{{{
select
st_intersects('010200000002000000B6813B20D7F92041F5807988B8AF014100000000D6F9204133333333BBAF0141'::geometry,st_buffer('010100000070841C1ED7F9204187A97F8DB8AF0141'::geometry,
0.0000000001));
}}}
This returns true
I have twisted my head when I was looking at #1502 to understand what is
right and what is wrong. I don't know, but to get consistent answers
beyond the precision of the input I guess is only possible if the approach
is identical (so the error is identical).
Does that make sense?
My conclusion is that we might have to start thinking about how to handle
tolerance and precision in generic terms.
From what I think SQL-Server is outputting their answers with far less
precision than double precision and in ArcGIS world you tell the system
what precision you want to use.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1625#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-devel
mailing list