[postgis-users] Function ST_CONTAINS respectively CONTAINS does not find Start-Endpoints in MultiLineString

Obe, Regina robe.dnd at cityofboston.gov
Wed Oct 1 07:18:28 PDT 2008


Use Intersects.
 
SELECT Intersects(GeomFromEWKT('SRID=4326;MULTILINESTRING((7.0 50.0,8.0 51.0,9.0 52.0))'), (GeomFromEWKT('SRID=4326;POINT(7.0 50.0)')) );

________________________________

From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of pleasecontactmee at aim.com
Sent: Wednesday, October 01, 2008 10:01 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Function ST_CONTAINS respectively CONTAINS does not find Start-Endpoints in MultiLineString


Hello,

Can you please help me, where am I wrong by using the PostGIS Function "Contains(geometry A, geometry B)" (referring to chapter 6.1. OpenGIS Functions of PostGIS manual)
which delivers back only points within a MULTILINESTRING except "start-" and "endpoint" of it?

Here are some examples
This statement returns "false" even though the first POINT(7.0 50.0) is part of the MultiLineString
SELECT Contains (GeomFromEWKT('SRID=4326;MULTILINESTRING((7.0 50.0,8.0 51.0,9.0 52.0))'), (GeomFromEWKT('SRID=4326;POINT(7.0 50.0)')) );
e.g. the "middle" point delivers what I expect="true"
SELECT Contains (GeomFromEWKT('SRID=4326;MULTILINESTRING((7.0 50.0,8.0 51.0,9.0 52.0))'), (GeomFromEWKT('SRID=4326;POINT(8.0 51.0)')) );

What I need is a function which is able to find ONE point within a MULTILINESTRING which can be the first, last or a point between them.
I am using pgAdminIII v1.6.3, "PostgreSQL 8.2.5" and PostGIS Version "1.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"

Thank you very much,
Wolfgang 
________________________________

AOL eMail auf Ihrem Handy!Ab sofort können Sie auch unterwegs Ihre AOL email abrufen. Registrieren <http://www.aol.de/Webmail/>  Sie sich jetzt kostenlos.



-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081001/46ed8594/attachment.html>


More information about the postgis-users mailing list