Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would it be possible to also advertise palettes as styles, as in ncWMS? #86

Open
rsignell-usgs opened this issue Apr 18, 2017 · 12 comments

Comments

@rsignell-usgs
Copy link

As discussed here TerriaJS/terriajs#2200, generic WMS clients do not see the list of palettes advertised as styles, as ncWMS2 palettes are accessed through a custom getMetadata call.

Would it be possible to also allow ncWMS2 service providers to advertise the palettes as styles also, or at least some subset of palettes?

This would allow workflows like this TerriaJS one to work a lot more nicely:
2017-04-18_13-12-12

You can access this TerriaJS example workflow accessing ncWMS2 here:
http://tinyurl.com/k2o8yyn

@yosoyjay and @kwilcox, would this be something you might be able to tackle, if it sounds reasonable?

@yosoyjay
Copy link
Contributor

yosoyjay commented Apr 18, 2017 via email

@adamsteer
Copy link

adamsteer commented Apr 18, 2017 via email

@adamsteer
Copy link

adamsteer commented Apr 18, 2017 via email

@kwilcox
Copy link
Contributor

kwilcox commented Apr 18, 2017

This was done to avoid GetCaps bloat. ncWMS1 lists out every combination of layer type and palette leading to enormous XML documents. In this case, instead of listing (4) styles per layer, you are asking to list out (372) styles per layer (4 layer types * 93 palettes).

Did you try setting the advertisedPalettes setting per the documentation? Did that work? https://reading-escience-centre.gitbooks.io/ncwms-user-guide/content/02-installation.html#servlet

@rsignell-usgs
Copy link
Author

I don't need all the palettes advertised as layers, just a few favorites!

So like 12 layers instead of 4. If advertised palettes already does this, then great!

I just thought that meant advertised in the non-standard, non-layer approach.

And of course I'm not suggesting we abandon the new non-bloat approach to listing large numbers of palettes. Just that we allow a few more options for standardized clients.

Basically I just want to allow users to select the good ol' rainbow palette. 😜

@adamsteer
Copy link

adamsteer commented Apr 18, 2017 via email

@rsignell-usgs
Copy link
Author

rsignell-usgs commented Apr 19, 2017

@kwilcox wrote:

Did you try setting the advertisedPalettes setting per the documentation? Did that work? https://reading-escience-centre.gitbooks.io/ncwms-user-guide/content/02-installation.html#servlet

@guygriffiths, would advertisedPalettes indeed allow me to address this issue?

If so, is there an example?

I tried creating a custom ncWMS.xml file as below but then my service didn't start.

<?xml version='1.0' encoding='utf-8'?>
<Context>
   <Parameter name="defaultPalette" value="x-Rainbow" override="true"/>
   <Parameter name="advertisedPalettes" value="x-Rainbow, div-BuRd" override="true"/>
</Context>

@kwilcox
Copy link
Contributor

kwilcox commented Apr 19, 2017

I'll give this a shot right now and see if I can get the setting to stick (and see what it actually does)

@kwilcox
Copy link
Contributor

kwilcox commented Apr 19, 2017

The service starts fine with a config file like so:

<?xml version='1.0' encoding='utf-8'?>
<Context>
    <Parameter name="defaultPalette" value="div-RdBu" override="true"/>
    <Parameter name="advertisedPalettes" value="div-RdBu,div-RdBu-inv,seq-cubeYF" override="true"/>
</Context>

But does not change what is advertised in the GetCapabilities!

@kwilcox
Copy link
Contributor

kwilcox commented Apr 19, 2017

@yosoyjay I traced it down to this:

  1. GetCaps are templated from here
  2. availablePalettes seems to be set correctly here.
  3. advertisedPalettes seems to be build correctly here

Maybe the file we are creating in the docker container $CATALINA_HOME/conf/Catalina/localhost/ncWMS.xml isn't actually being picked up for Servlet context?

@yosoyjay
Copy link
Contributor

yosoyjay commented Apr 19, 2017 via email

@kwilcox
Copy link
Contributor

kwilcox commented Apr 19, 2017

Since we deploy the webapp as ncWMS I thought it would pick this up. Can you tell I don't understand servlet containers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants