[postgis-users] Point on a surface doesn`t touch geometry?

Kai Behncke Kai-Behncke at gmx.de
Wed Apr 29 04:26:16 PDT 2009


Dear Martin, Regina, Niloas,

thank you very much for your answers :-)

Meanwhile I solved the problem using:


SELECT overlaps (the_geom,buffer(Geomfromtext('POINT(897169.996155569
 6850066.73917209)',900913),1)) from ways where gid=14730;

Then I get "TRUE".


Best regards, Kai


-------- Original-Nachricht --------
> Datum: Tue, 28 Apr 2009 08:28:42 -0700
> Von: Martin Davis <mbdavis at refractions.net>
> An: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
> Betreff: Re: [postgis-users] Point on a surface doesn`t touch geometry?

> Also, the point probably doesn't lie *exactly* on the geometry due to 
> roundoff error.
> 
> It's correct that Overlaps returns FALSE, since an interior point does 
> not overlap its containing geometry.  Intersects should have returned 
> TRUE however - IF the point was precisely on a line segment.  This is 
> unlikely to happen in the general case.
> 
> Nicolas Ribot wrote:
> >> Dear users,
> >>
> >>
> >> with "SELECT astext(pointOnSurface(the_geom)) from ways where
> gid=14730"
> >> I get the coordinates of a point that lies on the surface of a
> MULTILINESTRING.
> >>
> >> I get: POINT(897169.996155569 6850066.73917209)
> >>
> >> Then I try
> >> SELECT overlaps (the_geom,Geomfromtext('POINT(897169.996155569
> 6850066.73917209)',900913)) from ways where gid=14730;
> >>
> >> ...and I get FALSE ???
> >>
> >> (I also tried with "touches" and "intersects" --> the
> >> result there also FALSE).
> >>
> >>
> >> Has anybody an idea how this can be?
> >>
> >>     
> >
> > Hi Kai,
> > Yes, this can be because of the OGC specifications, that define very
> > precisely these predicates, in terms of relationship between interior,
> > boundary and exterior of each object.
> > A point cannot overlap a polygon, for instance (as far as I remember)
> > Looking at the predicates definitions in the specifications may help
> > to understand what they mean, for each kind of objects (points, lines,
> > polygons):
> >
> > http://www.opengeospatial.org/standards/sfs
> >
> > (don't trust your 'human' understanding of what 'touches' or 'overlaps'
> mean)
> >
> > You may also look at the Jump documentation, as it contains nice
> > graphics showing some common misunderstandings with these predicates
> > (http://www.vividsolutions.com/JUMP/)
> >
> > HTH
> > Nicolas
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> >   
> 
> -- 
> Martin Davis
> Senior Technical Architect
> Refractions Research, Inc.
> (250) 383-3022
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01



More information about the postgis-users mailing list