[postgis-devel] About BOXES
Paul Ramsey
pramsey at opengeo.org
Fri Nov 25 14:02:50 PST 2011
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.
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.
P.
More information about the postgis-devel
mailing list