[postgis-users] Question about Crosses(geometry, geometry)

Matt Doughty matt.doughty at geograma.com
Fri Jun 8 03:30:10 PDT 2007


David,

Thanks for the tip but it didn't work. It returned the following error:

>ERROR: missing FROM-clause entry for table "polygons"

Matt

 
 
Matt Doughty
 
GEOGRAMA S.L.
Tel.:  +34 945 13 13 72    652 77 14 15
Fax: +34 945 23 03 40 
www.geograma.com
 
 

-----Mensaje original-----
De: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] En nombre de TECHER David
Enviado el: viernes, 08 de junio de 2007 12:27
Para: PostGIS Users Discussion
Asunto: Re: [postgis-users] Question about Crosses(geometry, geometry)

Hi Matt

instead of

select lines.* from lines,polygons where not 
crosses(lines.the_geom,polygons.the_geom)

try

select lines.* from lines where not 
crosses(lines.the_geom,polygons.the_geom)

don't use a call to polygons' table

Matt Doughty a écrit :
>
> Hi List,
>
> I've a question about the CROSSES (geometry, geometry) function. I'd 
> like to use it to select lines from a table that do not cross, or 
> intersect, some polygons in a separate table.
>
> The following script lets me select the lines that cross the polygons:
>
> SELECT
>
> lines.*
>
> FROM
>
> lines,
>
> polygons
>
> WHERE
>
> CROSSES(lines.the_geom, polygons.the_geom)
>
> Now I'd like to place a 'NOT' before the function CROSSES (-> NOT 
> CROSSES(lines.the_geom, polygons.the_geom), rather naively it seems, 
> as doing that returns me a table with the same geometry as the 
> original layer, but with 30 times more rows (an increase of 400 to 
> 12,000 records). In other words, it hasn't 'selected' and lines out of 
> the layer, merely repeated the table geometry 30 times.
>
> Can anybody explain where I'm going wrong?
>
> Many thanks in advance,
>
> Matt
>
> Matt Doughty
>
> 	
>
> GEOGRAMA S.L.
>
> Tel.: +34 945 13 13 72 652 77 14 15
>
> Fax: +34 945 23 03 40
>
> www.geograma.com <http://www.geograma.com/>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   


	

	
		
___________________________________________________________________________ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.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