[mapserver-users] Sliver when displaying 0°-360° NetCDF data in EPSG:3857

2020-06-26 Thread Rousseau Lambert2, Louis-Philippe (EC)
Hi,

This issue is related to:

  *   
https://github.com/mapserver/mapserver/commit/722716c49de2399f54b275ab31437f0e8c92cd63
  *   
https://github.com/mapserver/mapserver/commit/4c2aeb4bbd229723d8ea67c337cf02350575b2ae

The issue is that when I try to visualize (via WMS) a layer with a NetCDF data 
file with longitude from 0° to 360° in EPSG:3857, there is a sliver around 
longitude 0° where no data is displayed.

We already had that issue with the same files using EPSG:4326 and it's been 
fixed in MapServer (see merge request above).

Here is where you can find example files: 
https://dd.weather.gc.ca/model_giops/netcdf/lat_lon/2d/00/003/CMC_giops_votemper_depth_0.5_latlon0.2x0.2_3h-mean_{mmdd}00_P003.nc

We are testing using: MapServer version 7.4.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML 
SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO 
SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS 
SUPPORTS=GEOS SUPPORTS=POINT_Z_M INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

Here is a minimal mapfile to reproduce:

MAP
 NAME ""
 IMAGETYPE PNG
 EXTENT -180 -90 180 90
 MAXSIZE 4096
 SIZE 500 300
 IMAGECOLOR 255 255 255
 PROJECTION
  "init=epsg:4326"
 END
 TRANSPARENT ON
  DEBUG 5
 WEB
  METADATA
"ows_extent" "-180 -90 180 90"
"wms_getmap_formatlist" "image/png,image/jpeg"
"wms_timeformat" "-MM-DDTHH:MM:SSZ"
"wms_getfeatureinfo_formatlist" "text/plain"
"ows_enable_request" "*"
"ows_abstract" ""
"ows_srs" "EPSG:4326 EPSG:3857"
"ows_title" ""
  END
 END
LAYER
 NAME "TEST"
 DEBUG 5
 TYPE RASTER
 PROCESSING "GDAL_NETCDF_BOTTOMUP=YES"
 TOLERANCE 15
 TEMPLATE "ttt.html"
PROJECTION
 "proj=longlat"
 "a=6371229"
 "b=6371229"
 "lon_wrap=180"
 "no_defs"
END
 DATA ''
 METADATA
  "ows_title" ""
  "ows_abstract" ""
  "ows_extent" "-180 -80.1 180 89.9"
  "ows_geomtype" "Geometry"
 END
CLASS
 NAME ""
 STYLE
  COLORRANGE 0 0 127 127 0 0
  DATARANGE 200.00 400
 END
END
END
END

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] TR: "ows_http_max_age" have no effect...

2019-09-19 Thread Rousseau Lambert2, Louis-Philippe (EC)
Oups sorry, pressed the shift key too soon... Here is the complete 
message/question:


Hi everyone!


I'm trying to set a cache-control maximum age for my web services and am having 
some difficulties making it work.


I have added the line `"ows_http_max_age" "10800"` in my mapfile 
(MAP.WEB.METADATA) but the response headers I get (from curl) does not have any 
cache-control value:


```

HTTP/1.0 200 OK
Date: Thu, 19 Sep 2019 18:08:46 GMT
Server: WSGIServer/0.1 Python/2.7.6
Content-type: image/png
Content-Length: 653383
```

I am using:

MapServer version 7.0.7 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS 
SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS 
SUPPORTS=POINT_Z_M INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


and here is a minimal working mapfile example, you can use any *TMP_TGL_2* data 
from

http://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/00/000/


