Hi Michał,

Looking at the code, I think this is an error in the documentation - time 
ranges in WCS 1.0 do not seem to be supported. There are no tests that cover 
time ranges either. 

You could use runtime substitution to create your own queries with custom 
parameters e.g. START_DATE=2022-03-10&END_DATE=2022-04-10 

The section at 
https://mapserver.org/ogc/wcs_server.html#spatio-temporal-indexes recommends 
using a TILEINDEX for the layer. 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Fri, Feb 16, 2024, at 4:31 PM, Michał Bojko via MapServer-users wrote:
> 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:* [email protected]
 <https://cloudferro.com/>
> 
> _______________________________________________
> MapServer-users mailing list
> [email protected]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
_______________________________________________
MapServer-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to