[MapServer-users] Pass time range in WCS 1.0.0 request GetCoverage

Michał Bojko mbojko at cloudferro.com
Fri Feb 16 07:31:03 PST 2024


Hello,
I am trying to build WCS service with usage of postgis database, but now I am unable to pass timerange in request to server. In my postgis database I have specified column for geometry and timestamp and request that use BBOX and TIME (single value) work fine. The problem is I cannot pass multiple dates or date range. When providing TIME in such manner, I receive this error message: "WCS server error. Temporal ranges are not supported, only individual values". In official documentation it is stated that it's possible to pass at least two TIME parameters at once in version 1.0.0, but it doesn't work for me (https://mapserver.org/pl/ogc/wcs_server.html#test-with-a-getcoverage-request). Is there specified way to pass timeranges/timelist (I didn't find any information about it)? Or maybe it isn't possible to pass multiple values? But when I look into mapserver logs I see that postgis query searches for records that are between selected one day, so why wouldn't it be possible to pass two days and search for records between them? Below I will paste some request and queries:
Request with single TIME value that's working for me:
http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&coverage=T36SVD&CRS=EPSG:3857&RESX=10&RESY=10&FORMAT=GTiff&BBOX=3572705,6277219,3637743,6334339&TIME=2022-03-10<http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&coverage=T36SVD&CRS=EPSG:3857&RESX=10&RESY=10&FORMAT=GTiff&BBOX=3572705,6277219,3637743,6334339&TIME=2022-03-10/2022-03-15>

Request with two TIME values that isn't working for me and error message:
http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&coverage=T36SVD&CRS=EPSG:3857&RESX=10&RESY=10&FORMAT=GTiff&BBOX=3572705,6277219,3637743,6334339&TIME=2022-03-10,2022-03-15
WCS server error. Temporal lists are not supported, only individual values.

Request with TIME range that also isn't working for me and error message:
http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&coverage=T36SVD&CRS=EPSG:3857&RESX=10&RESY=10&FORMAT=GTiff&BBOX=3572705,6277219,3637743,6334339&TIME=2022-03-10/2022-03-15
WCS server error. Temporal ranges are not supported, only individual values.

Postgis query from mapserver logs when request contains only one TIME value:
select "timestamp"::text,"cloudless_10"::text,"epsg"::text,ST_AsBinary(("geometry"),'NDR') as geom,"unique_id"::text from (select * from mrc where maxcc <= 100 AND (pid  = '-1' OR '-1' = '-1') AND (tile  = '-1' OR '-1' = '-1') order by maxcc desc) as subquerry where ST_Intersects("geometry", ST_GeomFromText('POLYGON((3572710 6277224,3572710 6334334,3637738 6334334,3637738 6277224,3572710 6277224))',3857)) and ("timestamp" between date_trunc('day',date '2022-03-10') and date_trunc('day',date '2022-03-10') + interval '1 day' - interval '1 second')

So, is there any possibility to use multiple TIME values in one GetCoverage request?
Best regards,
Michał
Michał Bojko
Trainee
CloudFerro S.A.
office: Fabryczna 5          m: 502 705 120
00-446 Warszawa, Poland    e: mbojko at cloudferro.com
[https://i.imgur.com/XRnmHDu.png]<https://cloudferro.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20240216/b18d3685/attachment.htm>


More information about the MapServer-users mailing list