Skip to content

Commit

Permalink
WV-2622 invisible flags (#4325)
Browse files Browse the repository at this point in the history
* All color entries are being displayed in WV

* Modify build process to include hidden palette entries in the UI.

* decode & recoding image, still need to add process step.

* Producing static-y PNG

* Better organization

* working thru image processing steps

* Printing opaque tile to map!

* Trying to determine why my PNG encoding is resulting in a tiled image instead of full sized

* Fixed arrBuffer PNG encoding calculation to fix my multiple of 4 error. Image is opaque & correct after processing now!

* removed logging

* logging

* Removed local image which was used for testing

* Removed another local image which was used for testing

* Toggling colors works (technically) but it is too slow & initializes incorrectly

* Modifications in processColormap.js to include the disabled indices

* Logging

* logging & exploration

* logging

* Exploring build process

* Commenting in processColormap.js

* Modified build process to include all qualifying ColorMapEntries

* Manually disabling a couple palette items on layer add.

* lint fix

* Dynamically disabling palette entries appropriately

* Refactoring/merging the old palette swap code with the new code

* exploration & logging

* Removed logging

* Additional cleanup

* Additional cleanup

* Cleanup of comments

* modified palette swap to exclude continuous palettes

* Added existence check to avoid crash processing continuous palettes.

* Removed log, minor update to determine category vs continuous palettes

* Removed pako package

* Added catch to image fetch & early exit on classification refresh

* Re-ordered colormap elements in build process

* Refactor of the build array modifications

* Updated flood tour story to disable newly exposed color palettes properly

* Correctly updated Flood & Swath Gap tour stories to disable newly exposed color palettes

* Updated build to reference the index instead of the ref value when processing colormaps

* Reconciled the imageTile.js conflicts after merging develop

* Working through merge conflicts / errors

* fixed sidebar legend issue from merge

* lint fix (array destructuring)

* Modified build to restrict array re-ordering to classification type only

* Updated validity check for newActivePalettesObj

* Removed unused import

* exploring water mask

* Changed MEaSUREs layers to immutable: false & removed logging

* Removed overlooked logging

---------

Co-authored-by: Thomas Cariello <[email protected]>
  • Loading branch information
Tomcariello and Thomas Cariello authored Aug 17, 2023
1 parent 496597b commit 9161e12
Show file tree
Hide file tree
Showing 12 changed files with 312 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
},
"palette": {
"immutable": true
"immutable": false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"group": "overlays",
"layergroup": "Freeze/Thaw",
"palette": {
"immutable": true
"immutable": false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"element": "",
"action": ""
},
"stepLink": "v=-160.85181369155183,-69.196652033098,152.2108767501309,88.8526811334104&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_3-Day,MODIS_Combined_Flood_2-Day(hidden),Land_Water_Map,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2022-11-15-T00%3A00%3A00Z"
"stepLink": "v=-160.85181369155183,-69.196652033098,152.2108767501309,88.8526811334104&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_3-Day(disabled=3-4),MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),Land_Water_Map,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2022-11-15-T00%3A00%3A00Z"
},
{
"id": "002",
Expand All @@ -34,7 +34,7 @@
"element": "",
"action": ""
},
"stepLink": "v=102.16593272929055,10.204527634697639,107.78896502357696,12.87479891987437&l=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden),MODIS_Combined_Flood_3-Day,MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2022-11-02-T00%3A00%3A00Z"
"stepLink": "v=102.16593272929055,10.204527634697639,107.78896502357696,12.87479891987437&l=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),MODIS_Combined_Flood_3-Day(disabled=3-4),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2022-11-02-T00%3A00%3A00Z"
},
{
"id": "003",
Expand All @@ -43,7 +43,7 @@
"element": "",
"action": ""
},
"stepLink": "v=68.25873404045207,22.57063779283085,72.25050789407688,24.570979824390598&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_3-Day(hidden),MODIS_Combined_Flood_2-Day(disabled=2),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&l1=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_3-Day(disabled=2),MODIS_Combined_Flood_2-Day(hidden),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg1=true&ca=true&cv=45&t=2022-09-07-T00%3A00%3A00Z&t1=2022-09-07-T00%3A00%3A00Z"
"stepLink": "v=68.25873404045207,22.57063779283085,72.25050789407688,24.570979824390598&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_3-Day(hidden,disabled=3-4),MODIS_Combined_Flood_2-Day(disabled=2-3-4),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&l1=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_3-Day(disabled=2-3-4),MODIS_Combined_Flood_2-Day(hidden),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg1=true&ca=true&cv=45&t=2022-09-07-T00%3A00%3A00Z&t1=2022-09-07-T00%3A00%3A00Z"
},
{
"id": "004",
Expand All @@ -52,7 +52,7 @@
"element": "",
"action": ""
},
"stepLink": "v=102.16593272929055,10.10728729936275,107.78896502357696,12.97203925520926&l=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden),MODIS_Combined_Flood_3-Day(disabled=2),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2022-11-02-T00%3A00%3A00Z"
"stepLink": "v=102.16593272929055,10.10728729936275,107.78896502357696,12.97203925520926&l=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),MODIS_Combined_Flood_3-Day(disabled=2-3-4),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2022-11-02-T00%3A00%3A00Z"
},
{
"id": "005",
Expand All @@ -61,7 +61,7 @@
"element": "",
"action": ""
},
"stepLink": "v=58.94267820873439,21.701433352920994,77.65836010597603,31.237879710046435&l=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Combined_Flood_3-Day(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2022-09-15-T00%3A00%3A00Z"
"stepLink": "v=58.94267820873439,21.701433352920994,77.65836010597603,31.237879710046435&l=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),MODIS_Combined_Flood_3-Day(hidden,disabled=3-4),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2022-09-15-T00%3A00%3A00Z"
},
{
"id": "006",
Expand All @@ -70,7 +70,7 @@
"element": "",
"action": ""
},
"stepLink": "v=58.779178047891534,21.701433352920994,77.82186026681889,31.237879710046435&l=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden),MODIS_Combined_Flood_3-Day(hidden),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&l1=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden),MODIS_Combined_Flood_3-Day(hidden),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg1=true&ca=true&cv=52&t=2022-06-25-T00%3A00%3A00Z&t1=2022-09-20-T00%3A00%3A00Z"
"stepLink": "v=58.779178047891534,21.701433352920994,77.82186026681889,31.237879710046435&l=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),MODIS_Combined_Flood_3-Day(hidden,disabled=3-4),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&l1=Reference_Labels_15m,Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),MODIS_Combined_Flood_3-Day(hidden,disabled=2-3-4),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg1=true&ca=true&cv=52&t=2022-06-25-T00%3A00%3A00Z&t1=2022-09-20-T00%3A00%3A00Z"
},
{
"id": "007",
Expand All @@ -79,7 +79,7 @@
"element": "",
"action": ""
},
"stepLink": "v=58.94267820873439,21.701433352920994,77.65836010597603,31.237879710046435&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Combined_Flood_3-Day,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&l1=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden),Land_Water_Map(hidden),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Combined_Flood_3-Day(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg1=true&ca=false&cv=51&t=2022-09-20-T00%3A00%3A00Z&t1=2022-09-20-T00%3A00%3A00Z"
"stepLink": "v=58.94267820873439,21.701433352920994,77.65836010597603,31.237879710046435&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Combined_Flood_3-Day(disabled=3-4),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&l1=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),Land_Water_Map(hidden),MODIS_Terra_CorrectedReflectance_Bands721,MODIS_Aqua_CorrectedReflectance_Bands721,MODIS_Combined_Flood_3-Day(hidden,disabled=3-4),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg1=true&ca=false&cv=51&t=2022-09-20-T00%3A00%3A00Z&t1=2022-09-20-T00%3A00%3A00Z"
},
{
"id": "008",
Expand All @@ -88,7 +88,7 @@
"element": "",
"action": ""
},
"stepLink": "v=61.71613960772586,23.044505479021936,75.515990714223,29.955377503269844&as=2022-08-01-T00%3A00%3A00Z&ae=2022-09-16-T00%3A00%3A00Z&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_3-Day,MODIS_Combined_Flood_2-Day(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&ab=on&t=2022-08-01-T08%3A00%3A00Z"
"stepLink": "v=61.71613960772586,23.044505479021936,75.515990714223,29.955377503269844&as=2022-08-01-T00%3A00%3A00Z&ae=2022-09-16-T00%3A00%3A00Z&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Combined_Flood_3-Day(disabled=3-4),MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&ab=on&t=2022-08-01-T08%3A00%3A00Z"
},
{
"id": "009",
Expand All @@ -97,7 +97,7 @@
"element": "",
"action": ""
},
"stepLink": "v=61.8346249056256,22.132606181066876,75.39750541632326,30.867276801224904&l=Reference_Labels_15m,Reference_Features_15m,Coastlines_15m,MODIS_Combined_Flood_3-Day,MODIS_Combined_Flood_2-Day(hidden),GPW_Population_Density_2020(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&l1=Reference_Labels_15m,Reference_Features_15m,Coastlines_15m,MODIS_Combined_Flood_3-Day(hidden,disabled=0-2),MODIS_Combined_Flood_2-Day(hidden),GPW_Population_Density_2020,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg1=true&ca=true&t=2022-09-20-T00%3A00%3A00Z&t1=2022-09-20-T00%3A00%3A00Z"
"stepLink": "v=61.8346249056256,22.132606181066876,75.39750541632326,30.867276801224904&l=Reference_Labels_15m,Reference_Features_15m,Coastlines_15m,MODIS_Combined_Flood_3-Day(disabled=3-4),MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),GPW_Population_Density_2020(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&l1=Reference_Labels_15m,Reference_Features_15m,Coastlines_15m,MODIS_Combined_Flood_3-Day(hidden,disabled=0-2-3-4),MODIS_Combined_Flood_2-Day(hidden,disabled=3-4),GPW_Population_Density_2020,MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg1=true&ca=true&t=2022-09-20-T00%3A00%3A00Z&t1=2022-09-20-T00%3A00%3A00Z"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"element": "",
"action": ""
},
"stepLink": "v=-161.29811828788726,-66.96286474806078,111.61396457410373,60.68039067384959&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Aqua_Data_No_Data,MODIS_Terra_Data_No_Data(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor,MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2023-03-05-T00%3A00%3A00Z"
"stepLink": "v=-161.29811828788726,-66.96286474806078,111.61396457410373,60.68039067384959&l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,MODIS_Aqua_Data_No_Data(disabled=1),MODIS_Terra_Data_No_Data(hidden,disabled=1),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor,MODIS_Terra_CorrectedReflectance_TrueColor(hidden)&lg=true&t=2023-03-05-T00%3A00%3A00Z"
}
]
}
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@
"simplebar": "^6.2.5",
"simplebar-react": "^3.2.4",
"stackblur": "^1.0.0",
"upng-js": "^2.1.0",
"supercluster": "^8.0.1",
"url-template": "^3.1.0",
"what-input": "^5.2.12"
Expand Down
2 changes: 1 addition & 1 deletion tasks/build-options/mergeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ async function main () {
await mergeFiles(inputDir)

fs.writeFileSync(outputFile, JSON.stringify(conf, null, 2), 'utf-8')

console.warn(`${prog}: ${fileCount} file(s) merged into ${path.basename(outputFile)}`)
}

// inputDir refers to build\options-build\config\wv.json\*.*
async function mergeFiles (inputDir) {
const files = fs.readdirSync(inputDir)
for (const file of files) {
Expand Down
Loading

0 comments on commit 9161e12

Please sign in to comment.