diff --git a/.gitignore b/.gitignore index 79cfaaf..385f4c8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules .cache wxbox_client_wasm/dist crates/client/dist +*/bun.lockb diff --git a/crates/tiler/config.toml b/crates/tiler/config.toml index b9a718b..007f702 100644 --- a/crates/tiler/config.toml +++ b/crates/tiler/config.toml @@ -3,14 +3,14 @@ from = "https://mrms.ncep.noaa.gov/data/2D/MergedReflectivityQCComposite/MRMS_Me needs_gzip = true valid_for = 120 palette = """ -Color: 10 164 164 255 100 100 192 -Color: 20 64 128 255 32 64 128 -Color: 30 0 255 0 0 128 0 -Color: 40 255 255 0 255 128 0 -Color: 50 255 0 0 160 0 0 -Color: 60 255 0 255 128 0 128 -Color: 70 255 255 255 128 128 128 -Color: 80 128 128 128 +Color4: 10 164 164 255 0 100 100 192 255 +Color4: 20 64 128 255 255 32 64 128 255 +Color4: 30 0 255 0 255 0 128 0 255 +Color4: 40 255 255 0 255 255 128 0 255 +Color4: 50 255 0 0 255 160 0 0 255 +Color4: 60 255 0 255 255 128 0 128 255 +Color4: 70 255 255 255 255 128 128 128 255 +Color4: 80 128 128 128 255 """ missing = -99.0 no_coverage = -999.0 @@ -18,12 +18,12 @@ no_coverage = -999.0 [data.nexrad.base_reflectivity_halfdegree] from = "DS.p94r0" palette = """ -Color: 10 164 164 255 100 100 192 -Color: 20 64 128 255 32 64 128 -Color: 30 0 255 0 0 128 0 -Color: 40 255 255 0 255 128 0 -Color: 50 255 0 0 160 0 0 -Color: 60 255 0 255 128 0 128 -Color: 70 255 255 255 128 128 128 -Color: 80 128 128 128 -""" \ No newline at end of file +Color4: 10 164 164 255 0 100 100 192 255 +Color4: 20 64 128 255 255 32 64 128 255 +Color4: 30 0 255 0 255 0 128 0 255 +Color4: 40 255 255 0 255 255 128 0 255 +Color4: 50 255 0 0 255 160 0 0 255 +Color4: 60 255 0 255 255 128 0 128 255 +Color4: 70 255 255 255 255 128 128 128 255 +Color4: 80 128 128 128 255 +""" diff --git a/crates/tiler/src/grib2.rs b/crates/tiler/src/grib2.rs index 06e8273..f7e7508 100644 --- a/crates/tiler/src/grib2.rs +++ b/crates/tiler/src/grib2.rs @@ -230,11 +230,7 @@ fn colorize(value: Option, data_source: &Grib2DataSource) -> anyhow::Result color.red, color.green, color.blue, - if color.red == 0 && color.green == 0 && color.blue == 0 { - 0 - } else { - 255 - }, + color.alpha, // guaranteed to be present afaict ]) } None => Rgba([0, 0, 0, 30]),