[postgis-users] SET client_srid = x

Willy-Bas Loos willybas at gmail.com
Fri Apr 11 01:37:01 PDT 2008


I think it should work as if the server were in the client coordinate
system.
So, if you were to create, say, a point without an srid, it would default to
your cleint_srid
if you were to create a point in a different srid, it would be transformed
to your client_srid
this would happen before any other operations are applied, so all operations
would happen in the client_srid.

If you were to store a geometry, it would be stored in the srid that is
registered in geometry_columns for the target column.
If you were to select a geometry from a table, it would be transformed to
the client_srid before any other operations apply.

One big difference between encodings and coordinate systems, is that the
encoding is bound to a server. Geometries can be all kinds of srids
throughout the server, and PostGIS will have to find out which srid to use
from the geometry itself, e.g. when performing a buffer. (plz correct me if
i'm wrong).

One thing that is still  bugging me is that i heard a rumor that the
"geometry_columns" registration is "kinda deprecated", which would mean
trouble for transforming the geometries prior to storage.

Do you think this whole thing fits into the PostGIS philosophy?



On Thu, Apr 10, 2008 at 4:37 PM, Paul Ramsey <pramsey at cleverelephant.ca>
wrote:

> I wonder how client_srid is supposed to handle operations prior to
> transport? If I do a buffer() before sending the geometry back, is it
> done in the storage srid or the client srid?
>
> I wonder how client_encoding does it... does it sort in UTF and send
> back in the client encoding?
>
> On Thu, Apr 10, 2008 at 2:41 AM, Willy-Bas Loos <willybas at gmail.com>
> wrote:
> > Hi,
> >
> > I think that an SRID is, in ways, comparable to an encoding (as in
> LATIN1 or
> > UTF8).
> > Our server stores everything in UTF8, but i can still communicate to it
> in
> > LATIN1.
> > Likewise we would like to store our geometries in WGS84, so that
> > international data can be stored, but we use our national grid for daily
> > operations.
> >
> > Would it be a good idea to create an option that sets the client's SRID
> > ('SET client_srid = 28992'), like in SET client_encoding = 'LATIN1'?
> >
> > Cheers,
> >
> > WBL
> >
> > _______________________________________________
> >  postgis-users mailing list
> >  postgis-users at postgis.refractions.net
> >  http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> >
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080411/45ca1cca/attachment.html>


More information about the postgis-users mailing list