Opened 7 years ago

Closed 3 years ago

#3449 closed defect (fixed)

adding wcs time support

Reported by: yanchen Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.5.4
Severity: normal Keywords: wcs time
Cc: gaopeng, rprinceley

Description (last modified by warmerdam)

========the following is the designed query example:

YYYY time instant
http://rasterqa2/ArcGIS/services/WinTemp_M_MD_Ref_Time/ImageServer/wcsserver?service=WCS&version=1.0.0&request=GetCoverage&Coverage=1&CRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=600&HEIGHT=800&FORMAT=JPEG&TIME=1870

YYYYMMDDHHMMSS time instant
http://benxi1/ArcGIS/services/time/ImageServer/wcsserver?service=WCS&version=1.0.0&request=GetCoverage&Coverage=1&CRS=EPSG:54004&BBOX=0,0,400,400&WIDTH=1200&HEIGHT=1000&FORMAT=JPEG&TIME=2000-01-01T14:30:30

YYYYMMDDHHMMSS time extent
http://benxi1/ArcGIS/services/time/ImageServer/wcsserver?service=WCS&version=1.0.0&request=GetCoverage&Coverage=1&CRS=EPSG:54004&BBOX=0,0,400,400&WIDTH=1200&HEIGHT=1000&FORMAT=JPEG&TIME=1999-12-31T14:30:30/2000-01-01T14:30:30

Time = <time>/<time>/<duration> for 1.0.0
TimeSuquence = <time>/<time>/<duration> for 1.1.x

Change History (12)

comment:1 Changed 7 years ago by warmerdam

Component: defaultGDAL_Raster
Description: modified (diff)
Owner: changed from frank warmerdam to warmerdam

Yan,

Can you provide an url to a public WCS server I can test against? The urls you hae provided seem to be against local domain names for servers that won't work from the outside.

comment:2 Changed 7 years ago by warmerdam

Cc: gaopeng added
Status: newassigned

It will be hard for me to progress on this effectively without an accessable test server.

I will try and setup a MapServer? instance to test against for some initial work on time support.

comment:3 Changed 6 years ago by rprinceley

Cc: rprinceley added

comment:4 Changed 6 years ago by rprinceley

You could use the THREDDS WCS server for testing - http://www.unidata.ucar.edu/projects/THREDDS/tech/reference/WCS.html.

This data has time:

http://motherlode.ucar.edu:8080/thredds/wcs/fmrc/NCEP/GFS/Alaska_191km/runs/NCEP-GFS-Alaska_191km_RUN_2011-06-09T12:00:00Z?

comment:5 Changed 6 years ago by rprinceley

Frank,

I think it would be a good idea to return DescribeCoverage? result as dataset metadata. Since we are using an in-memory WCS_GDAL string, there is no way to get CoverageOffering? node from the dataset.

comment:6 Changed 6 years ago by gaopeng

Frank,
What do you think the time dimension should be handled in the context of GDAL WCS dataset, e.g. how should apps query for time information, and set up the dataset to request pixels for a given time position, and etc?

comment:7 Changed 6 years ago by warmerdam

Gao,

My approach in other contexts has been to treat the time increments as bands. So the above THREDDS service would be a 21 band dataset with the timestamps set as metadata on the bands. An alternative would be to treat each timeslice as a subdataset. To be honest neither approach is particularly clean but the time dimension isn't something normally represented in the GDAL data model (or common raster data models).

Robin,

I agree about exposing the coverage offering as a metadata domain. I will go ahead and implement that.

comment:8 Changed 6 years ago by rprinceley

Frank, Gao,

With coverage details exposed as metadata, we could open, query timePosition nodes and reopen using 'time=' argument in <GetCoverageExtra?> for a specific timeslice.

Frank,

The THREDDS implementation reportedly requires a 'time' argument for GetCoverage? requests (not confirmed). If that's the case, we'll need to append a default value.

comment:9 Changed 6 years ago by warmerdam

That would certainly work, even though it isn't going to be something that other GDAL users will be able to use well. I've given up on the THREDDS server which is badly broken due to the use of lat/long for requests against a file that is projected. I can never know what I'll get back so I can't make real requests.

I am now testing with a MapServer? based instance at:

http://demo.mapserver.org/cgi-bin/wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCapabilities

