Opened 18 years ago
Closed 16 years ago
#1851 closed defect (wontfix)
WMS server returns wrong BoundingBox for PostGIS layers
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 5.2 release |
Component: | PostGIS Interface | Version: | 4.8 |
Severity: | normal | Keywords: | |
Cc: | sdlime |
Description (last modified by )
LayerGetExtent function for PostIGIS layers is dummy function(defined in mappostgis.c) always returns (- MAXFLOAT,-MAXFLOAT,MAXFLOAT,MAXFLOAT), so layer extent for PostGIS-layer is not specified in .map- file one will get enormously large BoundingBox and LatLonBoundingBox as reply to GetCapabilitiesRequest... All one have to do to fix it is to issue following query "select extent(%geometry_column%) from % table_name% %filter%" to PostGIS DB and parse its results.. This code is already present in mappostgis.c but it disabled because, as commentary to function said, "Never seen this function actually called"
Change History (4)
comment:1 by , 18 years ago
Summary: | WMS server returns wrong BoundingBox for PostGIS layers → WMS server returns wrong BoundingBox for PostGIS layers |
---|
comment:2 by , 17 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
Milestone: | → 5.2 release |
I think we should fix this and use select extent()... in 5.2. Returning an infinite BoundingBox in GetCapabilities is just wrong. If anyone finds their GetCapabilities too slow they can always use ows_extent metadata to force the extent value and avoid the full table scan.
Any objections from the mappostgis.c maintainers?
comment:3 by , 17 years ago
Serious objections, it's a massive "gotcha" that's completely hidden from people in terms of "why is this happening?" At least the infinite bounding boxes are a visible error. How about something completely different, an XML comment that appears when ows_extent isn't set saying "please set ows_extent"?
comment:4 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |