#79 closed enhancement (fixed)
WMS - Support GetExtents() for rasters
Reported by: | dmorissette | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | WMS Server | Version: | 4.1 |
Severity: | minor | Keywords: | raster extent |
Cc: | mapserver@…, jmckenna |
Description (last modified by )
In the current version of MapServer, extents for rasters in the WMS capabilities have to be provided using the "wms_extent" metadata because there is no GetExtent() call for raster layers in MapServer.
How hard would it be to implement GetExtent() for rasters? Is there anything that prevents us from doing it?
Change History (21)
comment:2 by , 21 years ago
Cc: | added |
---|---|
Severity: | normal → enhancement |
Version: | 3.5 → 4.1 |
No time for this in 4.0, maybe in 4.1?
comment:3 by , 20 years ago
dependson: | → 786 |
---|
comment:4 by , 20 years ago
Daniel, For WCS we implemented the msWCSGetCoverageMetadata() function which provides extents (and other?) information that might be useful for WMS as well. Unfortunately the information is currently returned in a coverageMetadataObj We could conceivably move some of the logic out.
comment:5 by , 20 years ago
I started looking at the new msWCSGetCoverageMetadata() and then found out that it calls msLayerGetExtent() which has been upgraded to support raster layers. This is already what the WMS code calls. Is there really anything to extract from the WCS code? It seems to me that this bug would have been fixed by your changes, but I didn't do any testing to verify that.
comment:6 by , 20 years ago
Um... the msOWSGetLayerExtent() systematically returns MS_FAILURE for raster layers. I'll need to look into that.
comment:7 by , 20 years ago
Milestone: | → 4.4 release |
---|
comment:8 by , 20 years ago
Cc: | added |
---|
comment:9 by , 20 years ago
Note, bug 862 is also related to this bug. It requests that non-square support mode be enabled by default for WMS mode.
comment:10 by , 20 years ago
msOWSGetLayerExtent() just checks the metadata for rasters, and if that isn't set fails out with MS_FAILURE. PS. Please ignore the previous comment I made about bug 862 ... it went into the wrong bug report. This bug is currently assigned to Daniel. If you wish, you can assign it to me and I will implement an appropriate low level function that can be called from msWCSGetCoverageMetadata() and msOWSGetLayerExtent() to get the extent.
comment:12 by , 19 years ago
This would be a great feature to put in. What would happen when this is implemented AND users have "wms_extent" in their mapfile?
comment:13 by , 19 years ago
Status: | new → assigned |
---|
Tom, Currently layer metadata is consulted first and takes precidence. This allows people to "fixup" bad metadata and it can also be a performance bonus for formats that are expensive to open to query such information. I had quite forgotten I promised to do this!
comment:14 by , 19 years ago
Should default to the dataset extent and then fall back to metadata if not present. I believe the WCS code has a metadata "mining" piece that could be generalize or somehow leveraged... Steve
comment:15 by , 19 years ago
Actually, I am thinking that wms_extent should take precedence if it is set, so that you can override the default extent. I would think that this is already the case for vectors so we should be consistent between vectors and rasters, I can see a few reasons why you may want to override default extents: 1- If the driver's GetExtent() is an expensive call (that's the case of some vector formats) 2- If the driver's GetExtents() returns invalid information for some reason, e.g. some misconfigured db with -180,-90,180,90 extents 3- If you simply want to override the default extents and publish you own smaller or larger extents
comment:16 by , 19 years ago
Sorry, I hadn't seen Frank's reply, didn't mean to confuse the issue. Dan and Frank's plans are just fine.
comment:18 by , 17 years ago
Description: | modified (diff) |
---|---|
Keywords: | raster extent added |
Milestone: | 5.0 release → 5.2 release |
Priority: | high → normal |
Pushing to 5.2
comment:19 by , 15 years ago
Description: | modified (diff) |
---|---|
Milestone: | 5.2.1 release → 6.0 release |
comment:20 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I have committed an implementation of msRASTERLayerGetExtent() that will open the file and fetch the extent for simple raster files - that is, when tile indexes are not used.
Applied in trunk (r8677). I also added a modest test that demonstrates this works for simple file raster layers and does not work for tileindex layers in msautotest (r8676).
This change could be migrated to the 5.4 branch fairly safely I think if someone wants it and is willing to do some validation.
Presumably this will help for WMS and WCS serving.
comment:21 by , 15 years ago
Cc: | added |
---|