[postgis-devel] [PostGIS] #832: Wrong line from ST_Difference
PostGIS
trac at osgeo.org
Wed Feb 16 01:26:29 PST 2011
#832: Wrong line from ST_Difference
------------------------+---------------------------------------------------
Reporter: aperi2007 | Owner: pramsey
Type: defect | Status: closed
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Resolution: invalid | Keywords:
------------------------+---------------------------------------------------
Changes (by aperi2007):
* status: new => closed
* resolution: => invalid
Comment:
I try ST_IsValid(..)
MULTILINESTRING((50 50,50 50),(50 150,50 200))
gasp, Is valid !
I wrong guess because I know these other was invalid:
ST_IsValid(ST_GeomFromText('LINESTRING(50 50,50 50)')) => false
and also
ST_IsValid(ST_GeomFromText('MULTILINESTRING((50 50,50 50))')) => false
so ST_IsValid() give that
MULTILINESTRING((50 50,50 50),(50 150,50 200)) is valid
meanwhile
MULTILINESTRING((50 50,50 50)) is not valid
ok, because "De gustibus non disputandum est"
I return to the ticket :)
Perhaps is better I explain better because I think this is a problem.
Infact running this complex query
on a windows machine with postgres 9.0.3 and postgis 2.0.0 trunk
{{{
select
id,
st_intersection(b.geom,st_exteriorring(a.geom)),
b.geom
from
table_polygons as a,
table_linestrings as b
where
a.id = b.id
and
st_containsproperly(a.geom,b.geom)=false
and
st_crosses(b.geom,a.geom)=true
;
}}}
I'm having this error:
ERROR: lwcollection_construct: mixed dimension geometries: 2/0
analyzing the data I guess the problem was generated
from
st_intersection(b.geom,st_exteriorring(a.geom))
when encounter a linestring that return a point exactly on the boundary of
a polygon.
So I see these problem and perhaps wrongly open a ticket on the problem
of
MULTILINESTRING((50 50,50 50),(50 150,50 200))
I think is preferrable to close this ticket and open a specific ticket.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/832#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-devel
mailing list