[postgis-users] spatial index and GEOS

TECHER Jean David davidtecher at yahoo.fr
Thu Jun 24 03:11:17 PDT 2004


Hi

As it is explained in postgis documentation

"When constructing a query it is important to remember that only the
bounding-box-based operators such as && can take advatage of the GiST
spatial index...."

so that's the reason why for && the spatial index is used...

I don't know but that's just an idea...Perhaps you have to see

http://postgis.refractions.net/docs/x543.html

then try

select ....

intersects(...,...) and ... && ...

TECHER JEAN DAVID
- Responsable Informatique 01MAP -
e-mail:davidtecher at yahoo.fr
Tel: 06 85 37 36 75
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
skoehler at buschjena.de
Envoye : jeudi 24 juin 2004 11:56
A : postgis-users at postgis.refractions.net
Objet : [postgis-users] spatial index and GEOS


Hi,

I have created an spatial index on an polygon and an multiline table. Now
I will get all lines intersects an polygon.
First using postgis with: select * from p, m where p.the_geom &&
m.the_geom and p.num=1;
The explain statement shows me that the spatial index is used --> fine

Second I'am using GEOS: select * from p, m where
intersects(p.the_geom,m.the_geom) and p.num=1;
The explain statement shows me that all is done with seq_scan --> bad

How is the spatial index used with GEOS functions? Is there an other way
to use an spatial index with GEOS?

Thanks
Steffen Koehler

_______________________________________________
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