Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added test case for New Zealand Land+EEZ intersecting habitat #219

Merged
merged 1 commit into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion data/create_expected_truth_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
["./antimeridian/right-edge.shp", "gfwfiji_6933_COG.tiff"],
["./antimeridian/right-edge.shp", "gfwfiji_6933_COG.tiff", { "boundless": False, "nodata": -9999 }],
["./antimeridian/split.shp", "gfwfiji_6933_COG_Binary.tif"],
["./antimeridian/across.shp", "gfwfiji_6933_COG_Binary.tif"]
["./antimeridian/across.shp", "gfwfiji_6933_COG_Binary.tif"],

["./geojson-test-data/EEZ_Land_v3_202030_New_Zealand.geojson", "./geotiff-test-data/nz_habitat_anticross_4326_1deg.tif"]
]

for i, (geom, raster, *opts) in enumerate(test_cases):
Expand Down
12 changes: 12 additions & 0 deletions data/expected_data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,17 @@ case: 13
sum: 29,211,252.0


case: 14
vector: ./geojson-test-data/EEZ_Land_v3_202030_New_Zealand.geojson
raster: ./geotiff-test-data/nz_habitat_anticross_4326_1deg.tif
opts: []
result:
count: 454
min: 1.0
max: 71.0
sum: 4,512.0


sum
test.tiff
108343045.40000004
Expand All @@ -168,6 +179,7 @@ Cyprus: 790,242.0625
Jamaica: 2,332,581.75
Lebanon: 5,554,060.0
Macedonia: 2,239,499.25
New Zealand: 0.0
Nicaragua: 5,066,313.5
Ukraine: 12,697,956.0
Uruguay: 3,303,090.0
1 change: 1 addition & 0 deletions data/gadm/extract_countries.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const countries_to_extract = new Set([
"Nicaragua",
"Lebanon",
"Macedonia",
"New Zealand",
"Uruguay",
"Ukraine"
]);
Expand Down
7 changes: 7 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ bash setup.sh
cd ..
echo "---------- Finished Setting up GeoTIFF Data ----------"

# setup test-data
echo "---------- Setting up GeoJSON Test Data ----------"
cd geojson-test-data
bash setup.sh
cd ..
echo "---------- Finished Setting up GeoJSON Data ----------"

# setup gadm
echo "---------- Setting up GADM Data ----------"
cd gadm
Expand Down