[postgis-devel] [PostGIS] #397: Defect in within function

PostGIS trac at osgeo.org
Fri Jan 29 10:08:51 PST 2010


#397: Defect in within function
------------------------+---------------------------------------------------
 Reporter:  svenanders  |       Owner:  pramsey
     Type:  defect      |      Status:  new    
 Priority:  medium      |   Milestone:         
Component:  postgis     |     Version:  1.4    
 Keywords:              |  
------------------------+---------------------------------------------------
 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.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/397>
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