[postgis-users] Incorrect results from queries specifying an SRID
Paul Ramsey
pramsey at refractions.net
Fri May 28 13:09:32 PDT 2004
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).
> 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.
--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey at refractions.net
| Phone: (250) 885-0632
\_
More information about the postgis-users
mailing list