diff --git a/packages/turf-line-intersect/bench.js b/packages/turf-line-intersect/bench.js index 590d95950f..fa1f34c1cb 100644 --- a/packages/turf-line-intersect/bench.js +++ b/packages/turf-line-intersect/bench.js @@ -2,7 +2,7 @@ const fs = require("fs"); const path = require("path"); const load = require("load-json-file"); const Benchmark = require("benchmark"); -const lineIntersect = require("./index"); +const lineIntersect = require("./index").default; const directory = path.join(__dirname, "test", "in") + path.sep; const fixtures = fs.readdirSync(directory).map((filename) => { @@ -16,11 +16,11 @@ const fixtures = fs.readdirSync(directory).map((filename) => { /** * Benchmark Results * - * 2-vertex-segment x 4,123,821 ops/sec ±12.92% (74 runs sampled) - * double-intersect x 53,118 ops/sec ±4.22% (72 runs sampled) - * multi-linestring x 16,417 ops/sec ±2.31% (77 runs sampled) - * polygons-with-holes x 9,739 ops/sec ±2.55% (85 runs sampled) - * same-coordinates x 51,303 ops/sec ±4.23% (71 runs sampled) + * 2-vertex-segment x 1,467,485 ops/sec ±1.74% (89 runs sampled) + * double-intersect x 307,665 ops/sec ±1.70% (91 runs sampled) + * multi-linestring x 81,337 ops/sec ±0.67% (94 runs sampled) + * polygons-with-holes x 27,711 ops/sec ±0.70% (92 runs sampled) + * same-coordinates x 521,277 ops/sec ±0.75% (92 runs sampled) */ const suite = new Benchmark.Suite("turf-line-intersect"); for (const { name, geojson } of fixtures) { diff --git a/packages/turf-line-intersect/index.ts b/packages/turf-line-intersect/index.ts index 55c2d0b541..ced3c84f60 100644 --- a/packages/turf-line-intersect/index.ts +++ b/packages/turf-line-intersect/index.ts @@ -1,3 +1,4 @@ +import { feature, featureCollection, point } from "@turf/helpers"; import { Feature, FeatureCollection, @@ -7,11 +8,7 @@ import { Point, Polygon, } from "geojson"; -import { feature, featureCollection, point } from "@turf/helpers"; -import { getCoords } from "@turf/invariant"; -import lineSegment from "@turf/line-segment"; -import { featureEach } from "@turf/meta"; -import rbush from "@turf/geojson-rbush"; +import findIntersections, { Intersection } from "sweepline-intersections"; /** * Takes any LineString or Polygon GeoJSON and returns the intersecting point(s). @@ -19,6 +16,9 @@ import rbush from "@turf/geojson-rbush"; * @name lineIntersect * @param {GeoJSON} line1 any LineString or Polygon * @param {GeoJSON} line2 any LineString or Polygon + * @param {Object} [options={}] Optional parameters + * @param {boolean} [options.removeDuplicates=true] remove duplicate intersections + * @param {boolean} [options.ignoreSelfIntersections=false] ignores self-intersections on input features * @returns {FeatureCollection} point(s) that intersect both * @example * var line1 = turf.lineString([[126, -11], [129, -21]]); @@ -33,100 +33,57 @@ function lineIntersect< G2 extends LineString | MultiLineString | Polygon | MultiPolygon >( line1: FeatureCollection | Feature | G1, - line2: FeatureCollection | Feature | G2 + line2: FeatureCollection | Feature | G2, + options: { + removeDuplicates?: boolean; + ignoreSelfIntersections?: boolean; + } = {} ): FeatureCollection { - const unique: any = {}; - const results: any[] = []; - - // First, normalize geometries to features - // Then, handle simple 2-vertex segments - if (line1.type === "LineString") { - line1 = feature(line1); - } - if (line2.type === "LineString") { - line2 = feature(line2); - } - if ( - line1.type === "Feature" && - line2.type === "Feature" && - line1.geometry !== null && - line2.geometry !== null && - line1.geometry.type === "LineString" && - line2.geometry.type === "LineString" && - line1.geometry.coordinates.length === 2 && - line2.geometry.coordinates.length === 2 + const { removeDuplicates = true, ignoreSelfIntersections = false } = options; + let features: Feature[] = []; + if (line1.type === "FeatureCollection") + features = features.concat(line1.features); + else if (line1.type === "Feature") features.push(line1); + else if ( + line1.type === "LineString" || + line1.type === "Polygon" || + line1.type === "MultiLineString" || + line1.type === "MultiPolygon" ) { - const intersect = intersects(line1, line2); - if (intersect) { - results.push(intersect); - } - return featureCollection(results); - } - - // Handles complex GeoJSON Geometries - const tree = rbush(); - tree.load(lineSegment(line2)); - featureEach(lineSegment(line1), (segment) => { - featureEach(tree.search(segment), (match) => { - const intersect = intersects(segment, match); - if (intersect) { - // prevent duplicate points https://github.com/Turfjs/turf/issues/688 - const key = getCoords(intersect).join(","); - if (!unique[key]) { - unique[key] = true; - results.push(intersect); - } - } - }); - }); - return featureCollection(results); -} - -/** - * Find a point that intersects LineStrings with two coordinates each - * - * @private - * @param {Feature} line1 GeoJSON LineString (Must only contain 2 coordinates) - * @param {Feature} line2 GeoJSON LineString (Must only contain 2 coordinates) - * @returns {Feature} intersecting GeoJSON Point - */ -function intersects(line1: Feature, line2: Feature) { - const coords1: any = getCoords(line1); - const coords2: any = getCoords(line2); - if (coords1.length !== 2) { - throw new Error(" line1 must only contain 2 coordinates"); + features.push(feature(line1)); } - if (coords2.length !== 2) { - throw new Error(" line2 must only contain 2 coordinates"); - } - const x1 = coords1[0][0]; - const y1 = coords1[0][1]; - const x2 = coords1[1][0]; - const y2 = coords1[1][1]; - const x3 = coords2[0][0]; - const y3 = coords2[0][1]; - const x4 = coords2[1][0]; - const y4 = coords2[1][1]; - const denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1); - const numeA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3); - const numeB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3); - if (denom === 0) { - if (numeA === 0 && numeB === 0) { - return null; - } - return null; + if (line2.type === "FeatureCollection") + features = features.concat(line2.features); + else if (line2.type === "Feature") features.push(line2); + else if ( + line2.type === "LineString" || + line2.type === "Polygon" || + line2.type === "MultiLineString" || + line2.type === "MultiPolygon" + ) { + features.push(feature(line2)); } - const uA = numeA / denom; - const uB = numeB / denom; + const intersections = findIntersections( + featureCollection(features), + ignoreSelfIntersections + ); - if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1) { - const x = x1 + uA * (x2 - x1); - const y = y1 + uA * (y2 - y1); - return point([x, y]); + let results: Intersection[] = []; + if (removeDuplicates) { + const unique: Record = {}; + intersections.forEach((intersection) => { + const key = intersection.join(","); + if (!unique[key]) { + unique[key] = true; + results.push(intersection); + } + }); + } else { + results = intersections; } - return null; + return featureCollection(results.map((r) => point(r))); } export default lineIntersect; diff --git a/packages/turf-line-intersect/package.json b/packages/turf-line-intersect/package.json index 081d5febfd..a84fe7bd20 100644 --- a/packages/turf-line-intersect/package.json +++ b/packages/turf-line-intersect/package.json @@ -63,11 +63,8 @@ "write-json-file": "*" }, "dependencies": { - "@turf/geojson-rbush": "^3.2.0", "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/meta": "^6.5.0", + "sweepline-intersections": "^1.4.0", "tslib": "^2.3.0" } } diff --git a/packages/turf-line-intersect/test.js b/packages/turf-line-intersect/test.js index 4341ea2c96..ae90347a40 100644 --- a/packages/turf-line-intersect/test.js +++ b/packages/turf-line-intersect/test.js @@ -6,7 +6,7 @@ const write = require("write-json-file"); const truncate = require("@turf/truncate").default; const { featureCollection, - geometryCollection, + // geometryCollection, lineString, polygon, } = require("@turf/helpers"); @@ -61,12 +61,10 @@ test("turf-line-intersect - prevent input mutation", (t) => { test("turf-line-intersect - Geometry Objects", (t) => { const line1 = lineString([ [7, 50], - [8, 50], [9, 50], ]); const line2 = lineString([ [8, 49], - [8, 50], [8, 51], ]); t.ok( @@ -78,13 +76,13 @@ test("turf-line-intersect - Geometry Objects", (t) => { .features.length, "support Feature Collection" ); - t.ok( - lineIntersect( - geometryCollection([line1.geometry]), - geometryCollection([line2.geometry]) - ).features.length, - "support Geometry Collection" - ); + // t.ok( + // lineIntersect( + // geometryCollection([line1.geometry]), + // geometryCollection([line2.geometry]) + // ).features.length, + // "support Geometry Collection" + // ); t.end(); }); @@ -102,6 +100,12 @@ test("turf-line-intersect - same point #688", (t) => { const results = lineIntersect(line1, line2); t.equal(results.features.length, 1, "should return single point"); + + const results2 = lineIntersect(line1, line2, { + removeDuplicates: false, + }); + t.equal(results2.features.length, 3, "should return three points"); + t.end(); }); diff --git a/packages/turf-line-intersect/test/out/double-intersect.geojson b/packages/turf-line-intersect/test/out/double-intersect.geojson index 1033548374..52acde8e47 100644 --- a/packages/turf-line-intersect/test/out/double-intersect.geojson +++ b/packages/turf-line-intersect/test/out/double-intersect.geojson @@ -6,7 +6,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [132.808697, -11.630938] + "coordinates": [119.832884, -19.58857] } }, { @@ -14,7 +14,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [119.832884, -19.58857] + "coordinates": [132.808697, -11.630938] } }, { diff --git a/packages/turf-line-intersect/test/out/multi-linestring.geojson b/packages/turf-line-intersect/test/out/multi-linestring.geojson index 120b5c2f2a..5a52196c66 100644 --- a/packages/turf-line-intersect/test/out/multi-linestring.geojson +++ b/packages/turf-line-intersect/test/out/multi-linestring.geojson @@ -6,7 +6,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [136.479474, -14.675333] + "coordinates": [117.006519, -20.917359] } }, { @@ -14,7 +14,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [136.389417, -14.506578] + "coordinates": [118.554586, -25.732946] } }, { @@ -22,7 +22,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [132.808697, -11.630938] + "coordinates": [119.832884, -19.58857] } }, { @@ -30,7 +30,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [135.006479, -11.91514] + "coordinates": [121.656735, -23.805914] } }, { @@ -38,7 +38,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [119.832884, -19.58857] + "coordinates": [132.658557, -18.734814] } }, { @@ -46,7 +46,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [117.006519, -20.917359] + "coordinates": [132.808697, -11.630938] } }, { @@ -54,7 +54,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [118.554586, -25.732946] + "coordinates": [135.006479, -11.91514] } }, { @@ -62,7 +62,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [121.656735, -23.805914] + "coordinates": [135.197772, -18.403004] } }, { @@ -70,7 +70,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [132.658557, -18.734814] + "coordinates": [136.389417, -14.506578] } }, { @@ -78,7 +78,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [135.197772, -18.403004] + "coordinates": [136.479474, -14.675333] } }, { diff --git a/packages/turf-line-intersect/test/out/polygons-with-holes.geojson b/packages/turf-line-intersect/test/out/polygons-with-holes.geojson index 9c30054b35..a39d1b3662 100644 --- a/packages/turf-line-intersect/test/out/polygons-with-holes.geojson +++ b/packages/turf-line-intersect/test/out/polygons-with-holes.geojson @@ -6,7 +6,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [122.447193, -17.011768] + "coordinates": [118.465639, -19.242649] } }, { @@ -14,7 +14,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [118.465639, -19.242649] + "coordinates": [120.170188, -33.654475] } }, { @@ -22,7 +22,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [120.170188, -33.654475] + "coordinates": [119.582432, -27.434744] } }, { @@ -30,7 +30,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [122.196098, -33.423855] + "coordinates": [120.17229, -21.344425] } }, { @@ -38,7 +38,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [126.041148, -32.826977] + "coordinates": [120.1132, -24.567108] } }, { @@ -46,7 +46,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [124.581243, -33.236589] + "coordinates": [120.201928, -30.393864] } }, { @@ -54,7 +54,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [123.377165, -29.942512] + "coordinates": [122.447193, -17.011768] } }, { @@ -62,7 +62,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [124.468085, -29.253959] + "coordinates": [122.196098, -33.423855] } }, { @@ -78,7 +78,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [120.201928, -30.393864] + "coordinates": [122.824274, -27.12517] } }, { @@ -86,7 +86,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [119.582432, -27.434744] + "coordinates": [123.053712, -24.567108] } }, { @@ -94,7 +94,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [122.824274, -27.12517] + "coordinates": [123.377165, -29.942512] } }, { @@ -102,7 +102,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [120.1132, -24.567108] + "coordinates": [123.320136, -18.187607] } }, { @@ -110,7 +110,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [123.053712, -24.567108] + "coordinates": [124.468085, -29.253959] } }, { @@ -118,7 +118,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [120.17229, -21.344425] + "coordinates": [124.392377, -19.890723] } }, { @@ -134,7 +134,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [124.392377, -19.890723] + "coordinates": [124.581243, -33.236589] } }, { @@ -142,7 +142,7 @@ "properties": {}, "geometry": { "type": "Point", - "coordinates": [123.320136, -18.187607] + "coordinates": [126.041148, -32.826977] } }, { diff --git a/packages/turf-line-intersect/tsconfig.json b/packages/turf-line-intersect/tsconfig.json index c3f78e4c94..f1fb9dd127 100644 --- a/packages/turf-line-intersect/tsconfig.json +++ b/packages/turf-line-intersect/tsconfig.json @@ -4,4 +4,4 @@ "outDir": "dist/js" }, "files": ["index.ts"] -} +} \ No newline at end of file diff --git a/packages/turf-line-split/index.js b/packages/turf-line-split/index.js index 7f7eb6f44b..70111057db 100644 --- a/packages/turf-line-split/index.js +++ b/packages/turf-line-split/index.js @@ -51,7 +51,12 @@ function lineSplit(line, splitter) { case "MultiLineString": case "Polygon": case "MultiPolygon": - return splitLineWithPoints(line, lineIntersect(line, truncatedSplitter)); + return splitLineWithPoints( + line, + lineIntersect(line, truncatedSplitter, { + ignoreSelfIntersections: true, + }) + ); } } diff --git a/packages/turf-line-split/test/out/polygon-with-holes.geojson b/packages/turf-line-split/test/out/polygon-with-holes.geojson index 5212c23295..341df77682 100644 --- a/packages/turf-line-split/test/out/polygon-with-holes.geojson +++ b/packages/turf-line-split/test/out/polygon-with-holes.geojson @@ -10,17 +10,15 @@ "geometry": { "type": "LineString", "coordinates": [ - [108.10546875, -24.607069137709694], - [116.103515625, -16.04581345375217], - [123.3984375, -14.689881366618762], - [123.80984529019764, -14.850144611823424] + [115.5887281750802, -33.66501705609563], + [113.99414062499999, -34.45221847282653] ] }, "bbox": [ - 108.10546875, - -27.50066352226305, - 123.80984529019764, - -11.796286982065407 + 113.99414062499999, + -34.855911539501186, + 115.5887281750802, + -33.261323989420966 ], "id": 0 }, @@ -33,16 +31,15 @@ "geometry": { "type": "LineString", "coordinates": [ - [123.80984529019764, -14.850144611823424], - [127.529296875, -16.299051014581817], - [131.8707236511523, -19.47488830290292] + [125.27477069463129, -28.883300057538364], + [115.5887281750802, -33.66501705609563] ] }, "bbox": [ - 123.80984529019764, - -19.47488830290292, - 131.8707236511523, - -14.850144611823424 + 115.5887281750802, + -33.66501705609563, + 125.27477069463129, + -28.883300057538364 ], "id": 1 }, @@ -55,18 +52,17 @@ "geometry": { "type": "LineString", "coordinates": [ - [131.8707236511523, -19.47488830290292], - [132.890625, -20.2209657795223], - [137.548828125, -22.67484735118852], - [144.05273437499997, -23.805449612314614], - [144.87133130139694, -24.083906137859618] + [108.10546875, -24.607069137709694], + [116.103515625, -16.04581345375217], + [123.3984375, -14.689881366618762], + [123.80984529019764, -14.850144611823424] ] }, "bbox": [ - 131.8707236511523, - -24.083906137859618, - 144.87133130139694, - -19.47488830290292 + 108.10546875, + -24.607069137709694, + 123.80984529019764, + -14.689881366618762 ], "id": 2 }, @@ -79,16 +75,16 @@ "geometry": { "type": "LineString", "coordinates": [ - [144.87133130139694, -24.083906137859618], - [150.380859375, -25.95804467331783], - [154.7611122904153, -29.8195405571525] + [123.80984529019764, -14.850144611823424], + [127.529296875, -16.299051014581817], + [131.8707236511523, -19.47488830290292] ] }, "bbox": [ - 144.87133130139694, - -29.8195405571525, - 154.7611122904153, - -24.083906137859618 + 123.80984529019764, + -19.47488830290292, + 131.8707236511523, + -14.850144611823424 ], "id": 3 }, @@ -101,17 +97,17 @@ "geometry": { "type": "LineString", "coordinates": [ - [154.7611122904153, -29.8195405571525], - [155.302734375, -30.29701788337204], - [160.3125, -37.64903402157864], - [152.83750336551705, -34.50536018265984] + [144.62835845465096, -31.052934], + [137.724609375, -28.14950321154457], + [127.705078125, -27.68352808378776], + [125.27477069463129, -28.883300057538364] ] }, "bbox": [ - 152.83750336551705, - -37.64903402157864, - 160.3125, - -29.8195405571525 + 125.27477069463129, + -31.052934, + 144.62835845465096, + -27.68352808378776 ], "id": 4 }, @@ -124,15 +120,18 @@ "geometry": { "type": "LineString", "coordinates": [ - [152.83750336551705, -34.50536018265984], - [144.62835845465096, -31.052934] + [131.8707236511523, -19.47488830290292], + [132.890625, -20.2209657795223], + [137.548828125, -22.67484735118852], + [144.05273437499997, -23.805449612314614], + [144.87133130139694, -24.083906137859618] ] }, "bbox": [ - 144.62835845465096, - -34.50536018265984, - 152.83750336551705, - -31.052934 + 131.8707236511523, + -24.083906137859618, + 144.87133130139694, + -19.47488830290292 ], "id": 5 }, @@ -145,17 +144,16 @@ "geometry": { "type": "LineString", "coordinates": [ - [144.62835845465096, -31.052934], - [137.724609375, -28.14950321154457], - [127.705078125, -27.68352808378776], - [125.27477069463129, -28.883300057538364] + [144.87133130139694, -24.083906137859618], + [150.380859375, -25.95804467331783], + [154.7611122904153, -29.8195405571525] ] }, "bbox": [ - 125.27477069463129, - -31.052934, - 144.62835845465096, - -27.68352808378776 + 144.87133130139694, + -29.8195405571525, + 154.7611122904153, + -24.083906137859618 ], "id": 6 }, @@ -168,15 +166,17 @@ "geometry": { "type": "LineString", "coordinates": [ - [125.27477069463129, -28.883300057538364], - [115.5887281750802, -33.665017056095635] + [154.7611122904153, -29.8195405571525], + [155.302734375, -30.29701788337204], + [160.3125, -37.64903402157864], + [152.83750336551705, -34.50536018265984] ] }, "bbox": [ - 115.5887281750802, - -33.665017056095635, - 125.27477069463129, - -28.883300057538364 + 152.83750336551705, + -37.64903402157864, + 160.3125, + -29.8195405571525 ] }, { @@ -188,15 +188,15 @@ "geometry": { "type": "LineString", "coordinates": [ - [115.5887281750802, -33.665017056095635], - [113.99414062499999, -34.45221847282653] + [152.83750336551705, -34.50536018265984], + [144.62835845465096, -31.052934] ] }, "bbox": [ - 113.99414062499999, - -34.45221847282653, - 115.5887281750802, - -33.665017056095635 + 144.62835845465096, + -34.50536018265984, + 152.83750336551705, + -31.052934 ] }, { diff --git a/packages/turf-line-split/test/out/polygon.geojson b/packages/turf-line-split/test/out/polygon.geojson index 274c11c224..07fc36a386 100644 --- a/packages/turf-line-split/test/out/polygon.geojson +++ b/packages/turf-line-split/test/out/polygon.geojson @@ -10,17 +10,17 @@ "geometry": { "type": "LineString", "coordinates": [ - [133.76953125, -5.44102230371796], - [133.38557423512307, -13.837223632933568] + [132.24601154296846, -33.23618973320634], + [131.66015625, -37.85750715625203] ] }, "bbox": [ - 129.37945207795372, - -13.837223632933568, - 137.77565340716933, - -5.44102230371796 + 129.64242518496138, + -37.85750715625203, + 134.26374260800708, + -33.23618973320634 ], - "id": 0 + "id": 1 }, { "type": "Feature", @@ -31,19 +31,15 @@ "geometry": { "type": "LineString", "coordinates": [ - [133.38557423512307, -13.837223632933568], - [133.2421875, -16.97274101999901], - [135.87890625, -20.2209657795223], - [137.548828125, -24.607069137709694], - [132.802734375, -28.84467368077178], - [132.24601154296846, -33.23618973320634] + [133.76953125, -5.44102230371796], + [133.38557423512307, -13.837223632933568] ] }, "bbox": [ - 132.24601154296846, - -33.23618973320634, - 137.548828125, - -13.837223632933568 + 133.38557423512307, + -13.837223632933568, + 133.76953125, + -5.44102230371796 ] }, { @@ -55,15 +51,19 @@ "geometry": { "type": "LineString", "coordinates": [ - [132.24601154296846, -33.23618973320634], - [131.66015625, -37.85750715625203] + [133.38557423512307, -13.837223632933568], + [133.2421875, -16.97274101999901], + [135.87890625, -20.2209657795223], + [137.548828125, -24.607069137709694], + [132.802734375, -28.84467368077178], + [132.24601154296846, -33.23618973320634] ] }, "bbox": [ - 131.66015625, - -37.85750715625203, 132.24601154296846, - -33.23618973320634 + -33.23618973320634, + 137.548828125, + -13.837223632933568 ] }, { diff --git a/yarn.lock b/yarn.lock index 713165f487..4276354702 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9405,6 +9405,13 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +sweepline-intersections@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/sweepline-intersections/-/sweepline-intersections-1.4.0.tgz#9a9843e0fd4829e83e48907506aef27256c564ab" + integrity sha512-OSqsMTRINvMQq9v/6KGaPnpXn2anbbm0lWR1bxa4OVScq7UBi7spK0jQE1q64/bYXZ478onjAa9lgdKLYL5HHQ== + dependencies: + tinyqueue "^2.0.0" + symbol-observable@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" @@ -9550,7 +9557,7 @@ tiny-lr@^1.1.0: object-assign "^4.1.0" qs "^6.4.0" -tinyqueue@^2.0.3: +tinyqueue@^2.0.0, tinyqueue@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/tinyqueue/-/tinyqueue-2.0.3.tgz#64d8492ebf39e7801d7bd34062e29b45b2035f08" integrity sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==