[postgis-users] Re: problem with BOX3D query
Randy George
rkgeorge at cadmaps.com
Sat May 6 10:20:31 PDT 2006
Hi,
I'm trying to find my error in a BOX3D query
"PostgreSQL 8.1.2 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2
(mingw-special)"
In Windows 2003 environment
SELECT the_geom FROM streets
WHERE the_geom && SetSRID('BOX3D(-111.80 33.30 , -111.75
33.35)'::box3d,4269);
Gives ERROR: syntax error at or near "33.30" at character 72
But identical BOX3D here
select AsEWKT(SetSRID('BOX3D(-111.80 33.30 , -111.75 33.35)'::box3d, 4269));
Works fine?
"SRID=4269;POLYGON((-111.8 33.3,-111.8 33.35,-111.75 33.35,-111.75
33.3,-111.8 33.3))"
Substituting POLYGON
SELECT the_geom FROM streets
WHERE the_geom && GeomFromText('POLYGON((-111.8 33.3,-111.8 33.35,-111.75
33.35,-111.75 33.3,-111.8 33.3))',4269)
Works as expected
As does he simpler LINESTRING bounding box
SELECT the_geom FROM streets
WHERE the_geom && GeomFromText('LINESTRING(-111.80 33.30, -111.75
33.35)',4269)
However I'm curious why the BOX3D isn't working?
Thanks
rkgeorge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060506/f5877200/attachment.html>
More information about the postgis-users
mailing list