Opened 12 years ago

Closed 5 years ago

#4613 closed defect (wontfix)

[PATCH] OnEarth Tiled WMS fixes and enhancements

Reported by: Lucian Plesea Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: OnEarth tiled wms
Cc: thare

Description

The attached patch accomplishes:

  • Tiled WMS, eliminated crashes when bbox is the last argument
  • Tiled WMS, explicit server variable declaration, to avoid choosing patterns with variables when no values are supplied
  • Tiled WMS, support for palette data
  • Added NoData, Min and Max support to all WMS formats (server side for tiled WMS)
  • Removed some unnecessary fields.

Attachments (1)

wms.patch (81.8 KB ) - added by Lucian Plesea 12 years ago.
WMS driver patch

Download all attachments as: .zip

Change History (6)

by Lucian Plesea, 12 years ago

Attachment: wms.patch added

WMS driver patch

comment:1 by Even Rouault, 12 years ago

Summary: OnEarth Tiled WMS fixes and enhancements[PATCH] OnEarth Tiled WMS fixes and enhancements

Woo, this is huge... For better review, it would be highly desirable to break independant fixes into separate patches... I'm going to try to analyze that, but it's going to require some time.

Lucian, do you have sample XMLs for public servers that trigger the new features, so as to verify that we don't break things when applying the fix and potentially doing some adjustments ?

comment:2 by Lucian Plesea, 12 years ago

Cc: thare added

It's not really that big of a change. It should not affect other minidrivers, the exception being of a tiny change in the virtual earth one (the default number of levels).

I did change the "daily" xml to point to the current daily modis server.

http://map1.vis.earthdata.nasa.gov/data/wms.cgi?request=GetTileService

This server had to declare variables, I had it crash with the 1.9.0 code. I had to move the request pattern with no "time" first in the server list to avoid the crash, this code is just smarter on picking up the right pattern to use. And it applies the variable substitution at initialization time since they are static, no need to do it for each and every tile request.

I have also swapped the "Clementine" example for a "Moon" one, which goes to a better mosaic of the moon
http://onmoon.lmmp.nasa.gov/wms.cgi?request=GetTileService
Or check the polar projection at:
http://onmoon.lmmp.nasa.gov/NPole/wms.cgi?request=GetTileService
http://onmoon.lmmp.nasa.gov/SPole/wms.cgi?request=GetTileService

The min/max/nodata should work with any recent server, for example the "simple wcs" with TiledWMS support
http://onmoon.lmmp.nasa.gov/wcs/wcs.cgi?request=GetTileService

This one does TIFF tiles, some of them in floating point and other with short int, both works fine. It's supposed to be WCS, but the simpleWCS is pretty much identical to WMS, so tiledWMS works just as well. It is needed when accessing elevation for example, to allow proper scaling and masking. The min/max/nodata seemed to be useful by any other driver, so once I had the dataset support built, I let the main driver handle it from the XML.

For palette support, I've just started to update the few servers that have those kind of tiles, you can check against
http://onmoon.lmmp.nasa.gov/sites/wms.cgi?request=GetTileService
The Color Confidence layers are palette based. Note that you have to extract the bbox declared by the Capabilities for the layer, otherwise the bounding box is always the whole world. We should get the WMS use tiledWMS internally when available to hide this issue, but that is a different patch ;) The palette syntax is borrowed from VRT, allowing interpolation, to keep the server response small.

comment:3 by Even Rouault, 12 years ago

Component: defaultGDAL_Raster
Keywords: OnEarth tiled wms added
Milestone: 2.0.0
Resolution: fixed
Status: newclosed

ok, I think I have merged the gist of your patch in the following commits. Note that I didn't merge the VirtualEarth change as I think it is not appropriate because it exposes a 256x256 overview, whereas the base level of the VirtualEarth data is 512x512.

r24232 /trunk/gdal/frmts/wms/ (dataset.cpp rasterband.cpp wmsdriver.h): WMS: add support for retrieving nodata, min and max values, defined per band or per dataset in the config file (extract of patch by Lucian Plesea, #4613)

r24233 /trunk/gdal/frmts/wms/ (dataset.cpp rasterband.cpp wmsdriver.h): WMS: add support for GetColorTable(), that will be later used by the TiledWMS mini driver (extract of patch by Lucian Plesea, #4613)

r24234 /trunk/gdal/frmts/wms/ (4 files): WMS: update TiledWMS mini-driver to support new variable substitution mechanism, min/max/nodata settings, color table support (extract of patch by Lucian Plesea, #4613)

r24235 /trunk/gdal/frmts/wms/ (dataset.cpp wmsdriver.h): WMS: remove m_overview_count member (extract of patch by Lucian Plesea, #4613)

r24236 /trunk/autotest/gdrivers/wms.py: Test a TiledWMS dataset with a color table (#4613)

comment:4 by warmerdam, 11 years ago

Resolution: fixed
Status: closedreopened

Reopening to review the sample xml changes.

comment:5 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: reopenedclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.