[postgis-users] The operator && is not overlaps operator basedonthe OGC SF SQL

Darko Androsevic dandrosevic at galdosinc.com
Wed Aug 18 09:46:16 PDT 2004


Hello Nicolas,

Thanks for the quick answer. However, I have to ask you for one additional
thing.


Nicolas wrote:
"&&" tells if 2 geometries' extents overlap or not."
Since we agree that it IS NOT the OGC overlap, I would appreciate if you
could you please define the bounding boxes "overlap" in the postGIS context
or point me where it might be precisely defined? 


BTW, I still think, based on my small set of simple test queries, that it
actually follows the OGC's "intersects" = "not disjoint" operators sematics.
Why is this important to me? 
I would like to use it in combination with GEOS extensions to get the OGC
operator semantics.
For example, if it is defined as the OGC intersect then one does not have to
use the additional GEOS intersect extension in case of the OGC's intersect
query and improve performance.

Cheers,
Darko



-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
Nicolas RIBOT
Sent: Wednesday, August 18, 2004 1:36 AM
To: PostGIS Users Discussion
Subject: RE: [postgis-users] The operator && is not overlaps operator
basedonthe OGC SF SQL


Hello Darko,

No. && overlap operator is not related to OGC definition of spatial
operators:
The "&&" operator works on geometries' bounding box (extent), not on the
geometries themselves.

"&&" tells if 2 geometries' extents overlap or not. Spatial index uses
it to exclude geometries from a spatial query, speeding up the process.

OGC spatial operators are implemented in the GEOS extension and follow
the semantic you explained.
They also follow the OGC naming convention: overlap(geometry, geometry),
intersect(geometry, geometry), etc...

Nicolas

> 
> Hello,
> 
> I am new user of the PostGIS and I have just read the PostGIS 
> manual. I
> found that in order to use the spatial index one should use the "&&"
> operator.
> This operator ("&&") is named the "overlap" operator (page 6, 
> page 14 of the
> manual).
> I am not sure whether this definition is related to the 
> "overlaps" operator
> in the OGC Simple Features Specification For SQL or not.
> In the OGC doc, the "overlaps" operator is defined only for 
> A/A L/L and P/P
> and it is defined like:
> 
> a.Overlaps(b)<=>(dim(I(a)) = dim(I(b)) = dim(I(a) ^ I(b))  ^  
> (a^b != a) ^
> (a^b != b)
> 
> If that is the case, then the postgis "&&" operator means actually
> "intersects" and not "overlaps".
> I tried this by executing a few query and found that the 
> operator "&&" might
> be an implementation of the "intersect" operator.
> 
> I would appreciate some comments and clarifications.
> 
> Regards,
> Darko
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3072 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20040818/b74a9c7e/attachment.bin>


More information about the postgis-users mailing list