[postgis-users] Re:Mapserver layer selects

Stephen Davies sdc at sdc.com.au
Fri Feb 13 19:25:08 PST 2009


Further to my earlier question.

I have experimented further and now get the following results:

benparts=# SELECT * from swip3 WHERE (pid in (select probe.id from probe where 
logger_id in (select id from logger where client_id=120)) and 
rdate='2009-02-12 13:30:00') and (geom && 
setSRID( 'BOX3D(138.5356633 -34.99,138.5397151 -34.8)'::BOX3D,4283) );
 id | zname | pid | geom | rdate
----+-------+-----+------+-------
(0 rows)

benparts=# SELECT * from swip3 WHERE (pid in (select probe.id from probe where 
logger_id in (select id from logger where client_id=120)) and 
rdate='2009-02-12 13:30:00') and (geom && 
setSRID( 'BOX3D(138.5 -34.99,138.6 -34.9)'::BOX3D,4283) );
 id | zname  | pid |                        geom                        |        
rdate
----+--------+-----+----------------------------------------------------+---------------------
 28 | Zone 2 | 607 | 0101000020BB1000007ADFF8DA335161406551D845D17541C0 | 
2009-02-12 13:30:00
(1 row)

benparts=# SELECT astext(geom) from swip3 WHERE (pid in (select probe.id from 
probe where logger_id in (select id from logger where client_id=120)) and 
rdate='2009-02-12 13:30:00');
           astext
-----------------------------
 POINT(138.53758 -34.920449)
(1 row)

The only thing that changes between query 1 and query 2 is that I have 
increased the "extent constraint".
However, as query 3 shows, the point is clearly within the smaller original 
extent so should have been returned by query 1.

No???

Cheers,
Stephen

-- 
=============================================================================
Stephen Davies Consulting P/L                             Voice: 08-8177 1595
Adelaide, South Australia.                                Fax  : 08-8177 0133
Computing & Network solutions.                            Mobile:040 304 0583
                                          VoIP:sip:1132210 at sip1.bbpglobal.com



More information about the postgis-users mailing list