Opened 15 years ago
Closed 15 years ago
#397 closed defect (invalid)
Defect in within function
Reported by: | svenanders | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | postgis | Version: | 1.4 |
Keywords: | Cc: |
Description
I have two boundarys , first one is Schleswig Holstein a state of Germany the second one is the village "Hohe Elbe." There are both from OpenStreetMap. Hohe Elbe is in Schleswig Holstein but the Within function tells is always false.
select sh.geom=GeomUnion(hoElbG.geom,sh.geom) as union, Within(hoElbG.geom,sh.geom),Within(sh.geom,hoElbG.geom), hoElbG.geom=intersection(hoElbG.geom,sh.geom) as intersection, isvalid(hoElbG.geom),isvalid(sh.geom) from boundary_test hoElbG, boundary_test sh where hoElbG.id=158057 and sh.id=51529;
gives
union | within | within | intersection | isvalid | isvalid
t | f | f | t | t | t
POSTGIS="1.4.1" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.6.0, 21 Dec 2007" USE_STATS Postgresql 8.3 Debian lenny.
Attachments (1)
Change History (3)
by , 15 years ago
Attachment: | boundary_test.sql added |
---|
comment:1 by , 15 years ago
There is a slight sliver of the small geometry that extends beyond the bounds of the large one:
select st_astext(st_difference(b.geom, a.geom)) from (select geom from boundary_test where id = 51529) a, (select geom from boundary_test where id = 158057) b;
POLYGON(( 10.3251428466302 53.4497880952386, 10.3250776 53.4498083,10.3251442 53.4497893, 10.3251428466302 53.4497880952386))
Replace the '=' with ST_Equals in your test matrix above to get a more reliable test.
comment:2 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
pg_dump of the table