[postgis-users] problem with multilinestring

TECHER Jean David davidtecher at yahoo.fr
Sun Feb 8 03:50:49 PST 2004


hi

perhaps you should use contains() with your query

TECHER Jean David
Tél: 06-85-37-36-75
e-mail: davidtecher at yahoo.fr
Site PostGIS: http://techer.pascal.free.fr/postgis/index.htm


>-----Message d'origine-----
>De : postgis-users-bounces at postgis.refractions.net
>[mailto:postgis-users-bounces at postgis.refractions.net]De la part de
>Vladimir Guzmán
>Envoyé : dimanche 8 février 2004 00:34
>À : postgis-users at postgis.refractions.net
>Objet : [postgis-users] problem with multilinestring
>
>
>Hello.
>
>I've got a table named 'arcos', with a MULTILINESTRING geometry named
>'the_geom'.
>
>I need to get the elements that starts or ends at a certain point.
>
>If I query the database with "SELECT the_geom FROM arcos WHERE id=51892;"
>
>I get:
>                                                              the_geom
>-------------------------------------------------------------------
>-----------------------------------------------------------------
> SRID=1;MULTILINESTRING((-74.1835602497749
>4.62941345152032,-74.1837889284997 4.62928942801709,-74.1840390840234
>4.62917486837267))
>(1 row)
>
>With the query "SELECT startpoint(the_geom) FROM arcos WHERE id=51892;"
>I get:
>                    startpoint
>--------------------------------------------------
> SRID=1;POINT(-74.1835602497749 4.62941345152032)
>(1 row)
>
>But if I try the query: "SELECT id FROM arcos WHERE startpoint(the_geom)
>~= geometryfromtext('POINT(-74.1835602497749 4.62941345152032)',1);"
>I get no results:
> id
>----
>(0 rows)
>
>And the same problem if i try: "SELECT id FROM arcos WHERE
>x(startpoint(the_geom))::float = -74.1835602497749;"
> id
>----
>(0 rows)
>
>
>But if instead I try:"SELECT id FROM arcos WHERE
>x(startpoint(the_geom))::text = -74.1835602497749;"
>I get:
>  id
>-------
> 51892
>
>But, obviously, this query is very slow, and is not getting the
>geographic capabilities from postgis.
>Any ideas?
>
>Thanks in advance,
>
>--
>Vladimir Ilich Guzmán R.
>------------------------
>http://www.maintask.com
>
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>





More information about the postgis-users mailing list