[postgis-users] ERROR: Operation on two GEOMETRIES withdifferentSRIDs

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Fri Jul 14 06:18:58 PDT 2006

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of Johan V
> Sent: 14 July 2006 12:46
> To: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] ERROR: Operation on two GEOMETRIES
> withdifferentSRIDs
> Hi Mark and others,
> Yes the geometry created on the fly is -1, but this same sql statement
> (with the on the fly created geometry) does work on another table with
> SRID=103300, but not on this one.
> I need this specific sql statement because it is a statement that is
> issued by a software product that makes a WFS/WMS service (GIS Service
> over the internet) of this table.
> So do I have to change or check some thing in the table to be able to
> use this kind of sql statement:
> SELECT the_geom FROM table_x WHERE ((the_geom && 'POLYGON((...))')).
> Greetz,
> Johan.

Hi Johan,

Hmmm that makes it a bit more tricky. Unfortunately the SQL being issued is
relying on the implicit cast in PostgreSQL rather than using
GeomFromText()/setSRID() as documented and so its behaviour may change
across PostgreSQL/PostGIS versions - if you do get a chance to update the
SQL in your client software, I would highly recommend it.

As for the symptoms you are seeing, I am slightly baffled - can you post the
output of \d <table> for one of your tables that works and your new one that
doesn't, the exact SELECT queries being executed on each table, and can you
confirm that both tables are in the same database running the same version
of PostGIS?

Kind regards,


WebBased Ltd
17 Research Way

T: +44 (0)1752 797131
F: +44 (0)1752 791023


This email and any attachments are confidential to the intended recipient
and may also be privileged. If you are not the intended recipient please
delete it from your system and notify the sender. You should not copy it or
use it for any purpose nor disclose or distribute its contents to any other

More information about the postgis-users mailing list