comment:10 Changed 6 years ago by warmerdam

A few quirks with that service!

But I have proceeded to add (r22536) logic to the WCS driver to pick a default time if temporal positions are defined and to use it in the request. I take care to short circuit this if the time is specified in the service url or in GetCoverageExtra?.

Tomorrow I would like to implement a subdataset mechanism for different time values if I can.

comment:11 Changed 6 years ago by warmerdam

Subdatasets are now enumerated for all time positions available in trunk (r22542). Hmm, I still need to make this work for all-in-filename cases, and to add some test suite entries.

TIME_POSITION metadata is also set on the dataset when time selection is in play.

warmerda@gdal65[95]% gdalinfo ms_time.wcs --debug off
Driver: WCS/OGC Web Coverage Service
Files: ms_time.wcs
Size is 2481, 1807
Coordinate System is:
PROJCS["NAD83 / UTM zone 15N",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4269"]],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-93],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","26915"],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH]]
Origin = (159457.000000000000000,5501645.000000000000000)
Pixel Size = (500.000000000000000,-500.000000000000000)
Metadata:
  TIME_POSITION=2002-185
Subdatasets:
  SUBDATASET_1_NAME=WCS_SDS:time="2002-001",ms_time.wcs
  SUBDATASET_1_DESC=Coverage modis at time 2002-001
  SUBDATASET_2_NAME=WCS_SDS:time="2002-057",ms_time.wcs
  SUBDATASET_2_DESC=Coverage modis at time 2002-057
  SUBDATASET_3_NAME=WCS_SDS:time="2002-073",ms_time.wcs
  SUBDATASET_3_DESC=Coverage modis at time 2002-073
  SUBDATASET_4_NAME=WCS_SDS:time="2002-089",ms_time.wcs
  SUBDATASET_4_DESC=Coverage modis at time 2002-089
  SUBDATASET_5_NAME=WCS_SDS:time="2002-097",ms_time.wcs
  SUBDATASET_5_DESC=Coverage modis at time 2002-097
  SUBDATASET_6_NAME=WCS_SDS:time="2002-105",ms_time.wcs
  SUBDATASET_6_DESC=Coverage modis at time 2002-105
  SUBDATASET_7_NAME=WCS_SDS:time="2002-121",ms_time.wcs
  SUBDATASET_7_DESC=Coverage modis at time 2002-121
  SUBDATASET_8_NAME=WCS_SDS:time="2002-153",ms_time.wcs
  SUBDATASET_8_DESC=Coverage modis at time 2002-153
  SUBDATASET_9_NAME=WCS_SDS:time="2002-169",ms_time.wcs
  SUBDATASET_9_DESC=Coverage modis at time 2002-169
  SUBDATASET_10_NAME=WCS_SDS:time="2002-185",ms_time.wcs
  SUBDATASET_10_DESC=Coverage modis at time 2002-185
Corner Coordinates:
Upper Left  (  159457.000, 5501645.000) ( 97d42'39.02"W, 49d34'16.99"N)
Lower Left  (  159457.000, 4598145.000) ( 97d 4'38.66"W, 41d27'45.44"N)
Upper Right ( 1399957.000, 5501645.000) ( 80d40'50.25"W, 49d 0'20.53"N)
Lower Right ( 1399957.000, 4598145.000) ( 82d18' 6.92"W, 41d 2' 5.85"N)
Center      (  779707.000, 5049895.000) ( 89d25' 0.65"W, 45d32'46.92"N)
Band 1 Block=1024x512 Type=Int16, ColorInterp=Undefined
  Overviews: 1240x903, 620x451

comment:12 Changed 3 years ago by Jukka Rahkonen

Resolution: fixed
Status: assignedclosed

From http://www.gdal.org/frmt_wcs.html:

"Starting with GDAL 1.9.0, this driver includes experimental support for time based WCS 1.0.0 servers. On initial access the last offered time position will be identified as the DefaultTime?. Each time position available for the coverage will be treated as a subdataset.

Note that time based subdatasets are not supported when the service description is the filename. Currently time support is not available for versions other than WCS 1.0.0. "

Closing as fixed. Better to create new tickets with accurate targets if the experimental time support does not feel good enough.

Note: See TracTickets for help on using tickets.