[postgis-users] Querying geometries with different srid
Farrukh Najmi
farrukh at wellfleetsoftware.com
Thu Jan 13 06:42:07 PST 2011
In my schema I have a table GeometryValueType with a column geometry of
type geometry. The values in this column may be of mixed srid.
I write my query (see below) to only match rows where the geometry srid
is 4326 and then compare it with a filter geometry with srid 4326.
For some reason I am still getting the "Operation on mixed geometries".
Can any one help me understand why I am getting this error if the first
predicate in my query filter on srid = 4326?
--Gives Error: Operation on mixed geometries
SELECT * FROM GeometryValueType gvt WHERE ( ST_SRID(gvt.geometry) = 4326
AND
within(gvt.geometry, ST_GeomFromText('POLYGON((-100 0, 0 0, 0 100,
-100 100, -100 0))', 4326)) = true )
Thanks in advance.
--
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com
More information about the postgis-users
mailing list