[postgis-devel] About BOXES

Sandro Santilli strk at keybit.net
Sat Nov 26 02:33:45 PST 2011


On Fri, Nov 25, 2011 at 02:02:50PM -0800, Paul Ramsey wrote:
> On Fri, Nov 25, 2011 at 1:56 PM, Chris Hodgson <chodgson at refractions.net> wrote:
> > AND/OR, accept input of boxes without the "SRID=####" (as SRID 0 or whatever
> > we agreed on) and ALSO output text for boxes that have the null srid without
> > the "SRID=####". This still wouldn't be entirely consistent with EWKT but
> > seems like a more acceptable compromise for backward compatibility with old
> > box2d parsing code - especially since putting the ;SRID=#### on the end
> > doesn't actually guarantee any backward compatibility.
> 
> This is what I'm planning on and is consistent with EWKT. SRID_UNKNOWN
> implies that we won't on output print out SRID= and also a lack of
> SRID= on input implies SRID_UNKNOWN.
> 
> > Then we could return it from st_extent and be closer to completely removing
> > box2d...
> 
> Unfortunately, this won't work so well, because the dominant use case
> of ST_Extent is going to be ST_Extent(geometry) where the geometry
> *has* an SRID, which will yield a bbox with an SRID, which will yield
> a text for with SRID= in it, which may likely trip up the client code.
> The only alternative I see is to just leave ST_Extent as an
> SRID-stripping function. It could output a bbox, but would strip the
> SRID before it did so, to ensure the text form harmonized.

Or we could add an optional boolean parameter to request retaining
the SRID, which would default to NO (if we really have to).

> So far it looks like GeoDjango would fail a regression test if we did
> a non-srid-stripping st_extent, not sure if it would break real
> functionality. MapServer wouldn't care. GeoServer I don't have an
> answer for yet.

Worth notifying GeoDjango people about this, they can surely do
better (since QGis and MapServer do better already).
GeoDjango people around to forward this ?

--strk;

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



More information about the postgis-devel mailing list