[postgis-devel] Motion: vote for considering SRID <= 0 as "unknown"

Sandro Santilli strk at keybit.net
Tue Oct 4 08:20:58 PDT 2011


On Tue, Oct 04, 2011 at 03:54:28PM +0100, Mark Cave-Ayland wrote:
> On 04/10/11 14:56, Sandro Santilli wrote:
> 
> >Trying to get out of the impass about SRID, I'd like to split
> >the issue in two:
> >
> >  (1) Considering SRID<= 0 as "unkwnown"
> >  (2) Finding a consensus about how to advertise "unknown"
> >      at the SQL level
> >
> >I'd like to vote on (1) first.
> >If we agree, the parsers (all of them) would take any SRID<= 0 as
> >semantically equivalent to an "unknown SRID", storing NO srid in
> >the binary representation.
> >
> >This would mean that no matter what we decide to return from ST_SRID(g)
> >it will be possible to get in output something different from what was
> >specified in input.
> >
> >I'll start with my +1.
> 
> My only comment would be what do the various standards (SQL-MM/OGC)
> say about SRID values? As long as they don't specify anything, I
> guess we have a bit more freedom to interpret the specification as
> fits best with PostGIS.

All I can find about SRID in OGC SFS 1.1:

 Before a geometry can be constructed and inserted into a table,
 the corresponding row for its SRID must exist in the
 SPATIAL_REFERENCE_SYSTEMS table, else construction of the geometry
 will fail.

There's no mention of the possibility for a geometry to have _no_ srid.
The SRID field in spatial_ref_sys and geometry_columns is of type
"integer" (but there's no case of "unsigned" in the whole document so
that isn't necessarely a sign of the fact that we should support <0).

The SQL/MM doesn't seem any different in that reguard. 
In both there's no concept of "unknown" srid.

--strk;

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



More information about the postgis-devel mailing list