[postgis-users] ERROR: Operation on mixed SRID geometries after upgrading to recent postgres/postgis

Sebastian Reitenbach sebastia at l00-bugdead-prods.de
Fri Apr 4 06:32:21 PDT 2008


Hi all,

I'm in the phase of evaluating an upgrade of postgres/postgis from 
8.1.4/1.1.2 to 8.3.X/1.3.2.
But while testing, I ran into trouble with one of the queries that worked 
before

Now I have postgresql-8.3.1.tar.bz2 or postgresql-8.3.0.tar.bz2, and 
proj-4.6.0.tar.gz, postgis-1.3.2.tar.gz, and geos-3.0.0.tar.bz2 installed. 
With the old database/postgis version constellation (geos-2.2.2.tar.bz2, 
postgis-1.1.2.tar.gz, proj-4.4.9.tar.gz, and postgresql-8.1.4.tar.bz2) the 
query below worked:

select "TILE_ID", innerst_shape
from
(select original_tile."UNIQUE_ID", 
original_tile."TILE_ID", 
original_tile."TILE_INTERIOR_SHAPE", 
original_tile."TILE_POLY_SHAPE", 
difference(original_tile."TILE_INTERIOR_SHAPE", 
geomunion(intersect_tile."TILE_POLY_SHAPE")) as 
innerst_shape 
FROM "tile" original_tile 
JOIN "tile" intersect_tile 
ON (intersect_tile."TILE_ID"!= original_tile."TILE_ID" AND 
intersect_tile."TILE_POLY_SHAPE" && original_tile."TILE_INTERIOR_SHAPE" and 
Intersects(intersect_tile."TILE_POLY_SHAPE", 
original_tile."TILE_INTERIOR_SHAPE") and 
round(intersect_tile."TILE_ID"/100000)<=round(original_tile."TILE_ID"/100000)) 
WHERE original_tile."TILE_ID" in 
(select "TILE_ID" 
from "tile" 
where "TILE_POLY_SHAPE"&& GeomFromText('POLYGON((75.7491342 
31.0239757,75.7473798 30.7984119,76.0086717 30.7966414,76.0110403 
31.02219,75.7491342 31.0239757))', 4326) and 
Intersects ("TILE_POLY_SHAPE", GeomFromText('POLYGON((75.7491342 
31.0239757,75.7473798 30.7984119,76.0086717 30.7966414,76.0110403 
31.02219,75.7491342 31.0239757))', 4326)) ) 
GROUP BY original_tile."UNIQUE_ID", original_tile."TILE_ID", 
original_tile."TILE_INTERIOR_SHAPE", 
original_tile."TILE_POLY_SHAPE") as subquery 
where 
not IsEmpty(innerst_shape) and 
Intersects(innerst_shape, GeomFromText('POLYGON((75.7491342 
31.0239757,75.7473798 30.7984119,76.0086717 30.7966414,76.0110403 
31.02219,75.7491342 31.0239757))', 4326))
and not Touches(innerst_shape, GeomFromText('POLYGON((75.7491342 
31.0239757,75.7473798 30.7984119,76.0086717 30.7966414,76.0110403 
31.02219,75.7491342 31.0239757))', 4326))


ERROR:  Operation on mixed SRID geometries

********** Error **********

ERROR: Operation on mixed SRID geometries
SQL state: XX000

this worked with the old versin, without glitch. 
So anybody has an idea what this error message mean, and more importantly 
how to overcome it?

kind regards
Sebastian




More information about the postgis-users mailing list