[postgis-users] Comparing Geometries with Different SRIDs

Sufficool, Stanley ssufficool at rov.sbcounty.gov
Sat Sep 27 16:16:43 PDT 2008



> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Charlie Savage
> Sent: Saturday, September 27, 2008 2:31 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Comparing Geometries with Different SRIDs
> 
> 
> 
> 
> > 
> > I guess its because at some point to determine uniqueness 
> UNION has to 
> > call something like ST_Equals and since all the PostGIS relation 
> > functions are only supported for geometries with the same SRID it 
> > would fail.
> 
> Look like it:
> 
> select st_equals('srid=4326;point(3 3)'::geometry,
>                   'srid=4325;point(3 3)'::geometry)
> 
> ERROR:  Operation on mixed SRID geometries
> 
> 
> > So I would say this is a limitation of design rather than a bug.
> 
> I disagree. I think ST_EQUALS should return false here, not blow up.

The 2 point could be spatially equal given different SRIDS and
coordinates if they were projected to a common SRID. So should geometry
operators silently
Call st_transform to make the righthand match the lefthand before
comparing? This would be quite the expensive operation.


> 
> Charlie
> 



More information about the postgis-users mailing list