[postgis-devel] [PostGIS] #832: Wrong line from ST_Difference
PostGIS
trac at osgeo.org
Tue Feb 15 15:03:35 PST 2011
#832: Wrong line from ST_Difference
-----------------------+----------------------------------------------------
Reporter: aperi2007 | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
-----------------------+----------------------------------------------------
I notice this strange results:
If I try this sql:
{{{
SELECT ST_AsText(
ST_Difference(
ST_GeomFromText('LINESTRING(50 49.9999999999999, 50 200)'),
ST_Intersection(ST_GeomFromText('LINESTRING(50 50, 50
150)'),ST_GeomFromText('POLYGON((30 50, 30 150, 70 150, 70 50, 30 50))')
)
));
}}}
the result is:
MULTILINESTRING((50 49.9999999999999,50 50),(50 150,50 200))
----
Instead if I add another digit:
{{{
SELECT ST_AsText(
ST_Difference(
ST_GeomFromText('LINESTRING(50 49.99999999999999, 50 200)'),
ST_Intersection(ST_GeomFromText('LINESTRING(50 50, 50
150)'),ST_GeomFromText('POLYGON((30 50, 30 150, 70 150, 70 50, 30 50))')
)
));
}}}
the result is:
MULTILINESTRING((50 50,50 50),(50 150,50 200))
----
and if I add another digit again
{{{
SELECT ST_AsText(
ST_Difference(
ST_GeomFromText('LINESTRING(50 49.999999999999999, 50 200)'),
ST_Intersection(ST_GeomFromText('LINESTRING(50 50, 50
150)'),ST_GeomFromText('POLYGON((30 50, 30 150, 70 150, 70 50, 30 50))')
)
));
}}}
the result is:
LINESTRING(50 150,50 200)
----
I guess the second result is not correct because it return a
multiline with a point.
I'm using debian lenny 32 bit with postgres 9.0.1 and Postgis trunk
r6824 and geos svn r3222
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/832>
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