ua-snap / ardac-explorer

ARDAC GUI Explorer
0 stars 0 forks source link

Simplify MapLayers & Rasdaman styles to remove hard-coded models/scenarios/etc. #60

Open cstephen opened 7 months ago

cstephen commented 7 months ago

During my first pass at implementing maps, I failed to realized the webapp already supported passing in axis parameters like model and scenario as GET parameters via Leaflet's dim_* properties. We can reduce the number of necessary Rasdaman styles and also simplify the code a little bit by taking advantage of this across all MapLayers, for all items. We'll want to do this before we add the styles to the Rasdaman ingest scripts.

BobTorgerson commented 7 months ago

Example of this for CMIP6 indicator data: const layers: MapLayer[] = [ { id: 'indicator_su_historical_era', title: '1980–2009, CNRM-CM6-1-HR', source: 'rasdaman', wmsLayerName: 'cmip6_indicators_3338', style: 'ardac_indicator_su_historical_era', legend: 'su', rasdamanConfiguration: { dim_model: 0, dim_scenario: 0 }, }, { id: 'indicator_su_earlycentury_era', title: '2015–2039, CNRM-CM6-1-HR', source: 'rasdaman', wmsLayerName: 'cmip6_indicators_3338', style: 'ardac_indicator_su_earlycentury_era', legend: 'su', rasdamanConfiguration: { dim_model: 0, dim_scenario: 4 }, }, ]

cstephen commented 5 months ago

I've already gone through all of the existing Rasdaman styles and simplified them as much as possible so we can pass the model/scenario/etc. axis values through GET parameters.

The only thing left to do here is finish incorporating the Rasdaman styles we're using into the Rasdaman ingest scripts, and I'm about half done with this. I'm leaving this issue open until I'm finished with this.