Skip to content

Commit

Permalink
fixed typo in eez test
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed Oct 1, 2023
1 parent 2e594be commit 627a233
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stats/stats.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ test("antimeridian New Zealand EEZ and Habitat", async ({ eq }) => {
const georaster = await parse("http://localhost:3000/data/geotiff-test-data/nz_habitat_anticross_4326_1deg.tif");
const geojson = JSON.parse(readFileSync("./data/geojson-test-data/eez_land_union/EEZ_Land_v3_202030_New_Zealand.geojson", "utf-8"));
const results = await stats(georaster, geojson, { stats: ["count", "min", "max", "sum"] });
eq(results, [{ count: 4_512, min: 1, max: 71, sum: 454 }]);
eq(results, [{ count: 454, min: 1, max: 71, sum: 4512 }]);

const results2 = await Promise.all(geojson.features[0].geometry.coordinates.map(geom => stats(georaster, geom, { stats: ["count", "min", "max", "sum"] })));
eq(results2, [[{ count: 322, min: 1, max: 71, sum: 3931 }], [{ count: 132, min: 1, max: 22, sum: 581 }]]);
Expand Down

0 comments on commit 627a233

Please sign in to comment.