aodn / aodn-portal

AODN Open Geospatial Portal
https://portal.aodn.org.au/
GNU General Public License v3.0
21 stars 13 forks source link

Default palette from ncWMS not taken into account for colorbar #279

Closed ggalibert closed 11 years ago

ggalibert commented 11 years ago

On ncWMS layers, you can set up the default palette for each layer.

ex.: http://ncwms.aodn.org.au/ncwms/admin/editVariables?dataset=ACORN_SAG_nonQC has the redblue palette for eastward_sea_water_velocity instead of the widely used rainbow palette.

But if you click on the portal in "Ocean radar (ACORN)" -> "Near real time radar data" -> "South Australia gulf site" -> "eastward_sea_water_velocity". By default, it looks like the portal assumes the palette is rainbow (see colorbar on the right) even though the layer is daisplayed with the right palette!

It would be great if it could take into account the palette information from the layer (like the min/max default color range scale information) to load the proper colorbar automatically.

Thanks!

Guillaume.

dnahodil commented 11 years ago

Unfortunately ncWMS does not tell us what the default style is when it tells us the available styles for a layer. So we have no way of knowing which style will be used by default.

I have added an enhancement issue (#305) as this is more than just a bug fix.

dnahodil commented 11 years ago

I'm giving @ggalibert a gold star. He noted that even without the enhancement I mentioned we can get the correct colorbar showing.

dnahodil commented 11 years ago

The wrong legend graphic can be seen on the IMOS production Portal. Note blue/red colour used on map but a rinbow legend graphic displayed. wrong legend graphic

The current legend graphic URL: http://ncwms.aodn.org.au/ncwms/wms?PALETTE=&LEGEND_OPTIONS=forceLabels:on&REQUEST=GetLegendGraphic&LAYER=ACORN_SAG_QC/UCUR&FORMAT=image/png&VERSION=1.1.1

To get the correct colour scale remove the empty PALETTE key from the query string. http://ncwms.aodn.org.au/ncwms/wms?LEGEND_OPTIONS=forceLabels:on&REQUEST=GetLegendGraphic&LAYER=ACORN_SAG_QC/UCUR&FORMAT=image/png&VERSION=1.1.1

danfruehauf commented 11 years ago

Looking good. Didn't work with ncwms.emii.org.au, works like a charm with ncwms.aodn.org.au.