OGC WCS and TIME

Norman Barker nbarker at ITTVIS.COM
Wed Dec 20 11:58:39 EST 2006


Hi,

Ok, to (try) answer your questions

1) Custom shapefiles can be created easily, you may find it easier to
create a shapefile first with gdaltindex and then abuse it to add the
TIME field, or create the shapefile from scratch as per the example
script

2) You would create a layer index like

    LAYER
        NAME 'vis_mos_idx'
        TYPE TILEINDEX
        DATA 'data/vis_mos/index'     (refers to the shape file index)
        FILTERITEM 'TIME'
        FILTER '%time%'
    END

And the a coverage layer like 

LAYER
        NAME 'vis_mos'
        STATUS OFF
        TYPE RASTER
        DUMP TRUE
        TILEINDEX 'vis_mos_idx'     (referencing above)
        PROJECTION
            "init=epsg:4326"
        END
        METADATA
           :
           :
        wcs_timeposition '  ... list of all the times, generated from
the filenames of the files in the shape index'
        wcs_timeitem 'time'
           :
END

3) Looking at the wcs.c code (which was written by Steve Lime, and Frank
W), bands is a keyword, and this is deliberately matched to bands of a
data file (logically enough!).  However it is difficult to add metadata
to the band description as to what each level represents, and they are
listed as values 1,2,3,etc.  To add additional parameters you would have
to change the code.

In summary I find the WCS interface to MapServer to be great, being able
to do time=..&bands=1,4,5,.. greatly reduces the client download, and
simplifies my data on the server, since a coverage layer represents a
collection of data files that could be constantly changing.

Can you send a link to the list for your server when you have finished,
showing changing (2-3 per day) data is an interesting use case.
Currently I use WCS for historic data.

Thanks,

Norman

-----Original Message-----
From: ara.t.howard at noaa.gov [mailto:ara.t.howard at noaa.gov] 
Sent: 20 December 2006 15:53
To: Norman Barker
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] OGC WCS and TIME

On Wed, 20 Dec 2006, Norman Barker wrote:

hi norman-

> I have done this a lot :-), what type of datasets are you trying to
use?
> Python with GDAL, OGR makes this very easy.
>
> For an example I have pasted a python script that creates U+V shape
indexes
> for MapServer WCS.  It prints the times out at the end which you can
copy in
> the mapfile as per the shape file.
>
> Let me know if you need any help.
>
> Norman

<snip> python script which i'm reading now </snip>

we will be serving dmsp (http://www.ngdc.noaa.gov/dmsp/) global mosaics
imagery of both visible and thermal bands
(http://www.ngdc.noaa.gov/eog/nrt/html/mosaic/ut_night/loop/).

we'll be serving one mosaic per band (5x) per satellite (2-3) per utday.
we
aim to have 30-90 days on disk and that leads to something like a max of
1000
layers.  our mapserver is compiled with MS_MAXLAYERS=200 and we could
simply
boost - but that's getting to be a BIG mapfile!  i looked at using
dynamic
layters but, afaikt, adding layers dynamically via mapscript results in
fubar
DescribeCoverage calls (see recent un-answered thread started by me on
the
subject).

therefore, what i'm trying to do is to uses mapserver's tiling support
with
the TIME= filter to store one utday's mosaic per tile and then,
obviously, to
require TIME=utday in the query.  ultimately i plan to have band and
satellite
specifc tiles as well to use with BAND= and PARAMETER= query components.
note
that none of our tiles are acutal spatial diviions.  we'd like to use
spatial
tiles but research so far shows consistent projection errors when
spatially
tiled imagery is served.

so, in summary, step one is reduce the number of layers i have by
creating
custom shapefiles (i fear this is the only way) which will
support/require
a TIME= component in each request.  the time component with by at the
utday
granularity.  an example tile name is

   F1520061212.nt.d.OIS.vis.mos.tif
      ^^^^^^^^
      ^^^^^^^^
      ^^^^^^^^
      utday

my specific (newbie) questions are

   1) how to create custom shapefiles which would included a time index.
i think
   i'll be able to manage this with your example python script and by
examining
   the output of gdaltindex.  i'm using ruby btw ;-) !

   2) how to configure a mapfile to reflect this change in structure.  a
vis
   layer is now specified in auto-generated mapfiles this way:

     LAYER
       NAME "F1620061220.nt.d.OIS.vis.mos.tif"
       PROCESSING "SCALE_1=0,63"
       METADATA
         wcs_description "F1620061220.nt.d.OIS.vis.mos.tif"
         wcs_name "F1620061220.nt.d.OIS.vis.mos.tif"
         wcs_label "F1620061220.nt.d.OIS.vis.mos.tif"
         ows_srs "EPSG:4326"
         ows_extent "-180 -75 180 75"
         wcs_resolution "0.00833333 -0.00833333"
         wcs_bandcount "1"
         wcs_formats "GEOTIFF"
         wcs_nativeformat "8-bit GeoTIF"
         wcs_rangeset_name "F1620061220.nt.d.OIS.vis.mos.tif"
         wcs_rangeset_label "vis"
         wcs_rangeset_axes "bands"
         wcs_bands_name "bands"
         wcs_bands_semantic "http://www.ngdc.noaa.gov/dmsp/"
         wcs_bands_refSys "European Petroleum Survey Group (EPSG)"
         wcs_bands_label "F1620061220.nt.d.OIS.vis.mos.tif"
         wcs_bands_values "VIS"
       END
       STATUS off
       DUMP true
       DATA "F1620061220.nt.d.OIS.vis.mos.tif"
       TYPE raster
       PROJECTION
         "init=epsg:4326"
       END
     END

   i realize i'll have to add an index layer and to refer to it somehow
in
   another layer definition, but am not quite clear how to go about
this.

   3) how much further i can abuse tile support to reduce the number of
layers
   in my mapfile.  i'm fairly certain band specfic tiles can be made to
work
   using BAND= query component, but am uncertain of PARAMETER= could be
used to
   support arbitrary, in this case by satellite, tiling.

   4) assuming the issues with data projection can be solved, if spatial
tiling
   could also be layered on top of the above later.


   5) ... just kidding - i suppose that's enough questions for now!


thanks for the input!

kind regards.

-a
-- 
if you find yourself slandering anybody, first imagine that your mouth
is
filled with excrement.  it will break you of the habit quickly enough. -
the
dalai lama



More information about the mapserver-users mailing list