foo
This commit is contained in:
parent
8683624557
commit
79ee099809
2 changed files with 7 additions and 4 deletions
|
|
@ -667,9 +667,12 @@ def _s3_reflectance_scale(raw_s3_dir: Path) -> float:
|
||||||
"""Return multiplier that maps raw SYN L2 SDR values to 0–1 reflectance."""
|
"""Return multiplier that maps raw SYN L2 SDR values to 0–1 reflectance."""
|
||||||
for path in raw_s3_dir.glob("S3*.tif"):
|
for path in raw_s3_dir.glob("S3*.tif"):
|
||||||
with rasterio.open(path) as src:
|
with rasterio.open(path) as src:
|
||||||
mx = float(np.nanmax(src.read()))
|
data = src.read()
|
||||||
if np.isfinite(mx) and mx > 5:
|
if not np.any(np.isfinite(data)):
|
||||||
return 1.0 / S3_REFLECTANCE_SCALE
|
continue
|
||||||
|
mx = float(np.nanmax(data))
|
||||||
|
if np.isfinite(mx) and mx > 5:
|
||||||
|
return 1.0 / S3_REFLECTANCE_SCALE
|
||||||
return 1.0
|
return 1.0
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -758,7 +758,7 @@ function isLeap(y) { return (y%4===0 && y%100!==0) || y%400===0; }
|
||||||
// ── mini map ──
|
// ── mini map ──
|
||||||
function initMiniMap(lat, lon) {
|
function initMiniMap(lat, lon) {
|
||||||
if (!miniMapInst) {
|
if (!miniMapInst) {
|
||||||
miniMapInst = L.map("miniMap", { zoomControl: false, attributionControl: false, scrollWheelZoom: false })
|
miniMapInst = L.map("miniMap", { zoomControl: true, attributionControl: false, scrollWheelZoom: false })
|
||||||
.addLayer(L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"));
|
.addLayer(L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"));
|
||||||
}
|
}
|
||||||
miniMapInst.setView([lat, lon], 11);
|
miniMapInst.setView([lat, lon], 11);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue