Julien-Cousineau / MNRF

MNRF Dashboard
MIT License
2 stars 0 forks source link

Environment Canada WMS service #13

Closed Julien-Cousineau closed 6 years ago

Julien-Cousineau commented 6 years ago

Could potentially add a dropdown menu to select other WMS service. The legend could change on the selection as well. The current WMS service is based on RDPS.ETA_RN.

Issues

WMS service is fine for current or near current information. However, historical or even 24/48 data is not retrievable.

Solution

Getting the raw information from dd.weather.gc.ca would be best. We could save the raw information on the server, process it and create our own vector/rater tiles for current and historical data.

rywhale commented 6 years ago

That's actually the wrong WMS layer...

You want to be using RDPA ('Regional Deterministic Precipitation Analysis'). See https://weather.gc.ca/grib/grib2_RDPA_ps10km_e.html

Here's an example WMS query: http://geo.weather.gc.ca/geomet/?lang=E&service=WMS&version=1.1.1&request=GetFeatureInfo&query_layers=RDPA.24F_PR&info_format=text/plain&lat=43.68&lon=-79.62&date=2018-02-26T12:00:00Z

Note the layer name: RDPA.24F_PR

You'll notice that the data all has a ~24 hour lag. Putting today's date in the URL returns the most recent data available. You should also be able to access previous day's data using this layer.

I've contacted EC to ask about the delay but I think it's best to use this layer regardless.

On using other WMS sources: I'd say save this task for last, it's pretty low priority and we want to keep the interface as simple as possible for now.

Julien-Cousineau commented 6 years ago

Thanks - I was not too sure about the name of the WMS layer. I'll try it out with the date.

rywhale commented 6 years ago

I spoke to the folks at GeoMet and we're going to have to make one last change. We're going to shift to using the beta version of the WMS in order to access preliminary 24 hour data. This should cut down on the delay but might require a bit of extra thought on your part.

In particular, the "time" parameter must correspond with an actual file or the request will be returned empty. For more info see https://lists.ec.gc.ca/pipermail/geomet-info/2017-March/000039.html

Here's the info you need: URL : http://geo.weather.gc.ca/geomet-beta/?lang=en Layer Name: RDPA.24P_PR Timestamp format: YYYY-MM-DDT12:00:00Z

Example URL http://geo.weather.gc.ca/geomet-beta?service=WMS&version=1.3.0&request=GetFeatureInfo&layers=RDPA.24P_PR&crs=EPSG:4326&bbox=0,-180,90,0&exceptions=xml&width=180&height=90&query_layers=RDPA.24P_PR&typename=RDPA.24P_PR&x=1&y=1&time=2018-02-26T12:00:00Z

rywhale commented 6 years ago

@Julien-Cousineau Pinging you again to make sure you saw my previous message. Really important that we make this change before you finish up the 'draft' version.

Julien-Cousineau commented 6 years ago

Yes, will do. I have not address this issue yet. Will soon

Julien-Cousineau commented 6 years ago

Exciting! I'm able to retrieve a month of wms data. Need to query the api to find the range (minimum data and maximum date)

Julien-Cousineau commented 6 years ago

Using attribute name : RDPA.24P_PR. Please be advise there's also RDPA.24F_PR.