pacificclimate / plan2adapt-v2

Plan2Adapt in React, driven by CMIP5/6 backend
0 stars 0 forks source link

Use a BC (Albers) base map when we get BC Albers tiles working in CE ncWMS #34

Closed rod-glover closed 3 years ago

rod-glover commented 5 years ago

Will this ever happen?

rod-glover commented 4 years ago

A more helpful summary, courtesy of @corviday :

As of March 2020, there are 3 obvious options available. In order of difficulty to implement:

  1. Use PCEX ncWMS and EPSG;4326 projection

    • difficulty to add historical datasets: minimal, might already be done, depending on how diligent I was in the past about things that didn't matter at the time
    • difficulty to generate new datasets: unknown, estimated to be low-moderate, mostly around generating new metadata for them.
  2. Use PDP ncWMS and BC Albers projections

    • all datasets you wish to map must be added to the PDP database: difficulty, kind of obnoxious, the database is old and requires a lot of finessing, James is kind of horrified at how I do this, but it's definitely doable
    • add historical data - I think this dataset is already available, hydrology wanted it
    • add new datasets - generation, unknown, probably low-moderate. adding, not really more difficult than adding any other dataset
  3. Use a new instance of the PDP ncWMS

    • need to set up a new pdp database - this would be done by Matthew but probably not too hard
    • need to set up a new ncWMS-PCIC instance - this would be done by Matthew but probably not too hard
    • add historical data and new datasets, as above

Notes:

rod-glover commented 4 years ago

@corviday , I think how we go forward at the current moment is your call.

corviday commented 4 years ago

Additional context: The reason that ncWMS doesn't support BC Albers is that their third-party projection library doesn't ( https://github.com/Reading-eScience-Centre/ncwms/issues/47 ) . So the process of getting the PCEX nxWMS to support BC Albers looks either like:

Neither of which is a very quick process, unfortunately, so for the moment, we should choose between the PDP's ncWMS (supports BC Albers, harder to maintain) and PCEX's ncWMS (no BC Albers, easy to work with). It mostly comes down to how important BC Albers is, and whether we're willing to invest a few hours" extra setup time to get it.

corviday commented 4 years ago

Testing seems to show that the newest version of ncWMS does support BC Albers, making life considerably easier.

rod-glover commented 4 years ago

@corviday , can you elaborate on the testing you did re. BC Albers? The Capabilities page of recent releases (2.4.2, 2.5.1 candidate) shows the following SRS's available, omitting BC Albers (EPSG:3005):

<SRS>EPSG:4326</SRS>
<SRS>CRS:84</SRS>
<SRS>EPSG:41001</SRS>
<SRS>EPSG:27700</SRS>
<SRS>EPSG:3408</SRS>
<SRS>EPSG:3409</SRS>
<SRS>EPSG:3857</SRS>
<SRS>EPSG:5041</SRS>
<SRS>EPSG:5042</SRS>
<SRS>EPSG:32661</SRS>
<SRS>EPSG:32761</SRS>
corviday commented 4 years ago

The Capabilities page only offers the most common projections, which seems less useful than it could be.

I tested for BC Albers by running the server, accessing a URL that requested it and receiving an image that appears to be BC Albers, as far as I know. albers

rod-glover commented 4 years ago

That's great! Why and what use not showing all SRSs could possibly be is beyond me, but I'm glad it seems to work.

rod-glover commented 4 years ago

Not that it really matters, but the OpenGIS® Web Map Server Implementation Specification (1.3.0) says

A WMS server is not required to support all possible CRSs, but it shall advertise in its service metadata those CRSs which it does offer and shall accept requests for all advertised CRSs. If a request contains a CRS not offered by a particular server, the server shall throw a service exception (code = “InvalidCRS”).

Hmm.