```

MAP
 NAME ""
 IMAGETYPE PNG
 EXTENT -180 -90 180 90
 MAXSIZE 4096
 SIZE 500 300
 IMAGECOLOR 255 255 255
 PROJECTION
  "init=epsg:4326"
 END
 TRANSPARENT ON
 DEBUG 5
 WEB
  METADATA
"ows_http_max_age" "10800"
"ows_extent" "-180 -90 180 90"
"wms_getmap_formatlist" "image/png,image/jpeg"
"ows_enable_request" "*"
"ows_srs" "EPSG:4326"
"ows_title" "example"
  END
 END
LAYER
 NAME "GDPS"
 DEBUG 5
 TYPE RASTER
 TOLERANCE 15
 TEMPLATE "ttt.html"
PROJECTION
 "proj=longlat"
 "a=6371229"
 "b=6371229"
 "no_defs"
 "pm=-359.88"
END
 DATA 
'/path/to/model_gem_global/25km/grib2/lat_lon/00/015/CMC_glb_TMP_TGL_2_latlon.24x.24_2019091900_P015.grib2'
 METADATA
  "ows_title" "GDPS"
  "ows_include_items" "all"
  "ows_abstract" "stuf"
  "ows_extent" "-180 -90.24 180 90"
  "ows_geomtype" "Geometry"
  "ows_size" "1500 751"
  "gml_include_items" "all"
 END
CLASSGROUP "TEMPERATURE-LINEAR"
CLASS
 NAME "1"
 GROUP "TEMPERATURE-LINEAR"
 EXPRESSION ([pixel] < 0)
 STYLE
  COLORRANGE 0 0 255 0 255 0
  DATARANGE -100.0 0
 END
END
CLASS
 NAME "2"
 GROUP "TEMPERATURE-LINEAR"
 EXPRESSION ([pixel] >= 0)
 STYLE
  COLORRANGE 0 255 0 255 0 0
  DATARANGE 0 50
 END
END
   END
END


Thanks


LP


De : Rousseau Lambert2, Louis-Philippe (EC)
Envoyé : 19 septembre 2019 14:13
À : mapserver-users@lists.osgeo.org
Objet : "ows_http_max_age" have no effect...


Hi everyone!


I'm trying to set a cache-control maximum age for my web services and am having 
some difficulties making it work.


I have added the line `"ows_http_max_age" "10800"` in my mapfile 
(MAP.WEB.METADATA) but the response headers I get does not have any 
cache-control value:


```
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] "ows_http_max_age" have no effect...

2019-09-19 Thread Rousseau Lambert2, Louis-Philippe (EC)
Hi everyone!


I'm trying to set a cache-control maximum age for my web services and am having 
some difficulties making it work.


I have added the line `"ows_http_max_age" "10800"` in my mapfile 
(MAP.WEB.METADATA) but the response headers I get does not have any 
cache-control value:


