[geos-devel] GEOS and Writing SRID values

Paul Ramsey pramsey at refractions.net
Thu Sep 13 11:28:18 EDT 2007


On 12-Sep-07, at 9:21 PM, Charlie Savage wrote:

> The first is fairly minor - how do we know when an SRID is set?  By  
> default a GEOS geometry has an SRID value of 0.  But the WKBReader  
> sets it to -1 if the WKB string does not have an SRID.  I checked  
> the spatial_ref_sys table in PostGIS and the first SRID has a value  
> of 2000.  Thus, I think 0 is reasonable default and WKBReader  
> should change to use zero also instead of -1.

PostGIS uses -1 as the default "unknown" SRID. Unfortunately, ISO  
uses 0.  So we remain tempted to flip to 0. It is the one of the  
major "breaking" changes we would have to do to get to SQL/MM  
conformance (the others are changing the type numbers for ZM geometry  
variants in AsBinary).

> The second issue is more important.  This would change the wkb  
> output format to match PostGis - will this cause problems?  GEOS  
> already uses an extended WKB format by including dimension  
> information, so its hard to argue its any less OGC compliant.   
> Also, this would only be different for geometries that actually do  
> have SRID values.

Are we suffering a terminology breakdown here? You're talking about  
SRID in WKB, but the WKB spec doesn't include SRID.  Only the EWKB  
implementation, which is our own concoction, does that.  As long as  
the changes don't end up breaking the standards compliant WKB output,  
things should be OK... I wonder what others think?

P





More information about the geos-devel mailing list