[postgis-users] Incorrect results from queries specifying an SRID

cp cplists at yeroc.ca
Fri May 28 13:28:11 PDT 2004


Paul Ramsey wrote:

> cp wrote:
>
>> My expectation would be for postgis to automatically transform the 
>> coordinates to match the SRID of the geometries stored in the table 
>> (4267) or at least to give me an error.
>
>
> You should be getting an error, that is the only noticable bug. SRID 
> mismatches are supposed to raise errors (to prevent precisely the 
> problem you demonstrate going quietly unnoticed).

Ok.  Any ideas why I'm not getting an error?  Is there any diagnostic 
information I can gather to track this down?

>> My workaround for now is to wrap my query with a transform myself 
>> like so:
>>
>> SELECT * FROM gis
>> WHERE geometry && transform(GeometryFromText('BOX3D(325356 
>> 6341280,335614 6328019)'::box3d, 26712), 4267);
>
>
> That's no workaround, that's the way it is done. It is not likely you 
> are going to get transparent projection casting, it is a great deal of 
> complexity for a very minor operational benefit.

Fair enough. 

Corey



More information about the postgis-users mailing list