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

Martin Davis mbdavis at refractions.net
Tue Apr 28 08:28:42 PDT 2009


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




More information about the postgis-users mailing list