```
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] WCS 2.0 request without interpolation

2018-11-13 Thread Rousseau Lambert2, Louis-Philippe (EC)
Hi guys,

Do you know if it's possible to do a WCS 2.0 request without interpolation, 
like simply clip the original file on it's native grid?

I know that there is the INTERPOLATION parameter for WCS, but the only possible 
values are "NEAREST", "BILINEAR" and "AVERAGE". And I don't see a way using wcs 
keywords in the mapfile to add or modify the interpolation options...

I get that for this to even be possible the BBOX of the request would have to 
be made in the the dataset native CRS.

Thanks

LP
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Inversed lat/long in WMS 1.3.0 GetCapabilties

2018-07-26 Thread Rousseau Lambert2, Louis-Philippe (EC)
Great, thanks for the info :)

LP

On 07/26/2018 06:27 PM, Even Rouault wrote:
> Louis Philippe,
>
>> Just found something strange in the WMS GetCapabilties.
>>
>> With a GetCapabilities requets version 1.3.0, the Bounding box values looks
>> to be inversed:
>>
>>
>>   *  
>> geo.weather.gc.ca/geomet?SERVICE=WMS=1.3.0=GetCapabilities&
>> LAYER=GDPS.ETA_TT *  
>> -180> tBoundLongitude>180-90> atitude>90> x>
> This is the expected output. WMS 1.3.0 is supposed to honour EPSG axis order, 
> and EPSG:4326 has X=latitude and Y=longitude.
> Previous WMS versions didn't honour this and had X=longitude and Y=latitude.
>
> Even
>
>


-- 
Louis-Philippe Rousseau Lambert, B.Sc.
Géomaticien / Geomatician
Section des Données, Performances et Standards
Data, Performance and Standards Section
Service Météorologique du Canada
Meteorological Service of Canada
Environnement et Changement Climatique Canada
Environment and Climate Change Canada
louis-philippe.rousseaulambe...@canada.ca
(514) 421-5045

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Inversed lat/long in WMS 1.3.0 GetCapabilties

2018-07-26 Thread Rousseau Lambert2, Louis-Philippe (EC)
Hi everyone!

Just found something strange in the WMS GetCapabilties.

With a GetCapabilities requets version 1.3.0, the Bounding box values looks to 
be inversed:


  *   
geo.weather.gc.ca/geomet?SERVICE=WMS=1.3.0=GetCapabilities=GDPS.ETA_TT
 *   
-180180-9090

While for the 1.1.1 version it looks fine.

  *   
geo.weather.gc.ca/geomet?SERVICE=WMS=1.1.1=GetCapabilities=GDPS.ETA_TT
 *   

I'm using MapServer 7.0.7

in my mapfile, the extent is defined as:  EXTENT -180 -90 180 90 in EPSG:4326, 
which should be the right way according to the doc: EXTENT [minx] [miny] [maxx] 
[maxy]

Thanks

LP
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] time enabled WCS with tile index

2018-06-28 Thread Rousseau Lambert2, Louis-Philippe (EC)
hmm  looks like there is no "time" at all in my Describe coverage... I confirm 
that "time" is there in the WMS GetCapabilties.


 
http://www.opengis.net/wcs/2.0; 
xmlns:ows="http://www.opengis.net/ows/2.0; 
xmlns:ogc="http://www.opengis.net/ogc; x
mlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:gml="http://www.opengis.net/gml/3.2; xmlns:gmlcov=
"http://www.opengis.net/gmlcov/1.0; xmlns:swe="http://www.opengis.net/swe/2.0; 
xsi:schemaLocation="http://www.opengis.net/wcs/2.0 http://schemas.opengis
.net/wcs/2.0/wcsAll.xsd ">
  

  http://www.opengis.net/def/crs/EPSG/0/4326; 
axisLabels="lat long" uomLabels="deg deg" srsDimension="2">
41.051 -140.644
83.449 -52.051
  

DCS.TN.HISTO.YEAR.ABS_PCTL25

  

  
0 0
1067 509
  

long lat

  http://www.opengis.net/def/crs/EPSG/0/4326;>
83.458328 -140.958298
  

http://www.opengis.net/def/crs/EPSG/0/4326;>0 
0.08
http://www.opengis.net/def/crs/EPSG/0/4326;>-0.08 
0
  


  

  



  
-3.4028e+38 3.4028e+38
12
  

  


  



  
-3.4028e+38 3.4028e+38
12
  

  
...


LP





________
De : Rahkonen Jukka (MML) 
Envoyé : 28 juin 2018 11:52
À : Rousseau Lambert2, Louis-Philippe (EC); mapserver-users@lists.osgeo.org
Objet : Re: time enabled WCS with tile index


Hi,

I do not have Mapserver WCS with time up at the moment so I can’t do much 
testing. What if you use some of the timePositions as it appears in the 
GetCapabilities? Example here
https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?service=WCS=2.0.1=DescribeCoverage=ortokuva__ortokuva

-Jukka Rahkonen-

Lähettäjä: Rousseau Lambert2, Louis-Philippe (EC) 
[mailto:louis-philippe.rousseaulambe...@canada.ca]
Lähetetty: 28. kesäkuuta 2018 17:41
Vastaanottaja: Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>;
 mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: RE: time enabled WCS with tile index


Thanks for your answer, I'm indeed now testing my build in my command line.



But I'm still having the issue...



Query:

mapserv -nh 
"QUERY_STRING=map=/path/to/mapfile/climate-WCS-en.map=WCS=2.0.1=GetCoverage=DCS.TN.HISTO.YEAR.ABS_PCTL25=image/tiff=time(%221978%22)"



I get the error:

  
 
http://www.opengis.net/ows/2.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; version="2.0.1" 
xml:lang="en-US" x
si:schemaLocation="http://www.opengis.net/ows/2.0 
http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd<http://www.opengis.net/ows/2.0%20http:/schemas.opengis.net/ows/2.0/owsExceptionReport.xsd>">
  
msWCSParseTimeOrScalar20(): WCS server error. String 
"1978" could not be parsed to a time or scalar value
msParseTime(): Regular expression error. Unrecognized date or time format 
("1978").
  




Any idea what might be causing this ?



I also tried adding the "ows_timeformat" "" at the WEB metadata level 
without success...



Thanks

LP
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] time enabled WCS with tile index

2018-06-28 Thread Rousseau Lambert2, Louis-Philippe (EC)
Thanks for your answer, I'm indeed now testing my build in my command line.


But I'm still having the issue...


Query:

mapserv -nh 
"QUERY_STRING=map=/path/to/mapfile/climate-WCS-en.map=WCS=2.0.1=GetCoverage=DCS.TN.HISTO.YEAR.ABS_PCTL25=image/tiff=time(%221978%22)"


I get the error:

  
 
http://www.opengis.net/ows/2.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; version="2.0.1" 
xml:lang="en-US" x
si:schemaLocation="http://www.opengis.net/ows/2.0 
http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd;>
  
msWCSParseTimeOrScalar20(): WCS server error. String 
"1978" could not be parsed to a time or scalar value
msParseTime(): Regular expression error. Unrecognized date or time format 
("1978").
  



Any idea what might be causing this ?


I also tried adding the "ows_timeformat" "" at the WEB metadata level 
without success...


Thanks

LP

____
De : Rahkonen Jukka (MML) 
Envoyé : 28 juin 2018 09:46
À : Rousseau Lambert2, Louis-Philippe (EC); mapserver-users@lists.osgeo.org
Objet : Re: time enabled WCS with tile index

Hi,

I would like to say that you should not waste your time with using QGIS as a 
WCS client because it is rather useless for that. It tries to use WCS as a poor 
substitute for WMS as you can see from your example query that includes 
=6=3.

I suggest to switch to WCS 2.0.1, write your requests by hand and send them 
with curl, wget, or browser.

Here is an example about WCS 2.0.1 GetCoverage query syntax with time dimension
https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?service=WCS=2.0.1=GetCoverage=ortokuva__ortokuva=E(393450,393650)=N(7495450,7495650)=image/tiff=time(%222010-12-31T00:00:00.000Z%22)

-Jukka Rahkonen-


Lähettäjä: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] 
Puolesta Rousseau Lambert2, Louis-Philippe (EC)
Lähetetty: 28. kesäkuuta 2018 16:20
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] time enabled WCS with tile index


Hi guys,



I'm working on a project which requires WMS and WCS time enabled layers.



I'm using the tile index for time support, which is working fine for WMS but I 
can't get the time to work for WCS request...



In my shapefile I have a column for the data path and one (timestamp) for the 
time.



Exemple request form Qgis WCS:

mapserv -nh 
"QUERY_STRING=map=/path/to/mapfile/WCS-en.map=WCS=1.0.0=GetCoverage=GTiff=DCS.TN.HISTO.YEAR.ABS_PCTL25=1978=-96.74998463567416707,62.125300248,-96.2499848643258531,62.374699752=EPSG:4326_CRS=EPSG:4326=6=3"
 > dcs.tif



I get an error:

 
 
http://www.opengis.net/ogc; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.o
pengis.net/wcs/1.0.0/OGC-exception.xsd<http://www.opengis.net/ogc%20http:/schemas.o%0bpengis.net/wcs/1.0.0/OGC-exception.xsd>">
  msGetGDALBandList(): Image handling error. BANDS PROCESSING 
directive has wrong number of bands, expected at most 4, got 55.
  




At the base I have one netcdf file with 55 bands each representing a different 
time step. In order to use the shapefile index, I created 55 VRTs each pointing 
to a band in the original NetCDF. Than in the shapefile index, I'm pointing to 
those VRT for each time step. It works fine for WMS but not WCS...



Here is my mapfile:

MAP

STATUS ON

WEB

METADATA

"wcs_description" "The weather can have an incredible influence on 
our daily lives. It affects the growth of crops and the availability of water. 
It dictates which regions of the world are habitable or uninhabitable"

"ows_extent" "-141,42,-52,84"

"ows_contactinstructions" "During hours of service"

"wcs_label" "Meteorological Service of Canada Geospatial Web 
Services 0.1.0"

"ows_title" "title"

"wcs_enable_request" "*"

END

END

PROJECTION

"init=epsg:4326"

END

NAME "climate"

QUERYMAP

STATUS OFF

COLOR 255 255 0

STYLE HILITE

SIZE 500 300

END

LAYER

STATUS OFF

NAME "DCS.TN.HISTO.YEAR.ABS_PCTL25-tileindex"

DATA 
"/path/to/tileindex/ts_absolute_p25_historical_1951_2005_tn_ann.shp"

TYPE POLYGON

FILTERITEM 'timestamp'

FILTER '%timestamp%'

METADATA

"ows_enable_request" "!*"

END

END

LAYER

STATUS ON


[mapserver-users] time enabled WCS with tile index

2018-06-28 Thread Rousseau Lambert2, Louis-Philippe (EC)
Hi guys,


I'm working on a project which requires WMS and WCS time enabled layers.


I'm using the tile index for time support, which is working fine for WMS but I 
can't get the time to work for WCS request...


In my shapefile I have a column for the data path and one (timestamp) for the 
time.


Exemple request form Qgis WCS:

mapserv -nh 
"QUERY_STRING=map=/path/to/mapfile/WCS-en.map=WCS=1.0.0=GetCoverage=GTiff=DCS.TN.HISTO.YEAR.ABS_PCTL25=1978=-96.74998463567416707,62.125300248,-96.2499848643258531,62.374699752=EPSG:4326_CRS=EPSG:4326=6=3"
 > dcs.tif


I get an error:

 
 
http://www.opengis.net/ogc; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.o
pengis.net/wcs/1.0.0/OGC-exception.xsd">
  msGetGDALBandList(): Image handling error. BANDS PROCESSING 
directive has wrong number of bands, expected at most 4, got 55.
  



At the base I have one netcdf file with 55 bands each representing a different 
time step. In order to use the shapefile index, I created 55 VRTs each pointing 
to a band in the original NetCDF. Than in the shapefile index, I'm pointing to 
those VRT for each time step. It works fine for WMS but not WCS...


Here is my mapfile:

MAP
STATUS ON
WEB
METADATA
"wcs_description" "The weather can have an incredible influence on 
our daily lives. It affects the growth of crops and the availability of water. 
It dictates which regions of the world are habitable or uninhabitable"
"ows_extent" "-141,42,-52,84"
"ows_contactinstructions" "During hours of service"
"wcs_label" "Meteorological Service of Canada Geospatial Web 
Services 0.1.0"
"ows_title" "title"
"wcs_enable_request" "*"
END
END
PROJECTION
"init=epsg:4326"
END
NAME "climate"
QUERYMAP
STATUS OFF
COLOR 255 255 0
STYLE HILITE
SIZE 500 300
END
LAYER
STATUS OFF
NAME "DCS.TN.HISTO.YEAR.ABS_PCTL25-tileindex"
DATA 
"/path/to/tileindex/ts_absolute_p25_historical_1951_2005_tn_ann.shp"
TYPE POLYGON
FILTERITEM 'timestamp'
FILTER '%timestamp%'
METADATA
"ows_enable_request" "!*"
END
END
LAYER
STATUS ON
TILEITEM "location"
NAME "DCS.TN.HISTO.YEAR.ABS_PCTL25"
DUMP TRUE
TILEINDEX "DCS.TN.HISTO.YEAR.ABS_PCTL25-tileindex"
CLASS
GROUP "TEMP-ABSOLUTE"
STYLE
DATARANGE -60 -28
COLORRANGE 10 40 100 51 102 217
END
EXPRESSION ([pixel] < -28 AND [pixel] > -95)
NAME "< -28"
END
TEMPLATE "ttt.html"
CLASSGROUP "TEMP-ABSOLUTE"
METADATA
"ows_timeextent" "1951/2005/P1Y"
"wcs_timeposition" 
'1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005'
"wcs_band_names" "B1951 B1952 B1953 B1954 B1955 B1956 B1957 B1958 
B1959 B1960 B1961 B1962 B1963 B1964 B1965 B1966 B1967 B1968 B1969 B1970 B1971 
B1972 B1973 B1974 B1975 B1976 B1977 B1978 B1979 B1980 B1981 B1982 B1983 B1984 
B1985 B1986 B1987 B1988 B1989 B1990 B1991 B1992 B1993 B1994 B1995 B1996 B1997 
B1998 B1999 B2000 B2001 B2002 B2003 B2004 B2005"
"wms_timeitem" "timestamp"
"wcs_timeitem" "timestamp"
"ows_extent" "-140.644 41.051 -52.051 83.449"
"ows_title" "title"
"wms_timedefault" "2005"
"ows_enable_request" "*"
"ows_layer_group" "//Downscale climate scenarios (DCS)/Maximum 
temperature/Historical/Annual"
"wcs_label" "Mean temperature"
"wcs_resolution" "0.08295198278 -0.08313348017"
"wcs_size" "1068 510"
"wcs_bandcount" "55"

END
TYPE RASTER
PROJECTION
"+proj=longlat +datum=WGS84 +no_defs "
END
END
IMAGECOLOR 255 255 255
MAXSIZE 4096
OUTPUTFORMAT
MIMETYPE "image/tiff"
NAME "GEOTIFF_32"
EXTENSION "tif"
DRIVER "GDAL/GTiff"
IMAGEMODE FLOAT32
END
END
EXTENT -141 42 -52 84
DEBUG OFF
TRANSPARENT ON
IMAGETYPE "PNG"
SIZE 500 300
END

Thanks for the help!


LP


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] WCS default band ?

2018-06-14 Thread Rousseau Lambert2, Louis-Philippe (EC)
Hi !


I'm configuring a WCS web services with files that have many bands, like 150.


The layer is only available in WCS and I would like to be able to specify a 
default band to use. I tried the WMS way with the PROCESSING "BANDS=1" but if I 
ask for the layer with a WCS 2.0.1 request, all always get all the bands...


Here is the request I use:

localhost:8080/mapserv?map=/some/path/wcs.map=WCS=2.0.1=GetCoverage=layer_name=image/tiff=x(-160,-45)=y(25,85)


the result (from a 3 band layer) is always a 3 bands layer unless I specify a 
band to use in my WCS request. I would like it to only give a default band when 
I don't specify the RANGESUBSET...


Any idea on how to do, or I am doing something wrong ?


Thanks guys!


LP


Example mapfile:

MAP
 NAME "test"
 PROJECTION
  "init=epsg:4326"
 END
 OUTPUTFORMAT
  NAME GEOTIFF_16
  DRIVER "GDAL/GTiff"
  MIMETYPE "image/tiff"
  IMAGEMODE FLOAT32
  EXTENSION "tif"
 END
 EXTENT -180 -90 180 90
 SIZE 500 300
 WEB
  METADATA
"ows_enable_request" "*"
"ows_title" "My Web Services"
"wcs_label" "test for cccs"
  END
 END

LAYER
 NAME "layer_name"
 STATUS ON
 TYPE RASTER
 DUMP TRUE
 TEMPLATE "ttt.html"
PROJECTION
 "init=epsg:4326"
 "lon_wrap=180"
END
 DATA '/data/geomet/afsslor/cccs/cmip5/test.tif'
 PROCESSING "BANDS=1"
 METADATA
  "ows_title" "test"
  "ows_include_items" "all"
  "wms_enable_request" "!*"
  "wcs_enable_request" "*"
  "wcs_label" "test for cccs"
  "wcs_size" "360 180"
  "wcs_extent" "-180 -90 180 90"
  "wcs_imagemode" "FLOAT32"
  "wcs_bandcount" "3"
  "wcs_band_names" "BandA BandB BandC"
  #default values
  "wcs_band_interpretation"   "This is default interpretation"
  "wcs_band_uom"  "DefaultUOM"
  "wcs_band_definition"   "DefaultDefinition"
  "wcs_band_description"  "This is default description"
  "wcs_interval"  "195 310"
  "wcs_significant_figures"   "3"
 END
END
END

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Wrong WCS bounding box ?

2018-04-05 Thread Rousseau Lambert2, Louis-Philippe (EC)
Hi,

I was testing WCS GetCapabilties requests on my sever and saw that the layer 
bounding box values aren't right...

The layer extent should normally be -180, 17.2994, 180, 90 which is OK in the 
WMS GetCapabilities. The result I have in the WCS GetCapabilities is:


73.2514173838687 17.2994348501789
427.440941347144 81.1403650773625

The layer displays correctly in WMS (GetMap) and is also georeferenced 
correctly in WCS with the GetCoverage request.

Any idea why I would get this extent in my WCS GetCapabilties ? Please note 
that I have tried version 1.0.0, 1.1.1, 2.0.1 and am using MapServer 7.0.7

Example test mapfile:


MAP
 NAME "test"

 PROJECTION
  "init=epsg:4326"
 END
 WEB
  METADATA
"ows_enable_request" "*"
"ows_title" "My Web Services"
  END
 END
LAYER
 NAME "temp-test"
 STATUS ON
 TYPE RASTER
 DUMP TRUE
 TEMPLATE "ttt.html"
PROJECTION
 "proj=stere"
 "lat_0=90"
 "lat_ts=60"
 "lon_0=249"
 "k=90"
 "x_0=0"
 "y_0=0"
 "a=6371229"
 "b=6371229"
 "units=m"
 "no_defs"
END
 # Any layer on dd.weather.gc.ca that matches this pattern will work
 DATA 'dd.meteo.gc.ca/model_gem_regional/10km/grib2/*/*/*TMP_TGL_2*.grib2'
 METADATA
  "ows_title" "test"
  "wcs_label" "test"
  "wcs_rangeset_name" "Default Range"
  "wcs_rangeset_label" "Default Range"
  "ows_include_items" "all"
  "gml_include_items" "all"
 END
CLASSGROUP "TEMPERATURE"
CLASS
 NAME "-35 -30"
 GROUP "TEMPERATURE"
 EXPRESSION ([pixel] < 0)
 STYLE
  COLOR 0 0 183
 END
END
CLASS
 NAME "-30 -25"
 GROUP "TEMPERATURE"
 EXPRESSION ([pixel] >= 0)
 STYLE
  COLOR 0 0 239
 END
END
END
END

Thanks

LP

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Wind direction files rotation using CONNECTIONTYPE uvraster

2018-03-05 Thread Rousseau Lambert2, Louis-Philippe (EC)
Hi Andreas,

Thanks for the fix.

I tried with your solution  and  with a simple source but
it didn't change anything in the arrow direction...

But Using the complex Source with  and  worked
fine for me.

Thanks again!

LP

On 03/05/2018 02:15 PM, Eichner, Andreas - SID wrote:
> Hi,
>
> since you're using GDAL VRT have you tried the "Scale" and "Offset" child 
> elements for a VRTRasterBand?
> I'd guess, using
>
> 
>   -1.0
>   360.0
>   ...
> 
>
> might work for you.
>
>
> Regards,
> Andreas
>
>> -Original Message-
>> From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org]
>> On Behalf Of Rousseau Lambert2, Louis-Philippe (EC)
>> Sent: Monday, March 05, 2018 2:46 PM
>> To: mapserver-users@lists.osgeo.org
>> Subject: [mapserver-users] Wind direction files rotation using
>> CONNECTIONTYPE uvraster
>>
>> Hi all,
>>
>> What I'm trying to do:
>>
>> *I want to display wind arrows using 2 files: wind direction and
>> wind speed. I am using the "CONNECTIONTYPE uvraster" feature to display
>> our arrows. Because we don't have U and V wind vectors in the North-
>> South direction for some models, we use the WIND and WDIR files which
>> are respectively wind speed and wind direction (in the North-South
>> direction, or Earth relative). So as input for my layer in MapServer I
>> have a VRT where band 1 is the wind direction (from 0 to 360 degres) and
>> band 2 is the wind speed. Instead of letting MapServer calculates the
>> resulting arrows speed and direction I'm using the raw value of u ([u])
>> as wind direction and the raw value of v ([v]) as my wind speed. So far
>> so good.
>>
>>
>> My problem is:
>>
>> *The arrow rotation is done using the ANGLE keyword and [u] (wind
>> direction). But the ANGLE rotates the arrows in the counter clockwise
>> direction while the wind direction files increase in a clockwise
>> direction... Because we are using wind direction and wind speed files
>> (raw values of [u] and [v]) we can't use the [uv_minus_angle] and I know
>> that MapServer docs says that no processing can be done on the ANGLE
>> feature. I know that I would have to do some pre-processing (like 360-
>> [u]) and that would solve the problem. But I would have to do this for
>> hundreds of file per day and I'm trying to avoid as much as possible
>> pre-processing.
>>
>> Can you guys think of a solution that would not require pre-processing?
>> I tried playing with the arrow position and other little things but I
>> could not make it work correctly and I'm pretty much out of ideas...
>>
>>
>> Thanks
>>
>> LP
>>
>


-- 
Louis-Philippe Rousseau Lambert, B.Sc.
Géomaticien / Geomatician
Section des Données, Performances et Standards
Data, Performance and Standards Section
Service Météorologique du Canada
Meteorological Service of Canada
Environnement et Changement Climatique Canada
Environment and Climate Change Canada
louis-philippe.rousseaulambe...@canada.ca
(514) 421-5045

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Wind direction files rotation using CONNECTIONTYPE uvraster

2018-03-05 Thread Rousseau Lambert2, Louis-Philippe (EC)
Hi all,

What I'm trying to do:

  *   I want to display wind arrows using 2 files: wind direction and wind 
speed. I am using the "CONNECTIONTYPE uvraster" feature to display our arrows. 
Because we don't have U and V wind vectors in the North-South direction for 
some models, we use the WIND and WDIR files which are respectively wind speed 
and wind direction (in the North-South direction, or Earth relative). So as 
input for my layer in MapServer I have a VRT where band 1 is the wind direction 
(from 0 to 360 degres) and band 2 is the wind speed. Instead of letting 
MapServer calculates the resulting arrows speed and direction I'm using the raw 
value of u ([u]) as wind direction and the raw value of v ([v]) as my wind 
speed. So far so good.

My problem is:

  *   The arrow rotation is done using the ANGLE keyword and [u] (wind 
direction). But the ANGLE rotates the arrows in the counter clockwise direction 
while the wind direction files increase in a clockwise direction... Because we 
are using wind direction and wind speed files (raw values of [u] and [v]) we 
can't use the [uv_minus_angle] and I know that MapServer docs says that no 
processing can be done on the ANGLE feature. I know that I would have to do 
some pre-processing (like 360-[u]) and that would solve the problem. But I 
would have to do this for hundreds of file per day and I'm trying to avoid as 
much as possible pre-processing.

Can you guys think of a solution that would not require pre-processing? I tried 
playing with the arrow position and other little things but I could not make it 
work correctly and I'm pretty much out of ideas...

Thanks

LP
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users