[postgis-devel] Bye bye -1

Sandro Santilli strk at keybit.net
Thu Sep 29 09:26:04 PDT 2011


On Thu, Sep 29, 2011 at 09:10:42AM -0700, Paul Ramsey wrote:
> On Thu, Sep 29, 2011 at 1:56 AM, Sandro Santilli <strk at keybit.net> wrote:
> >
> > There's no way -1 means anything other than UNKNOWN and the same can
> > be said for 0. Unless anyone stored "-1" or "0" in spatial_ref_sys.
> > Is that allowed ? We should forbid it.
> >
> > So, my vote is for automatically convert to zero. Best if we can also
> > raise a warning in doing it, to remind people that their inputs needs
> > be fixed (why on earth should the input have an explicit SRID=-1 prefix
> > in EWKT when UNKNOWN is what you get by omitting the SRID prefix?)
> 
> And -2, and -3?
> 
> postgis20=# select st_srid('SRID=-3;POINT(0 0)');
>  st_srid
> ---------
>       -3
> (1 row)
> 
> The capability has always been there to use those numbers. Someone may have.

Leave them out in the cold.
Anything < -1 means "I'm an hacker, I'll survive".

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list