@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
25 lines (23 loc) • 626 B
text/typescript
import { describe, test, expect } from "vitest";
import { removeOverlap } from "./removeOverlap.js";
import fix from "../testing/fixtures/squareSketches.js";
describe("removeOverlap", () => {
test("removeOverlap - polygon to multipolygon", () => {
const multiInsideTwoByPoly = removeOverlap([
fix.twoByPoly,
fix.halfInsideTwoByPoly,
]);
console.log(JSON.stringify(multiInsideTwoByPoly));
expect(multiInsideTwoByPoly.geometry.coordinates).toEqual([
[
[],
[],
[],
[],
[],
[],
[],
],
]);
});
});