[postgis-users] where intersects(the_geom,foobox) = woes

Fred McDavid frm at bitdaddy.com
Tue Aug 31 22:03:57 PDT 2004


Hi,

I'm having trouble with the intersects (also tried overlaps, crosses and 
contains with the same result).  Using the && operator, I get two rows 
returned, but when I add an "and intersects(...)" clause, I get no results.

The following works as expected:

select gid,the_geom from staunton_parcels where the_geom && 
GeometryFromText('POLYGON((671357.696781 4226841.65215,671357.696781 
4226841.65215,671357.696781 4226841.65215,671357.696781 4226841.65215))',-1);

but this does not:

select gid,the_geom from staunton_parcels where the_geom && 
GeometryFromText('POLYGON((671357.696781 4226841.65215,671357.696781 
4226841.65215,671357.696781 4226841.65215,671357.696781 4226841.65215))',-1) 
and intersects(the_geom,GeometryFromText('POLYGON((671357.696781 
4226841.65215,671357.696781 4226841.65215,671357.696781 
4226841.65215,671357.696781 4226841.65215))',-1));

Am I missing something or is there a more appropriate way of finding the 
shapes that "intersect"  (I may not fully understand this from a gis 
perspective...what I'm trying to do amounts to a select-by-rectangle feature 
on all of the mapping applications I've seen) a shape/poly/line?

Regards,

Fred McDavid

------------ VERSION INFO -----------------
fred at vespucci:~$ dpkg -l | egrep -e "gis|postgres"
ii  libpostgis     0.8.2-1        spatial extensions for postgresql (library)
ii  postgis        0.8.2-1        spatial extensions for postgresql
ii  postgis-bin    0.8.2-1        spatial extensions for postgresql (binaries)
ii  postgresql     7.4.2-4        Object-relational SQL database, descended fr
ii  postgresql-cli 7.4.2-4        Front-end programs for PostgreSQL
ii  postgresql-con 7.4.2-4        Additional facilities for PostgreSQL


-- 
==========================================================
Fred R. McDavid, III
  540-248-0838
    frm at bitdaddy.com
      BitDaddy Systems, Inc
       * Complex System Design, Management, and Hosting
==========================================================



More information about the postgis-users mailing list