Temporal OWS Services

27.06.2011 – 3:15 pm

This days (and months), I’m working on displaying various OWS services (OGC WMS, WCS and WFS at the beginning, slowly moving to SOS, …) inside the Web Geoportal application.

As you might know, we are using (and developing) HSLayers for your mapping purposes. It is OpenLayers- and ExtJS-based JavaScript Mapping framework. The support for TIME in WMS arrived just few days ago and can be viewed in WMS Time Supprot in HSLayers video.

We are now facing the other problem. Customers and various project partners do want to display WCS and WFS services inside of the map. It does not make sense to try to convince them, that it does not make any sense – they don’t care. Basically, we have two possibilities there:

  1. Try to write parser for WCS/WFS (which is partly done in OpenLayers). And hope to display the data somehow.
  2. Translate the services to WMS and use current infrastructure

Even OpenLayers is capable to display WFS data, it is not usable for larger amount of data. Not speaking about WCS, where you can sometimes get just GeoTIFF and that’s all you have.

We decided to write something called OWSProxy. It parses WCS/WFS Capabilities response and builds temporal WMS on top of it. Advantage: we can use all we have got for the current WMS Client. It simply works nicely. I’m facing one issue now.

MapServer is not able to work as WCS client. No big problem -> we use GDAL, which works just great and in the trunk, there is support for temporal information inside WCS as well.

You can access various times using GDAL:

Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
>>> from osgeo import gdal
>>> ds = gdal.Open("xml.wcs")
>>> ds.GetSubDatasets()[0]
('WCS_SDS:time="2011-06-15T21:00:00.000Z",/tmp/WCS-a7145b1a3d54e8df55f019a136f55f8408LK0Y/20110615T210000_dfm.wcs', 'Coverage 20110615T210000_dfm at time 2011-06-15T21:00:00.000Z')

We have now data source with time, which can be accessed from the command line as well

gdalinfo 'WCS_SDS:time="2011-06-15T21:00:00.000Z",/tmp/WCS-a7145b1a3d54e8df55f019a136f55f8408LK0Y/20110615T210000_dfm.wcs'

Driver: WCS/OGC Web Coverage Service
Files: none associated
Size is 1126, 341
Coordinate System is:
PROJCS["GGRS87 / Greek Grid",
            SPHEROID["GRS 1980",6378137,298.257222101,
Origin = (606368.000000000000000,4790992.000000000000000)
Pixel Size = (64.000000000000000,-64.000000000000000)
Corner Coordinates:
Upper Left  (  606368.000, 4790992.000) ( 25d18'38.23"E, 43d15'51.24"N)
Lower Left  (  606368.000, 4769168.000) ( 25d18'23.13"E, 43d 4' 3.95"N)
Upper Right (  678432.000, 4790992.000) ( 26d11'52.97"E, 43d15' 2.23"N)
Lower Right (  678432.000, 4769168.000) ( 26d11'27.66"E, 43d 3'15.27"N)
Center      (  642400.000, 4780080.000) ( 25d45' 5.75"E, 43d 9'36.26"N)
Band 1 Block=1126x341 Type=Float64, ColorInterp=Undefined
  Overviews: 563x17

NOW, I would like propagate this GDAL interface to MapServer. Should be pretty easy, you just need to create the TileIndex file (ESRI Shapefile), add time attribute the it, insert various times and locations …. ?

Unfortunately, MapServer seems not, that it would be able to access GDAL subdataset files,

  location (String) = WCS_SDS:time="2011-03-13T22:00:00.000Z",/tmp/WCS-a7145b1a3d54e8df55f019a136f55f84iYEWBn/20110308T220000_tem.wcs
  time (String) = 2011-03-13T22:00:00.000Z
  POLYGON ((409900 -11700,12900 -11700,12900 0,409900 0,409900 -11700))

does not work.

Well, I’m stuck at this point. How to access GDAL subdataset from MapServer? Anybody has idea? Wan’s to share?

Share Button
  1. 3 Responses to “Temporal OWS Services”

  2. I ca’t help with the GDAL/Mapserver issue but I’m curious about the OWSProxy implementation.. it’s a pure client implementation? did u extend the OL WCS/WFS parsers to achieve this?

    By Pedro Mendes on Jun 27, 2011

  3. Pedro, the OWSProxy is Python-MapServer-GDAL-based server-side application, which sits on the server. It get’s something like:


    In this case (works for WFS as well), it parsers the Capabilities from WCS (WFS) and translates it to WMS Capabilities. Than it transforms WMS GetMap into WCS GetCoverage and WFS GetFeature.

    So than you can run any WMS client on top of it. It’s going to support time (see the blogpost), filter encoding, SLD and other stuff, you usually need to display a map.

    And I hope, we will opensource it soon ;-)

    By jachym on Jun 27, 2011

  4. The answer is probably: via VRT driver.

    gdalbuildvrt accepts subdatasets as input, so you can generate VRT file (XML file) which is then readable via MapServer (or any other GDAL-based software).

    Hope it helps,


    By Petr Pridal (Klokan Technologies) on Jun 27, 2011

Post a Comment