MapServer Support for Web Coverage Services
Stephen Lime - Minnesota DNRDr. Thomas E. Burk - University of Minnesota
MUM 2004 - Ottawa, Canada
Presentation Overview• Background• Implementation• Usage• Demo Application• Future Work
MapServer• Pre-dates OGC interoperability efforts• Two primary objectives, via the Internet:
o create maps and associated products (e.g., scalebars, legends and reference maps)
o query spatial data
• Two primary components:o mapserv CGI provides out-of-box functionalityo MapScript, access to the C/C++ API from popular
programming languages
GDAL• Geographic Data Abstraction Library• Middleware for raster data access, similar in
concept to ODBC• Provides most MapServer raster input and
some output capabilities• Provides limited image processing support
for operations such as projection and resampling
MapServer OGC Support• Web Mapping Service (WMS) - a perfect match
for existing MapServer functionality• Web Feature Service (WFS) - MapServer supports
non-transactional elements, equates roughly to MapServer query support
• Web Coverage Service (WCS) - furthest spec from core MapServer functionality, must rely heavily on MapServer/GDAL interface
Groundwork• MODIS Download Facility – early 2000
First extension of MapServer that has several characteristics of recent WCS standard
• Lead to development of a SEEDS proposal for NASA funding Partners: University of North Dakota and the
Jet Propulsion Laboratory
WCS Overview• Like WFS, WCS is a natural progression from
WMS• “Unfiltered” access to a “coverage”, values or
properties at a set of geographic locations• WCS 1.0.0 is limited to simple, that is grid,
coverages *whew*• Supports simple queries in the form of spatial,
temporal and/or other property subsets
Design Assumptions• Not a ground-up WCS implementation
Will not support the full WCS specification Build upon functionality already available within MapServer Any extensions to MapServer must be made available via the
core product, the CGI interface and MapScript Must integrate with OGC specification implementations
supported by MapServer (e.g. WMS and WFS) Relies upon GDAL for data extraction, transformation (e.g.
projection) and formatting
Our “ToDo” List• Enable ISO8601 extended date format parsing• Enhance tiling to support:
o filtering based on tile attributeso specification of band/bands as an attribute
• Alter GDAL/MapServer interface to support key WCS features (multi-band raw mode)
• Update MapServer compilation process• Developed interface to process WCS requests via
the MapServer CGI programo GetCapabilities/DescribeCoverage/GetCoverage
Spatial/Temporal Tiling• Mechanism to organize and present a large
volume of data using a single MapServer layer definition
• Has utility beyond immediate WCS needs, for example for access control
• Simplifies development of client applications• Potential performance benefits• May be cumbersome to setup
Tiling Example: Multiple Images
1.img 2.img 3.img
4.img 5.img 6.img
7.img 8.img 9.img
shape location
polygon 1.img
polygon 2.img
polygon 3.img
polygon 4.img
polygon 5.img
polygon 6.img
polygon 7.img
polygon 8.img
polygon 9.img
Tiling Example: Single Image, Temporal Bands
August
July
June
May
NDVI_03.img shape band date location
polygon 1 2003-05 NDVI_03.img
polygon 2 2003-06 NDVI_03.img
polygon 3 2003-07 NDVI_03.img
polygon 4 2003-08 NDVI_03.img
Development Status• Elements of WCS (e.g. tiling) is enabled in
4.2 release, beta WCS support is now available in 4.3 development version
• Requires GDAL and Proj.4• Supports GetCapabilities,
DescribeCoverage and GetCoverage
Enabling WCS• Very similar to enabling WMS and WFS• Define WCS specific metadata elements
GDAL can discover some values (e.g. resolution) Optionally, these values can be hardcoded
• Set the layer DUMP attribute• If necessary, structure image data appropriately
using new tiling capabilities
An Example
LAYER NAME "ndvi" STATUS OFF TYPE RASTER METADATA wcs_label "North Central US MODIS-based NDVI Images for 2002"
ows_srs "EPSG:26915 EPSG:4269 EPSG:4326"
ows_extent "159707 4597895 1400207 5501395"
wcs_resolution "500.0 500.0" wcs_formats "GEOTIFF_INT16" wcs_nativeformat "raw binary" wcs_timeposition "2002-001,2002-033,…,2002-193"
wcs_timeitem "imgdate" END DUMP TRUE TILEINDEX 'ndvi_idx' END
LAYER NAME "ndvi_idx" TYPE TILEINDEX DATA "mod13"END
Future Enhancements• Non-temporal range subsetting
Via TILEINDEX layers Via raster cell values
• Automatic metadata discovery• XML encoded requests• Support for multiple spatial interpolation methods• True support of ISO8601 date formats• WCS client support• Oh yeah, need to write documentation
Questions?