@turf/line-intersect
Advanced tools
Comparing version 3.11.6 to 3.12.2
17
index.js
@@ -161,3 +161,3 @@ var rbush = require('rbush'); | ||
case 'MultiLineString': | ||
multiFeature = flatten(multiFeature); | ||
multiFeature = flattenMultiLineString(multiFeature); | ||
break; | ||
@@ -197,2 +197,17 @@ case 'Polygon': | ||
/** | ||
* Flatten MultiLineString | ||
* | ||
* @private | ||
* @param {Feature<MultiLineString>} multiLineString GeoJSON Feature | ||
* @returns {FeatureCollection<LineString>} Feature Collection | ||
*/ | ||
function flattenMultiLineString(multiLineString) { | ||
var lines = []; | ||
multiLineString.geometry.coordinates.forEach(function (coordinates) { | ||
lines.push(helpers.lineString(coordinates)); | ||
}); | ||
return helpers.featureCollection(lines); | ||
} | ||
/** | ||
* Converts Polygon(s) to FeatureCollection LineStrings | ||
@@ -199,0 +214,0 @@ * |
{ | ||
"name": "@turf/line-intersect", | ||
"version": "3.11.6", | ||
"version": "3.12.2", | ||
"description": "Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).", | ||
@@ -34,3 +34,3 @@ "main": "index.js", | ||
"@turf/bbox-polygon": "^3.10.5", | ||
"@turf/flatten": "^3.10.5", | ||
"@turf/flatten": "^3.12.2", | ||
"@turf/helpers": "^3.10.5", | ||
@@ -37,0 +37,0 @@ "@turf/meta": "^3.10.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12756
237
Updated@turf/flatten@^3.12.2