Landsat raster alignment, QA masking and NDVI change audit

| ΔNDVI 绝对值阈值 | 直接算上升 / 下降 | QA 质检后上升 / 下降 |
|---|---|---|
| 0.10 | 2,344 / 2,376 | 155 / 1,495 |
| 0.15 | 2,058 / 973 | 86 / 577 |
| 0.20 | 1,816 / 476 | 49 / 290 |
node gezheng.js data/scene-1.json data/scene-2.json 0.15| 实验 | 可复现结果 |
|---|---|
| 同景对照,2024-04-18 与自己相比 | 14,226 个共同有效像元,最大绝对 NDVI 差为 0 |
| 半像元错位,保持真实第 1 期波段并把网格起点向东移动 15 米 | 拒绝计算面积,退出码 2。该人为构造用例验证坐标检查 |
| 两期变化,阈值 |ΔNDVI| ≥ 0.15 | 14,224 个共同有效像元(86.82%);10,703 个上升、94 个下降、3,427 个在阈值内、2,160 个排除 |
| 独立核对 | 用精确分数计算复核全部 16,384 个像元的掩膜和分类。0.15 档最大差值误差 7.08×10⁻¹⁶,三档阈值的分类均一致 |
| 口径 | 有效像元 | 上升 | 下降 |
|---|---|---|---|
| 直接算 | 16,377 | 2,058 | 973 |
| QA 质检后 | 11,257(68.71%) | 86 | 577 |
moon test
moon build --release --target jspython scripts/verify_local.py
python scripts/export_geotiff.py results/feidong/direct.json results/feidong/gis/direct
python scripts/export_geotiff.py results/feidong/screened.json results/feidong/gis/screenedpub(all) struct Audit {
qa_screened : Bool
first_scene : String
second_scene : String
first_date : String
second_date : String
epsg : Int
x : Int
y : Int
cell : Int
width : Int
height : Int
overlap : Int
valid : Int
excluded : Int
valid_fraction : Double
threshold : Double
gain : Int
loss : Int
stable : Int
both_nonwater_valid : Int
both_nonwater_gain : Int
both_nonwater_loss : Int
before_only_water : Int
after_only_water : Int
both_water : Int
gain_m2 : Int64
loss_m2 : Int64
mean_delta : Double
max_abs_delta : Double
first_qa : Quality
second_qa : Quality
before_reason : Array[Int]
after_reason : Array[Int]
water_code : Array[Int]
classes : Array[Int]
delta : Array[Double?]
ndvi_before : Array[Double?]
ndvi_after : Array[Double?]
} derive(ToJson)pub(all) struct PixelEvidence {
x_center : Int
y_center : Int
red_before : Int
nir_before : Int
red_after : Int
nir_after : Int
qa_before : Int
qa_after : Int
saturation_before : Int
saturation_after : Int
reason_before : Int
reason_after : Int
class_code : Int
delta : Double?
} derive(ToJson)pub(all) struct Quality {
fill : Int
cloud : Int
shadow : Int
snow : Int
saturated : Int
unusable_signal : Int
} derive(ToJson)fn compare(a : Chip, b : Chip, threshold : Double, screen_qa? : Bool, min_coverage? : Double, pixel_grids? : Bool) -> Audit raise AuditErrorfn inspect_pixel(a : Chip, b : Chip, result : Audit, row : Int, column : Int) -> PixelEvidence raise AuditError