From 4cac6cd85d0d33106fda70aff68671030acfb24b Mon Sep 17 00:00:00 2001 From: James Beard Date: Sat, 21 Sep 2024 16:37:19 +1000 Subject: [PATCH] Fixes to multiple modules that were performing scalar (2D) calculations when they should have been doing spherical (3D). Most changes were to nearestPointOnLine. pointToLineDistance now uses nearestPointOnLine for spherical calculations. Flow on corrections impacted lineSlice and nearestPointToLine as well. Tidied up some tests - fixed module name in test definitions, added a benchmark overall time in a few places for easier comparisons. --- packages/turf-line-slice/test.ts | 23 +- .../turf-line-slice/test/out/line1.geojson | 4 +- .../turf-line-slice/test/out/line2.geojson | 4 +- .../turf-line-slice/test/out/route2.geojson | 2 +- packages/turf-nearest-point-on-line/bench.ts | 15 +- packages/turf-nearest-point-on-line/index.ts | 230 +++++++--- .../turf-nearest-point-on-line/package.json | 3 - packages/turf-nearest-point-on-line/test.ts | 142 ++++++- ...ectedLocation - points on top of line.json | 2 +- .../out/line-northern-latitude-#344.geojson | 8 +- .../test/out/line1.geojson | 8 +- .../test/out/multiLine3.geojson | 8 +- .../test/out/route1.geojson | 8 +- .../test/out/route2.geojson | 8 +- .../test/out/fiji.geojson | 132 +++--- .../test/out/one.geojson | 132 +++--- .../test/out/two.geojson | 132 +++--- packages/turf-point-to-line-distance/bench.ts | 13 +- packages/turf-point-to-line-distance/index.ts | 39 +- .../turf-point-to-line-distance/package.json | 1 + packages/turf-point-to-line-distance/test.ts | 67 +++ .../test/out/city-line1.geojson | 402 +++++++++--------- .../test/out/city-line2.geojson | 402 +++++++++--------- .../test/out/city-segment-inside1.geojson | 402 +++++++++--------- .../test/out/city-segment-inside2.geojson | 402 +++++++++--------- .../test/out/city-segment-inside3.geojson | 402 +++++++++--------- .../test/out/city-segment-obtuse1.geojson | 100 ++--- .../test/out/city-segment-obtuse2.geojson | 64 +-- .../test/out/distances.json | 24 +- .../test/out/issue-1156.geojson | 402 +++++++++--------- .../test/out/line-fiji.geojson | 402 +++++++++--------- .../test/out/line-resolute-bay.geojson | 402 +++++++++--------- .../test/out/line1.geojson | 402 +++++++++--------- .../test/out/line2.geojson | 402 +++++++++--------- .../test/out/segment-fiji.geojson | 402 +++++++++--------- .../test/out/segment3.geojson | 372 ++++++++-------- .../test/out/segment4.geojson | 402 +++++++++--------- pnpm-lock.yaml | 12 +- 38 files changed, 3339 insertions(+), 3038 deletions(-) diff --git a/packages/turf-line-slice/test.ts b/packages/turf-line-slice/test.ts index 026b30238b..b52db05549 100644 --- a/packages/turf-line-slice/test.ts +++ b/packages/turf-line-slice/test.ts @@ -5,7 +5,7 @@ import { fileURLToPath } from "url"; import { loadJsonFileSync } from "load-json-file"; import { writeJsonFileSync } from "write-json-file"; import { truncate } from "@turf/truncate"; -import { featureCollection } from "@turf/helpers"; +import { featureCollection, point, lineString } from "@turf/helpers"; import { lineSlice } from "./index.js"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -38,3 +38,24 @@ test("turf-line-slice", (t) => { } t.end(); }); + +test("turf-nearest-point-on-line -- issue 2023", (t) => { + const ptStart = point([3.69140625, 51.72702815704774]); + const ptEnd = point([0.31936718356317106, 47.93913163509963]); + const line = lineString([ + [3.69140625, 51.72702815704774], + [-5.3173828125, 41.60722821271717], + ]); + + const slice = lineSlice(ptStart, ptEnd, line); + + t.deepEqual( + truncate(slice, { precision: 8 }).geometry.coordinates, + [ + [3.69140625, 51.72702816], + [-0.03079923, 48.08596086], + ], + "slice should be [[3.69140625, 51.72702816], [-0.03079923, 48.08596086]]" + ); + t.end(); +}); diff --git a/packages/turf-line-slice/test/out/line1.geojson b/packages/turf-line-slice/test/out/line1.geojson index 58dc12f1ba..fc79a112c9 100644 --- a/packages/turf-line-slice/test/out/line1.geojson +++ b/packages/turf-line-slice/test/out/line1.geojson @@ -38,9 +38,9 @@ "geometry": { "type": "LineString", "coordinates": [ - [-97.835729, 22.247393], + [-97.835747, 22.247595], [-97.820892, 22.17596], - [-97.738467, 22.051207] + [-97.738477, 22.051413] ] } } diff --git a/packages/turf-line-slice/test/out/line2.geojson b/packages/turf-line-slice/test/out/line2.geojson index ff32287959..c5215cde1d 100644 --- a/packages/turf-line-slice/test/out/line2.geojson +++ b/packages/turf-line-slice/test/out/line2.geojson @@ -37,8 +37,8 @@ "geometry": { "type": "LineString", "coordinates": [ - [0.049987, 0.049987], - [0.849858, 0.849858] + [0.05, 0.050008], + [0.849981, 0.850017] ] } } diff --git a/packages/turf-line-slice/test/out/route2.geojson b/packages/turf-line-slice/test/out/route2.geojson index a389e0af67..d86ab51f36 100644 --- a/packages/turf-line-slice/test/out/route2.geojson +++ b/packages/turf-line-slice/test/out/route2.geojson @@ -3796,7 +3796,7 @@ "geometry": { "type": "LineString", "coordinates": [ - [-111.895792, 48.877416], + [-111.895843, 48.877468], [-111.878176, 48.860393], [-111.867242, 48.849753], [-111.866486, 48.849013], diff --git a/packages/turf-nearest-point-on-line/bench.ts b/packages/turf-nearest-point-on-line/bench.ts index c6e79eabf3..eb6d58ceed 100644 --- a/packages/turf-nearest-point-on-line/bench.ts +++ b/packages/turf-nearest-point-on-line/bench.ts @@ -2,7 +2,7 @@ import fs from "fs"; import path from "path"; import { fileURLToPath } from "url"; import { loadJsonFileSync } from "load-json-file"; -import Benchmark from "benchmark"; +import Benchmark, { Event } from "benchmark"; import { nearestPointOnLine } from "./index.js"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -29,10 +29,19 @@ const fixtures = fs.readdirSync(directory).map((filename) => { * route1 x 195 ops/sec ±2.23% (80 runs sampled) * route2 x 218 ops/sec ±2.42% (78 runs sampled) */ +let totalTime = 0.0; const suite = new Benchmark.Suite("turf-nearest-point-on-line"); for (const { name, geojson } of fixtures) { const [line, point] = geojson.features; - suite.add(name, () => nearestPointOnLine(line, point)); + suite.add(name, () => nearestPointOnLine(line, point), { + onComplete: (e: Event) => + (totalTime = totalTime += e.target.times?.elapsed), + }); } -suite.on("cycle", (e) => console.log(String(e.target))).run(); +suite + .on("cycle", (e: Event) => console.log(String(e.target))) + .on("complete", () => + console.log(`completed in ${totalTime.toFixed(2)} seconds`) + ) + .run(); diff --git a/packages/turf-nearest-point-on-line/index.ts b/packages/turf-nearest-point-on-line/index.ts index 9d900fb3e3..f69c932690 100644 --- a/packages/turf-nearest-point-on-line/index.ts +++ b/packages/turf-nearest-point-on-line/index.ts @@ -1,11 +1,8 @@ -import { Feature, Point, LineString, MultiLineString } from "geojson"; -import { bearing } from "@turf/bearing"; +import { Feature, Point, Position, LineString, MultiLineString } from "geojson"; import { distance } from "@turf/distance"; -import { destination } from "@turf/destination"; -import { lineIntersect as lineIntersects } from "@turf/line-intersect"; import { flattenEach } from "@turf/meta"; -import { point, lineString, Coord, Units } from "@turf/helpers"; -import { getCoords } from "@turf/invariant"; +import { point, Coord, Units } from "@turf/helpers"; +import { getCoord, getCoords } from "@turf/invariant"; /** * Takes a {@link Point} and a {@link LineString} and calculates the closest Point on the (Multi)LineString. @@ -51,6 +48,8 @@ function nearestPointOnLine( throw new Error("lines and pt are required arguments"); } + const ptPos = getCoord(pt); + let closestPt: Feature< Point, { dist: number; index: number; multiFeatureIndex: number; location: number } @@ -68,39 +67,35 @@ function nearestPointOnLine( const coords: any = getCoords(line); for (let i = 0; i < coords.length - 1; i++) { - //start + //start - start of current line section const start: Feature = point(coords[i]); start.properties.dist = distance(pt, start, options); - //stop + const startPos = getCoord(start); + + //stop - end of current line section const stop: Feature = point(coords[i + 1]); stop.properties.dist = distance(pt, stop, options); + const stopPos = getCoord(stop); + // sectionLength const sectionLength = distance(start, stop, options); - //perpendicular - const heightDistance = Math.max( - start.properties.dist, - stop.properties.dist - ); - const direction = bearing(start, stop); - const perpendicularPt1 = destination( - pt, - heightDistance, - direction + 90, - options - ); - const perpendicularPt2 = destination( - pt, - heightDistance, - direction - 90, - options - ); - const intersect = lineIntersects( - lineString([ - perpendicularPt1.geometry.coordinates, - perpendicularPt2.geometry.coordinates, - ]), - lineString([start.geometry.coordinates, stop.geometry.coordinates]) - ); + let intersectPos: Position; + let wasEnd: boolean; + + // Short circuit if snap point is start or end position of the line + // segment. + if (startPos[0] === ptPos[0] && startPos[1] === ptPos[1]) { + [intersectPos, , wasEnd] = [startPos, undefined, false]; + } else if (stopPos[0] === ptPos[0] && stopPos[1] === ptPos[1]) { + [intersectPos, , wasEnd] = [stopPos, undefined, true]; + } else { + // Otherwise, find the nearest point the hard way. + [intersectPos, , wasEnd] = nearestPointOnSegment( + start.geometry.coordinates, + stop.geometry.coordinates, + getCoord(pt) + ); + } let intersectPt: | Feature< Point, @@ -108,40 +103,12 @@ function nearestPointOnLine( > | undefined; - if (intersect.features.length > 0 && intersect.features[0]) { - intersectPt = { - ...intersect.features[0], - properties: { - dist: distance(pt, intersect.features[0], options), - multiFeatureIndex: multiFeatureIndex, - location: - length + distance(start, intersect.features[0], options), - }, - }; - } - - if (start.properties.dist < closestPt.properties.dist) { - closestPt = { - ...start, - properties: { - ...start.properties, - index: i, - multiFeatureIndex: multiFeatureIndex, - location: length, - }, - }; - } - - if (stop.properties.dist < closestPt.properties.dist) { - closestPt = { - ...stop, - properties: { - ...stop.properties, - index: i + 1, - multiFeatureIndex: multiFeatureIndex, - location: length + sectionLength, - }, - }; + if (intersectPos) { + intersectPt = point(intersectPos, { + dist: distance(pt, intersectPos, options), + multiFeatureIndex: multiFeatureIndex, + location: length + distance(start, intersectPos, options), + }); } if ( @@ -150,9 +117,15 @@ function nearestPointOnLine( ) { closestPt = { ...intersectPt, - properties: { ...intersectPt.properties, index: i }, + properties: { + ...intersectPt.properties, + // Legacy behaviour where index progresses to next segment # if we + // went with the end point this iteration. + index: wasEnd ? i + 1 : i, + }, }; } + // update length length += sectionLength; } @@ -162,5 +135,126 @@ function nearestPointOnLine( return closestPt; } +type Vector = [number, number, number]; + +function dot(v1: Vector, v2: Vector): number { + const [v1x, v1y, v1z] = v1; + const [v2x, v2y, v2z] = v2; + return v1x * v2x + v1y * v2y + v1z * v2z; +} + +// https://en.wikipedia.org/wiki/Cross_product +function cross(v1: Vector, v2: Vector): Vector { + const [v1x, v1y, v1z] = v1; + const [v2x, v2y, v2z] = v2; + return [v1y * v2z - v1z * v2y, v1z * v2x - v1x * v2z, v1x * v2y - v1y * v2x]; +} + +function magnitude(v: Vector) { + return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2) + Math.pow(v[2], 2)); +} + +function angle(v1: Vector, v2: Vector): number { + const theta = dot(v1, v2) / (magnitude(v1) * magnitude(v2)); + return Math.acos(Math.min(Math.max(theta, -1), 1)); +} + +function toRadians(degrees: number) { + return degrees * (Math.PI / 180); +} + +function toDegrees(radians: number) { + return radians * (180 / Math.PI); +} + +function lngLatToVector(a: Position): Vector { + const lat = toRadians(a[1]); + const lng = toRadians(a[0]); + return [ + Math.cos(lat) * Math.cos(lng), + Math.cos(lat) * Math.sin(lng), + Math.sin(lat), + ]; +} + +function vectorToLngLat(v: Vector): Position { + const [x, y, z] = v; + const lat = toDegrees(Math.asin(z)); + const lng = toDegrees(Math.atan2(y, x)); + + return [lng, lat]; +} + +function nearestPointOnSegment( + posA: Position, + posB: Position, + posC: Position +): [Position, boolean, boolean] { + // Based heavily on this article on finding cross track distance to an arc: + // https://gis.stackexchange.com/questions/209540/projecting-cross-track-distance-on-great-circle + + // Convert lng/lat to spherical coords + const A = lngLatToVector(posA); // the vector from 0,0,0 to posA + const B = lngLatToVector(posB); + const C = lngLatToVector(posC); + + // Components of target point. + const [Cx, Cy, Cz] = C; + + // Calculate coefficients. + const [D, E, F] = cross(A, B); + const a = E * Cz - F * Cy; + const b = F * Cx - D * Cz; + const c = D * Cy - E * Cx; + + const f = c * E - b * F; + const g = a * F - c * D; + const h = b * D - a * E; + + const t = 1 / Math.sqrt(Math.pow(f, 2) + Math.pow(g, 2) + Math.pow(h, 2)); + + // Vectors to the two points these great circles intersect. + const I1: Vector = [f * t, g * t, h * t]; + const I2: Vector = [-1 * f * t, -1 * g * t, -1 * h * t]; + + // Figure out which is the closest intersection to this segment of the great + // circle. + const angleAB = angle(A, B); + const angleAI1 = angle(A, I1); + const angleBI1 = angle(B, I1); + const angleAI2 = angle(A, I2); + const angleBI2 = angle(B, I2); + + let I: Vector; + + if ( + (angleAI1 < angleAI2 && angleAI1 < angleBI2) || + (angleBI1 < angleAI2 && angleBI1 < angleBI2) + ) { + I = I1; + } else { + I = I2; + } + + // I is the closest intersection to the segment, though might not actually be + // ON the segment. + + // If angle AI or BI is greater than angleAB, I lies on the circle *beyond* A + // and B so use the closest of A or B as the intersection + if (angle(A, I) > angleAB || angle(B, I) > angleAB) { + if ( + distance(vectorToLngLat(I), vectorToLngLat(A)) <= + distance(vectorToLngLat(I), vectorToLngLat(B)) + ) { + return [vectorToLngLat(A), true, false]; + } else { + return [vectorToLngLat(B), false, true]; + } + } + + // As angleAI nor angleBI don't exceed angleAB, I is on the segment + return [vectorToLngLat(I), false, false]; +} + export { nearestPointOnLine }; export default nearestPointOnLine; diff --git a/packages/turf-nearest-point-on-line/package.json b/packages/turf-nearest-point-on-line/package.json index 7fcc0388db..325a758ade 100644 --- a/packages/turf-nearest-point-on-line/package.json +++ b/packages/turf-nearest-point-on-line/package.json @@ -61,12 +61,9 @@ "write-json-file": "^5.0.0" }, "dependencies": { - "@turf/bearing": "workspace:^", - "@turf/destination": "workspace:^", "@turf/distance": "workspace:^", "@turf/helpers": "workspace:^", "@turf/invariant": "workspace:^", - "@turf/line-intersect": "workspace:^", "@turf/meta": "workspace:^", "@types/geojson": "^7946.0.10", "tslib": "^2.6.2" diff --git a/packages/turf-nearest-point-on-line/test.ts b/packages/turf-nearest-point-on-line/test.ts index d94eda16cf..3a0bc6a252 100644 --- a/packages/turf-nearest-point-on-line/test.ts +++ b/packages/turf-nearest-point-on-line/test.ts @@ -32,7 +32,7 @@ const fixtures = fs.readdirSync(directories.in).map((filename) => { }; }); -test("turf-linestring-to-polygon", (t) => { +test("turf-nearest-point-on-line", (t) => { for (const { name, filename, geojson } of fixtures) { const [line, point] = geojson.features; const onLine = nearestPointOnLine(line, point); @@ -52,14 +52,14 @@ test("turf-linestring-to-polygon", (t) => { t.end(); }); -test("turf-point-on-line - throws error if invalid arguments", (t) => { +test("turf-nearest-point-on-line - throws error if invalid arguments", (t) => { t.throws(() => { nearestPointOnLine(undefined, undefined); }); t.end(); }); -test("turf-point-on-line - first point", (t) => { +test("turf-nearest-point-on-line - first point", (t) => { const line = lineString([ [-122.457175, 37.720033], [-122.457175, 37.718242], @@ -82,7 +82,7 @@ test("turf-point-on-line - first point", (t) => { t.end(); }); -test("turf-point-on-line - points behind first point", (t) => { +test("turf-nearest-point-on-line - points behind first point", (t) => { const line = lineString([ [-122.457175, 37.720033], [-122.457175, 37.718242], @@ -99,8 +99,8 @@ test("turf-point-on-line - points behind first point", (t) => { pts.forEach((pt) => { const snapped = truncate(nearestPointOnLine(line, pt)); t.deepEqual( - first.geometry.coordinates, snapped.geometry.coordinates, + first.geometry.coordinates, "pt behind start moves to first vertex" ); expectedLocation.push(Number(snapped.properties.location.toFixed(6))); @@ -117,7 +117,7 @@ test("turf-point-on-line - points behind first point", (t) => { t.end(); }); -test("turf-point-on-line - points in front of last point", (t) => { +test("turf-nearest-point-on-line - points in front of last point", (t) => { const line = lineString([ [-122.456161, 37.721259], [-122.457175, 37.720033], @@ -132,13 +132,13 @@ test("turf-point-on-line - points in front of last point", (t) => { point([-122.457309, 37.717979]), point([-122.45718, 37.717045]), ]; - const expectedLocation = []; + const expectedLocation: number[] = []; pts.forEach((pt) => { const snapped = truncate(nearestPointOnLine(line, pt)); t.deepEqual( - last.geometry.coordinates, snapped.geometry.coordinates, + last.geometry.coordinates, "pt behind start moves to last vertex" ); expectedLocation.push(Number(snapped.properties.location.toFixed(6))); @@ -155,7 +155,7 @@ test("turf-point-on-line - points in front of last point", (t) => { t.end(); }); -test("turf-point-on-line - points on joints", (t) => { +test("turf-nearest-point-on-line - points on joints", (t) => { const lines = [ lineString([ [-122.456161, 37.721259], @@ -189,7 +189,7 @@ test("turf-point-on-line - points on joints", (t) => { [-0.107599, 51.517782], ]), ]; - const expectedLocation = []; + const expectedLocation: number[] = []; lines.forEach((line, i) => { line.geometry.coordinates @@ -199,8 +199,8 @@ test("turf-point-on-line - points on joints", (t) => { .forEach((pt, j) => { const snapped = truncate(nearestPointOnLine(line, pt)); t.deepEqual( - pt.geometry.coordinates, snapped.geometry.coordinates, + pt.geometry.coordinates, "pt on joint stayed in place" ); if (!expectedLocation[i]) expectedLocation[i] = []; @@ -211,14 +211,14 @@ test("turf-point-on-line - points on joints", (t) => { const filepath = directories.out + "expectedLocation - points on joints.json"; if (process.env.REGEN) writeJsonFileSync(filepath, expectedLocation); t.deepEqual( - loadJsonFileSync(filepath), expectedLocation, + loadJsonFileSync(filepath), "properties.location" ); t.end(); }); -test("turf-point-on-line - points on top of line", (t) => { +test("turf-nearest-point-on-line - points on top of line", (t) => { const line = lineString([ [-0.109198, 51.522042], [-0.10923, 51.521942], @@ -251,14 +251,14 @@ test("turf-point-on-line - points on top of line", (t) => { directories.out + "expectedLocation - points on top of line.json"; if (process.env.REGEN) writeJsonFileSync(filepath, expectedLocation); t.deepEqual( - loadJsonFileSync(filepath), expectedLocation, + loadJsonFileSync(filepath), "properties.location" ); t.end(); }); -test("turf-point-on-line - point along line", (t) => { +test("turf-nearest-point-on-line - point along line", (t) => { const line = lineString([ [-122.457175, 37.720033], [-122.457175, 37.718242], @@ -273,7 +273,7 @@ test("turf-point-on-line - point along line", (t) => { t.end(); }); -test("turf-point-on-line - points on sides of lines", (t) => { +test("turf-nearest-point-on-line - points on sides of lines", (t) => { const line = lineString([ [-122.456161, 37.721259], [-122.457175, 37.718242], @@ -304,7 +304,7 @@ test("turf-point-on-line - points on sides of lines", (t) => { t.end(); }); -test("turf-point-on-line - check dist and index", (t) => { +test("turf-nearest-point-on-line - check dist and index", (t) => { const line = lineString([ [-92.090492, 41.102897], [-92.191085, 41.079868], @@ -334,7 +334,7 @@ test("turf-point-on-line - check dist and index", (t) => { t.end(); }); -test("turf-point-on-line -- Issue #691", (t) => { +test("turf-nearest-point-on-line -- Issue #691", (t) => { const line1 = lineString([ [7, 50], [8, 50], @@ -347,7 +347,7 @@ test("turf-point-on-line -- Issue #691", (t) => { t.end(); }); -test("turf-point-on-line -- Geometry Support", (t) => { +test("turf-nearest-point-on-line -- Geometry Support", (t) => { const pt = point([7, 55]); const line = lineString([ [7, 50], @@ -376,7 +376,7 @@ test("turf-point-on-line -- Geometry Support", (t) => { t.end(); }); -test("turf-point-on-line -- multifeature index", (t) => { +test("turf-nearest-point-on-line -- multifeature index", (t) => { const pt = point([4, 30]); const multiLine = multiLineString([ [ @@ -397,3 +397,105 @@ test("turf-point-on-line -- multifeature index", (t) => { ); t.end(); }); + +test("turf-nearest-point-on-line -- issue 1514", (t) => { + const pt = point([-40.01, 56]); + const line = lineString([ + [-40, 50], + [-40, 60], + ]); + + const nearest = nearestPointOnLine(line, pt, { units: "meters" }); + + t.deepEqual( + truncate(nearest, { precision: 8 }).geometry.coordinates, + [-40, 56.0000004], + "nearest point should be [-40, 56.0000004]" + ); + t.end(); +}); + +test("turf-nearest-point-on-line -- issue 965", (t) => { + const pt = point([-1.75, 50.02876666663333]); + const line = lineString([ + [-76.42916666666666, 36.967333333333336], + [-76.43083333333334, 36.96516666666667], + [-76.43033333333334, 36.962833333333336], + [-76.416, 36.95466666666667], + [-76.4075, 36.953833333333336], + [-76.3555, 36.959], + [-76.35083333333333, 36.96083333333333], + [-76.3405, 36.96783333333333], + [-76.29766666666667, 37.00066666666667], + [-76.25, 37.00966666666667], + [-76.015, 36.95], + [-75.975, 36.94166666666667], + [-75.92166666666667, 36.916666666666664], + [-75.87, 36.87166666666667], + [-75.78083333333333, 36.82666666666667], + [-75.76333333333334, 36.81], + [-75.64433333333334, 36.81], + [-2.75, 49.81666666666667], + [0.9866666666666667, 50.49333333333333], + [1.335, 50.68], + [1.4849999999999999, 50.89833333333333], + [1.7516666666666667, 51.10333333333333], + [2.1666666666666665, 51.25666666666667], + [2.5, 51.36666666666667], + [2.71, 51.36666666666667], + [2.8116666666666665, 51.42333333333333], + [2.881666666666667, 51.42166666666667], + [2.965, 51.415], + [3.046666666666667, 51.413333333333334], + [3.1066666666666665, 51.39833333333333], + [3.25, 51.41], + [3.3033333333333332, 51.406666666666666], + [3.3333333333333335, 51.406666666666666], + [3.36, 51.40833333333333], + [3.408333333333333, 51.4075], + [3.6, 51.43], + [3.6466666666666665, 51.43966666666667], + [3.6683333333333334, 51.43866666666667], + [3.71, 51.415333333333336], + [3.711666666666667, 51.39083333333333], + [3.720833333333333, 51.37833333333333], + [3.751666666666667, 51.365], + [3.8133333333333335, 51.346666666666664], + [3.8466666666666667, 51.345], + [3.888333333333333, 51.354166666666664], + [3.9283333333333332, 51.37083333333333], + [3.9466666666666668, 51.384166666666665], + [3.9783333333333335, 51.435], + [3.9966666666666666, 51.4375], + [4.015, 51.43333333333333], + [4.03, 51.4225], + [4.035, 51.39], + [4.045, 51.37833333333333], + [4.069166666666667, 51.37166666666667], + [4.101666666666667, 51.36866666666667], + [4.133333333333334, 51.37166666666667], + [4.147, 51.37416666666667], + [4.181333333333333, 51.39666666666667], + [4.190666666666667, 51.39833333333333], + [4.200833333333334, 51.39833333333333], + [4.2091666666666665, 51.39416666666666], + [4.221333333333333, 51.36533333333333], + [4.2396666666666665, 51.355], + [4.261666666666667, 51.348333333333336], + [4.275, 51.34466666666667], + [4.293333333333333, 51.343333333333334], + [4.2988333333333335, 51.34166666666667], + [4.308333333333334, 51.325], + [4.314666666666667, 51.329], + [4.316666666666666, 51.32633333333333], + ]); + + const nearest = nearestPointOnLine(line, pt, { units: "meters" }); + + t.deepEqual( + truncate(nearest, { precision: 8 }).geometry.coordinates, + [-1.74267971, 50.01283081], + "nearest point should be [-1.74267971, 50.01283081]" + ); + t.end(); +}); diff --git a/packages/turf-nearest-point-on-line/test/out/expectedLocation - points on top of line.json b/packages/turf-nearest-point-on-line/test/out/expectedLocation - points on top of line.json index 6ab11d48aa..fad575df4f 100644 --- a/packages/turf-nearest-point-on-line/test/out/expectedLocation - points on top of line.json +++ b/packages/turf-nearest-point-on-line/test/out/expectedLocation - points on top of line.json @@ -1,4 +1,4 @@ [ 0, 0.030566, 0.061133, 0.091699, 0.122265, 0.152831, 0.183398, 0.213964, 0.24453, - 0.275097 + 0.275096 ] diff --git a/packages/turf-nearest-point-on-line/test/out/line-northern-latitude-#344.geojson b/packages/turf-nearest-point-on-line/test/out/line-northern-latitude-#344.geojson index 64a5af130e..4c16f72487 100644 --- a/packages/turf-nearest-point-on-line/test/out/line-northern-latitude-#344.geojson +++ b/packages/turf-nearest-point-on-line/test/out/line-northern-latitude-#344.geojson @@ -23,7 +23,7 @@ "geometry": { "type": "LineString", "coordinates": [ - [-94.517044, 74.854791], + [-94.51639, 74.85549], [-94.713135, 74.870757] ] } @@ -39,15 +39,15 @@ { "type": "Feature", "properties": { - "dist": 5.964157, + "dist": 5.959562, "multiFeatureIndex": 0, - "location": 19.828788, + "location": 19.748879, "index": 1, "marker-color": "#F0F" }, "geometry": { "type": "Point", - "coordinates": [-94.517044, 74.854791] + "coordinates": [-94.51639, 74.85549] } } ] diff --git a/packages/turf-nearest-point-on-line/test/out/line1.geojson b/packages/turf-nearest-point-on-line/test/out/line1.geojson index 634477fa6e..d896f49105 100644 --- a/packages/turf-nearest-point-on-line/test/out/line1.geojson +++ b/packages/turf-nearest-point-on-line/test/out/line1.geojson @@ -23,7 +23,7 @@ "geometry": { "type": "LineString", "coordinates": [ - [-97.856495, 22.269978], + [-97.856502, 22.270017], [-97.879944, 22.26241] ] } @@ -39,15 +39,15 @@ { "type": "Feature", "properties": { - "dist": 2.555507, + "dist": 2.556271, "multiFeatureIndex": 0, - "location": 22.141834, + "location": 22.137494, "index": 1, "marker-color": "#F0F" }, "geometry": { "type": "Point", - "coordinates": [-97.856495, 22.269978] + "coordinates": [-97.856502, 22.270017] } } ] diff --git a/packages/turf-nearest-point-on-line/test/out/multiLine3.geojson b/packages/turf-nearest-point-on-line/test/out/multiLine3.geojson index 67be313c2c..d858ad925f 100644 --- a/packages/turf-nearest-point-on-line/test/out/multiLine3.geojson +++ b/packages/turf-nearest-point-on-line/test/out/multiLine3.geojson @@ -41,7 +41,7 @@ "geometry": { "type": "LineString", "coordinates": [ - [123.924613, -19.025117], + [123.930125, -19.033194], [123.486328, -18.020528] ] } @@ -57,15 +57,15 @@ { "type": "Feature", "properties": { - "dist": 120.886021, + "dist": 121.937841, "multiFeatureIndex": 0, - "location": 214.548785, + "location": 214.735285, "index": 0, "marker-color": "#F0F" }, "geometry": { "type": "Point", - "coordinates": [123.924613, -19.025117] + "coordinates": [123.930125, -19.033194] } } ] diff --git a/packages/turf-nearest-point-on-line/test/out/route1.geojson b/packages/turf-nearest-point-on-line/test/out/route1.geojson index 9ca24d9470..71003b12d5 100644 --- a/packages/turf-nearest-point-on-line/test/out/route1.geojson +++ b/packages/turf-nearest-point-on-line/test/out/route1.geojson @@ -4776,7 +4776,7 @@ "geometry": { "type": "LineString", "coordinates": [ - [-78.429267, 38.140728], + [-78.429232, 38.140783], [-78.348999, 38.108628] ] } @@ -4792,15 +4792,15 @@ { "type": "Feature", "properties": { - "dist": 7.876559, + "dist": 7.876557, "multiFeatureIndex": 0, - "location": 183.461611, + "location": 183.46844, "index": 3104, "marker-color": "#F0F" }, "geometry": { "type": "Point", - "coordinates": [-78.429267, 38.140728] + "coordinates": [-78.429232, 38.140783] } } ] diff --git a/packages/turf-nearest-point-on-line/test/out/route2.geojson b/packages/turf-nearest-point-on-line/test/out/route2.geojson index d17968e692..59b51f99d4 100644 --- a/packages/turf-nearest-point-on-line/test/out/route2.geojson +++ b/packages/turf-nearest-point-on-line/test/out/route2.geojson @@ -3780,7 +3780,7 @@ "geometry": { "type": "LineString", "coordinates": [ - [-111.927576, 48.931885], + [-111.927805, 48.932435], [-112.181396, 48.886392] ] } @@ -3796,15 +3796,15 @@ { "type": "Feature", "properties": { - "dist": 19.22748, + "dist": 19.22738, "multiFeatureIndex": 0, - "location": 303.703041, + "location": 303.639629, "index": 1185, "marker-color": "#F0F" }, "geometry": { "type": "Point", - "coordinates": [-111.927576, 48.931885] + "coordinates": [-111.927805, 48.932435] } } ] diff --git a/packages/turf-nearest-point-to-line/test/out/fiji.geojson b/packages/turf-nearest-point-to-line/test/out/fiji.geojson index e740058a87..fe1c68c6a5 100644 --- a/packages/turf-nearest-point-to-line/test/out/fiji.geojson +++ b/packages/turf-nearest-point-to-line/test/out/fiji.geojson @@ -37,7 +37,7 @@ { "type": "Feature", "properties": { - "dist": 3.432383, + "dist": 3.504198, "marker-color": "#F00", "marker-size": "large", "marker-symbol": "star" @@ -69,71 +69,71 @@ "type": "Polygon", "coordinates": [ [ - [180.258179, -16.923483], - [180.255016, -16.923632], - [180.251884, -16.924076], - [180.248812, -16.924812], - [180.245831, -16.925833], - [180.242969, -16.927128], - [180.240253, -16.928685], - [180.237709, -16.930489], - [180.235363, -16.932523], - [180.233236, -16.934767], - [180.231349, -16.9372], - [180.229721, -16.939798], - [180.228366, -16.942537], - [180.227299, -16.945389], - [180.226529, -16.948327], - [180.226064, -16.951323], - [180.225908, -16.954349], - [180.226063, -16.957375], - [180.226527, -16.960371], - [180.227296, -16.96331], - [180.228363, -16.966162], - [180.229716, -16.968901], - [180.231344, -16.971499], - [180.233231, -16.973932], - [180.235357, -16.976177], - [180.237704, -16.978212], - [180.240248, -16.980017], - [180.242964, -16.981574], - [180.245827, -16.98287], - [180.24881, -16.98389], - [180.251882, -16.984626], - [180.255015, -16.985071], - [180.258179, -16.98522], - [180.261342, -16.985071], - [180.264475, -16.984626], - [180.267548, -16.98389], - [180.27053, -16.98287], - [180.273393, -16.981574], - [180.27611, -16.980017], - [180.278654, -16.978212], - [180.281, -16.976177], - [180.283127, -16.973932], - [180.285013, -16.971499], - [180.286641, -16.968901], - [180.287995, -16.966162], - [180.289061, -16.96331], - [180.28983, -16.960371], - [180.290295, -16.957375], - [180.290449, -16.954349], - [180.290293, -16.951323], - [180.289828, -16.948327], - [180.289058, -16.945389], - [180.287991, -16.942537], - [180.286637, -16.939798], - [180.285008, -16.9372], - [180.283122, -16.934767], - [180.280995, -16.932523], - [180.278648, -16.930489], - [180.276105, -16.928685], - [180.273389, -16.927128], - [180.270526, -16.925833], - [180.267545, -16.924812], - [180.264473, -16.924076], - [180.261341, -16.923632], - [180.258179, -16.923483] + [180.258179, -16.922837], + [180.25495, -16.922989], + [180.251752, -16.923443], + [180.248617, -16.924194], + [180.245573, -16.925236], + [180.24265, -16.926558], + [180.239878, -16.928148], + [180.237281, -16.92999], + [180.234885, -16.932066], + [180.232714, -16.934358], + [180.230788, -16.936841], + [180.229125, -16.939494], + [180.227743, -16.942289], + [180.226653, -16.945201], + [180.225867, -16.948201], + [180.225392, -16.95126], + [180.225233, -16.954349], + [180.225391, -16.957438], + [180.225865, -16.960497], + [180.22665, -16.963497], + [180.227739, -16.966409], + [180.229121, -16.969205], + [180.230783, -16.971858], + [180.232708, -16.974342], + [180.23488, -16.976634], + [180.237275, -16.978711], + [180.239872, -16.980554], + [180.242646, -16.982144], + [180.245569, -16.983466], + [180.248613, -16.984508], + [180.25175, -16.98526], + [180.254949, -16.985714], + [180.258179, -16.985865], + [180.261409, -16.985714], + [180.264607, -16.98526], + [180.267744, -16.984508], + [180.270789, -16.983466], + [180.273712, -16.982144], + [180.276485, -16.980554], + [180.279082, -16.978711], + [180.281478, -16.976634], + [180.283649, -16.974342], + [180.285575, -16.971858], + [180.287237, -16.969205], + [180.288619, -16.966409], + [180.289707, -16.963497], + [180.290493, -16.960497], + [180.290966, -16.957438], + [180.291125, -16.954349], + [180.290965, -16.95126], + [180.29049, -16.948201], + [180.289704, -16.945201], + [180.288615, -16.942289], + [180.287232, -16.939494], + [180.28557, -16.936841], + [180.283644, -16.934358], + [180.281472, -16.932066], + [180.279077, -16.92999], + [180.27648, -16.928148], + [180.273707, -16.926558], + [180.270785, -16.925236], + [180.267741, -16.924194], + [180.264605, -16.923443], + [180.261407, -16.922989], + [180.258179, -16.922837] ] ] } diff --git a/packages/turf-nearest-point-to-line/test/out/one.geojson b/packages/turf-nearest-point-to-line/test/out/one.geojson index ba312ce97e..a3f2d1401d 100644 --- a/packages/turf-nearest-point-to-line/test/out/one.geojson +++ b/packages/turf-nearest-point-to-line/test/out/one.geojson @@ -25,7 +25,7 @@ { "type": "Feature", "properties": { - "dist": 32.003656, + "dist": 31.791167, "marker-color": "#F00", "marker-size": "large", "marker-symbol": "star" @@ -57,71 +57,71 @@ "type": "Polygon", "coordinates": [ [ - [29.750977, 18.02344], - [29.703234, 18.021204], - [29.655955, 18.014518], - [29.609598, 18.003445], - [29.564612, 17.988094], - [29.521434, 17.968614], - [29.480483, 17.945194], - [29.442152, 17.91806], - [29.406814, 17.887476], - [29.374809, 17.853737], - [29.346444, 17.817171], - [29.321991, 17.778131], - [29.301684, 17.736995], - [29.285717, 17.69416], - [29.274241, 17.65004], - [29.267362, 17.60506], - [29.265144, 17.559654], - [29.267604, 17.514259], - [29.274716, 17.469313], - [29.286408, 17.425248], - [29.302563, 17.382486], - [29.323024, 17.34144], - [29.347592, 17.302503], - [29.376028, 17.266048], - [29.408057, 17.232425], - [29.443371, 17.201956], - [29.481631, 17.174934], - [29.522468, 17.151616], - [29.565491, 17.132225], - [29.610288, 17.116948], - [29.65643, 17.10593], - [29.703476, 17.099277], - [29.750977, 17.097053], - [29.798477, 17.099277], - [29.845523, 17.10593], - [29.891665, 17.116948], - [29.936462, 17.132225], - [29.979485, 17.151616], - [30.020322, 17.174934], - [30.058582, 17.201956], - [30.093896, 17.232425], - [30.125925, 17.266048], - [30.154361, 17.302503], - [30.178929, 17.34144], - [30.19939, 17.382486], - [30.215545, 17.425248], - [30.227237, 17.469313], - [30.234349, 17.514259], - [30.236809, 17.559654], - [30.234591, 17.60506], - [30.227712, 17.65004], - [30.216236, 17.69416], - [30.200269, 17.736995], - [30.179962, 17.778131], - [30.15551, 17.817171], - [30.127144, 17.853737], - [30.095139, 17.887476], - [30.059801, 17.91806], - [30.021471, 17.945194], - [29.980519, 17.968614], - [29.937341, 17.988094], - [29.892356, 18.003445], - [29.845998, 18.014518], - [29.798719, 18.021204], - [29.750977, 18.02344] + [29.750977, 18.020365], + [29.703552, 18.018144], + [29.656587, 18.011502], + [29.610539, 18.000503], + [29.565852, 17.985254], + [29.522962, 17.965904], + [29.482282, 17.942639], + [29.444207, 17.915686], + [29.409104, 17.885305], + [29.37731, 17.851791], + [29.349133, 17.815468], + [29.324842, 17.776688], + [29.30467, 17.735825], + [29.288809, 17.693275], + [29.277408, 17.649448], + [29.270574, 17.604766], + [29.26837, 17.559662], + [29.270813, 17.514569], + [29.277877, 17.469921], + [29.28949, 17.426147], + [29.305538, 17.38367], + [29.325862, 17.342896], + [29.350266, 17.304217], + [29.378513, 17.268003], + [29.41033, 17.234603], + [29.44541, 17.204337], + [29.483415, 17.177493], + [29.523982, 17.154329], + [29.56672, 17.135068], + [29.61122, 17.119892], + [29.657057, 17.108947], + [29.703791, 17.102338], + [29.750977, 17.100128], + [29.798162, 17.102338], + [29.844897, 17.108947], + [29.890733, 17.119892], + [29.935233, 17.135068], + [29.977971, 17.154329], + [30.018538, 17.177493], + [30.056543, 17.204337], + [30.091623, 17.234603], + [30.12344, 17.268003], + [30.151687, 17.304217], + [30.176091, 17.342896], + [30.196416, 17.38367], + [30.212463, 17.426147], + [30.224076, 17.469921], + [30.23114, 17.514569], + [30.233584, 17.559662], + [30.231379, 17.604766], + [30.224546, 17.649448], + [30.213145, 17.693275], + [30.197283, 17.735825], + [30.177111, 17.776688], + [30.15282, 17.815468], + [30.124643, 17.851791], + [30.09285, 17.885305], + [30.057746, 17.915686], + [30.019671, 17.942639], + [29.978991, 17.965904], + [29.936101, 17.985254], + [29.891415, 18.000503], + [29.845366, 18.011502], + [29.798401, 18.018144], + [29.750977, 18.020365] ] ] } diff --git a/packages/turf-nearest-point-to-line/test/out/two.geojson b/packages/turf-nearest-point-to-line/test/out/two.geojson index 9fa0e29b51..5eb1480d59 100644 --- a/packages/turf-nearest-point-to-line/test/out/two.geojson +++ b/packages/turf-nearest-point-to-line/test/out/two.geojson @@ -29,7 +29,7 @@ { "type": "Feature", "properties": { - "dist": 72.458938, + "dist": 78.009454, "marker-color": "#F00", "marker-size": "large", "marker-symbol": "star" @@ -62,71 +62,71 @@ "type": "Polygon", "coordinates": [ [ - [-38.012695, 26.846515], - [-38.084279, 26.843359], - [-38.155162, 26.833923], - [-38.22465, 26.8183], - [-38.292063, 26.796641], - [-38.356743, 26.76916], - [-38.41806, 26.736125], - [-38.475417, 26.697858], - [-38.52826, 26.654734], - [-38.576079, 26.607173], - [-38.618414, 26.555638], - [-38.654861, 26.50063], - [-38.685075, 26.442684], - [-38.708773, 26.382361], - [-38.725736, 26.320247], - [-38.73581, 26.256941], - [-38.73891, 26.193054], - [-38.735018, 26.129202], - [-38.724181, 26.065999], - [-38.706516, 26.004053], - [-38.682202, 25.943958], - [-38.651483, 25.886288], - [-38.61466, 25.831595], - [-38.572094, 25.780402], - [-38.524197, 25.733196], - [-38.471432, 25.690428], - [-38.414305, 25.652503], - [-38.353364, 25.619783], - [-38.289189, 25.592578], - [-38.222392, 25.571146], - [-38.153607, 25.555691], - [-38.083486, 25.546359], - [-38.012695, 25.543239], - [-37.941904, 25.546359], - [-37.871784, 25.555691], - [-37.802999, 25.571146], - [-37.736201, 25.592578], - [-37.672027, 25.619783], - [-37.611085, 25.652503], - [-37.553959, 25.690428], - [-37.501194, 25.733196], - [-37.453297, 25.780402], - [-37.410731, 25.831595], - [-37.373908, 25.886288], - [-37.343188, 25.943958], - [-37.318875, 26.004053], - [-37.301209, 26.065999], - [-37.290373, 26.129202], - [-37.28648, 26.193054], - [-37.28958, 26.256941], - [-37.299655, 26.320247], - [-37.316617, 26.382361], - [-37.340315, 26.442684], - [-37.37053, 26.50063], - [-37.406977, 26.555638], - [-37.449312, 26.607173], - [-37.49713, 26.654734], - [-37.549973, 26.697858], - [-37.607331, 26.736125], - [-37.668648, 26.76916], - [-37.733328, 26.796641], - [-37.800741, 26.8183], - [-37.870229, 26.833923], - [-37.941111, 26.843359], - [-38.012695, 26.846515] + [-38.012695, 26.896432], + [-38.089796, 26.893033], + [-38.166141, 26.88287], + [-38.240981, 26.866042], + [-38.313584, 26.842715], + [-38.38324, 26.813117], + [-38.449269, 26.777538], + [-38.51103, 26.736326], + [-38.567924, 26.689884], + [-38.619402, 26.638664], + [-38.66497, 26.583167], + [-38.704193, 26.523933], + [-38.7367, 26.461537], + [-38.762187, 26.396584], + [-38.78042, 26.329705], + [-38.791234, 26.261546], + [-38.794539, 26.192764], + [-38.790315, 26.124023], + [-38.778618, 26.055983], + [-38.759571, 25.989299], + [-38.73337, 25.92461], + [-38.700277, 25.862534], + [-38.660619, 25.803664], + [-38.614783, 25.748564], + [-38.563214, 25.697757], + [-38.506411, 25.651726], + [-38.444918, 25.610911], + [-38.379324, 25.575697], + [-38.310254, 25.546419], + [-38.238365, 25.523355], + [-38.164339, 25.506723], + [-38.088877, 25.49668], + [-38.012695, 25.493322], + [-37.936513, 25.49668], + [-37.861052, 25.506723], + [-37.787026, 25.523355], + [-37.715137, 25.546419], + [-37.646067, 25.575697], + [-37.580473, 25.610911], + [-37.51898, 25.651726], + [-37.462176, 25.697757], + [-37.410608, 25.748564], + [-37.364772, 25.803664], + [-37.325114, 25.862534], + [-37.292021, 25.92461], + [-37.26582, 25.989299], + [-37.246773, 26.055983], + [-37.235075, 26.124023], + [-37.230852, 26.192764], + [-37.234157, 26.261546], + [-37.244971, 26.329705], + [-37.263203, 26.396584], + [-37.288691, 26.461537], + [-37.321198, 26.523933], + [-37.360421, 26.583167], + [-37.405989, 26.638664], + [-37.457466, 26.689884], + [-37.51436, 26.736326], + [-37.576121, 26.777538], + [-37.642151, 26.813117], + [-37.711806, 26.842715], + [-37.784409, 26.866042], + [-37.85925, 26.88287], + [-37.935594, 26.893033], + [-38.012695, 26.896432] ] ] } diff --git a/packages/turf-point-to-line-distance/bench.ts b/packages/turf-point-to-line-distance/bench.ts index a1f9b2e15c..18275fa06e 100644 --- a/packages/turf-point-to-line-distance/bench.ts +++ b/packages/turf-point-to-line-distance/bench.ts @@ -72,12 +72,21 @@ for (const { name, geojson } of fixtures) { * segment3 x 692,171 ops/sec ±1.16% (82 runs sampled) * segment4 x 681,063 ops/sec ±0.95% (86 runs sampled) */ +let totalTime = 0.0; const suite = new Benchmark.Suite("turf-point-to-line-distance"); for (const { name, geojson } of fixtures) { const [point, line] = geojson.features; let { units } = geojson.properties || {}; if (!units) units = "kilometers"; - suite.add(name, () => pointToLineDistance(point, line, { units: units })); + suite.add(name, () => pointToLineDistance(point, line, { units: units }), { + onComplete: (e: Event) => + (totalTime = totalTime += e.target.times?.elapsed), + }); } -suite.on("cycle", (e) => console.log(String(e.target))).run(); +suite + .on("cycle", (e: Event) => console.log(String(e.target))) + .on("complete", () => + console.log(`completed in ${totalTime.toFixed(2)} seconds`) + ) + .run(); diff --git a/packages/turf-point-to-line-distance/index.ts b/packages/turf-point-to-line-distance/index.ts index 0bd7b60b48..309fcf0997 100644 --- a/packages/turf-point-to-line-distance/index.ts +++ b/packages/turf-point-to-line-distance/index.ts @@ -1,6 +1,5 @@ // Taken from http://geomalgorithms.com/a02-_lines.html import { Feature, LineString } from "geojson"; -import { distance as getDistance } from "@turf/distance"; import { convertLength, Coord, @@ -9,9 +8,10 @@ import { point, Units, } from "@turf/helpers"; +import { nearestPointOnLine } from "@turf/nearest-point-on-line"; import { featureOf } from "@turf/invariant"; import { segmentEach } from "@turf/meta"; -import { rhumbDistance as getPlanarDistance } from "@turf/rhumb-distance"; +import { rhumbDistance } from "@turf/rhumb-distance"; /** * Returns the minimum distance between a {@link Point} and a {@link LineString}, being the distance from a line the @@ -75,11 +75,13 @@ function pointToLineDistance( let distance = Infinity; const p = pt.geometry.coordinates; segmentEach(line, (segment) => { - const a = segment!.geometry.coordinates[0]; - const b = segment!.geometry.coordinates[1]; - const d = distanceToSegment(p, a, b, options); - if (d < distance) { - distance = d; + if (segment) { + const a = segment.geometry.coordinates[0]; + const b = segment.geometry.coordinates[1]; + const d = distanceToSegment(p, a, b, options); + if (d < distance) { + distance = d; + } } }); return convertLength(distance, "degrees", options.units); @@ -101,31 +103,36 @@ function distanceToSegment( b: number[], options: any ) { + if (options.method === "geodesic") { + // Use nearestPointOnLine to properly calcuate distances on a spherical + // Earth. + const nearest = nearestPointOnLine(lineString([a, b]).geometry, p, { + units: "degrees", + }); + return nearest.properties.dist; + } + + // Perform scalar calculations instead using rhumb lines. const v = [b[0] - a[0], b[1] - a[1]]; const w = [p[0] - a[0], p[1] - a[1]]; const c1 = dot(w, v); if (c1 <= 0) { - return calcDistance(p, a, { method: options.method, units: "degrees" }); + return rhumbDistance(p, a, { units: "degrees" }); } const c2 = dot(v, v); if (c2 <= c1) { - return calcDistance(p, b, { method: options.method, units: "degrees" }); + return rhumbDistance(p, b, { units: "degrees" }); } const b2 = c1 / c2; const Pb = [a[0] + b2 * v[0], a[1] + b2 * v[1]]; - return calcDistance(p, Pb, { method: options.method, units: "degrees" }); + + return rhumbDistance(p, Pb, { units: "degrees" }); } function dot(u: number[], v: number[]) { return u[0] * v[0] + u[1] * v[1]; } -function calcDistance(a: number[], b: number[], options: any) { - return options.method === "planar" - ? getPlanarDistance(a, b, options) - : getDistance(a, b, options); -} - export { pointToLineDistance }; export default pointToLineDistance; diff --git a/packages/turf-point-to-line-distance/package.json b/packages/turf-point-to-line-distance/package.json index e9c63b2a30..8d1feff848 100644 --- a/packages/turf-point-to-line-distance/package.json +++ b/packages/turf-point-to-line-distance/package.json @@ -72,6 +72,7 @@ "@turf/helpers": "workspace:^", "@turf/invariant": "workspace:^", "@turf/meta": "workspace:^", + "@turf/nearest-point-on-line": "workspace:^", "@turf/projection": "workspace:^", "@turf/rhumb-bearing": "workspace:^", "@turf/rhumb-distance": "workspace:^", diff --git a/packages/turf-point-to-line-distance/test.ts b/packages/turf-point-to-line-distance/test.ts index ffbc640cc2..37498612a5 100644 --- a/packages/turf-point-to-line-distance/test.ts +++ b/packages/turf-point-to-line-distance/test.ts @@ -1,6 +1,7 @@ import fs from "fs"; import test from "tape"; import path from "path"; +import { Feature, LineString, Point } from "geojson"; import { fileURLToPath } from "url"; import { loadJsonFileSync } from "load-json-file"; import { writeJsonFileSync } from "write-json-file"; @@ -117,3 +118,69 @@ test("turf-point-to-line-distance -- Check planar and geodesic results are diffe t.notEqual(geoOut, planarOut); t.end(); }); + +test("turf-point-to-line-distance -- issue 2270", (t) => { + let pt: Feature; + let line: Feature; + let d: number; + + // This point should be about 3.4m from the line. Definitely not 4.3! + // https://github.com/Turfjs/turf/issues/2270#issuecomment-1073787691 + pt = point([10.748363481687537, 59.94785299224352]); + line = lineString([ + [10.7482034954027, 59.9477463357725], + [10.7484686179823, 59.9480515133037], + ]); + + d = round(pointToLineDistance(pt, line, { units: "meters" }), 1); + t.equal(d, 3.4, "Point is approx 3.4m from line"); + + // This point should be about 1000m from the line. Definitely not 1017! + // https://github.com/Turfjs/turf/issues/2270#issuecomment-2307907374 + pt = point([11.991689565382663, 34.00578044047174]); + line = lineString([ + [12, 34], + [11.993027757380355, 33.99311060965808], + ]); + + d = round(pointToLineDistance(pt, line, { units: "meters" })); + t.equal(d, 1000, "Point is approx 1000m from line"); + + t.end(); +}); + +test("turf-point-to-line-distance -- issue 1156", (t) => { + // According to issue 1156 the result of pointToLineDistance varies suddenly + // at a certain longitude. Code below + + // When the error occurs we would expect to see 'd' jump from about 188 to + // over 800 + // ... + // [ 11.028347, 41 ] 188.9853459755496 189.00642024172396 + // [ 11.028348, 41 ] 842.5784253401666 189.08988164279026 + // ^^^ + + // https://github.com/Turfjs/turf/issues/1156#issue-279806209 + let lineCoords = [ + [10.964832305908203, 41.004681939880314], + [10.977363586425781, 40.99096148527727], + [10.983200073242188, 40.97075154073346], + [11.02834701538086, 40.98372150040732], + [11.02508544921875, 41.00716631272605], + [10.994186401367188, 41.01947819666632], + [10.964832305908203, 41.004681939880314], + ]; + + let line = lineString(lineCoords); + + let x0 = 11.02834; + let x1 = 11.02835; + let dx = 0.000001; + for (let i = 0, x = x0; x <= x1; i++, x = x0 + i * dx) { + let p = point([x, 41.0]); + let d = pointToLineDistance(p, line, { units: "meters" }); + t.true(d < 190, "pointToLineDistance never jumps past 190"); + } + + t.end(); +}); diff --git a/packages/turf-point-to-line-distance/test/out/city-line1.geojson b/packages/turf-point-to-line-distance/test/out/city-line1.geojson index 3b69f88fcc..2a7e1e0532 100644 --- a/packages/turf-point-to-line-distance/test/out/city-line1.geojson +++ b/packages/turf-point-to-line-distance/test/out/city-line1.geojson @@ -33,207 +33,207 @@ "type": "Polygon", "coordinates": [ [ - [-0.3767967224121093, 39.47819519469433], - [-0.37717366447120515, 39.47819062349373], - [-0.37755023438550783, 39.47817691440493], - [-0.37792606037807247, 39.47815408096256], - [-0.37830077140728574, 39.47812214570944], - [-0.37867399753361825, 39.478081140174304], - [-0.37904537028528285, 39.47803110484069], - [-0.3794145230224353, 39.47797208910683], - [-0.3797810912995552, 39.47790415123693], - [-0.38014471322564813, 39.47782735830347], - [-0.38050502982191126, 39.47774178612103], - [-0.3808616853765066, 39.477647519171235], - [-0.381214327796091, 39.47754465051934], - [-0.38156260895375294, 39.477433281722206], - [-0.3819061850330118, 39.47731352272793], - [-0.3822447168675381, 39.47718549176721], - [-0.3825778702762565, 39.47704931523645], - [-0.3829053163935029, 39.47690512757287], - [-0.3832267319939034, 39.47675307112165], - [-0.3835417998116576, 39.47659329599524], - [-0.3838502088539076, 39.476425959925], - [-0.3841516547078829, 39.476251228105404], - [-0.3844458398415176, 39.476069273030724], - [-0.38473247389724163, 39.47588027432459], - [-0.3850112739786563, 39.475684418562544], - [-0.38528196492981037, 39.475481899087654], - [-0.38554427960680027, 39.4752729158195], - [-0.38579795914142695, 39.475057675056625], - [-0.3860427531966488, 39.47483638927277], - [-0.38627842021357833, 39.474609276906904], - [-0.3865047276497791, 39.474376562147434], - [-0.38672145220862925, 39.47413847471082], - [-0.3869283800595237, 39.47389524961451], - [-0.38712530704869996, 39.47364712694494], - [-0.3873120389004807, 39.47339435162029], - [-0.3874883914087324, 39.47313717314862], - [-0.38765419061835676, 39.472875845381445], - [-0.38780927299663276, 39.472610626262984], - [-0.3879534855942439, 39.472341777575494], - [-0.38808668619583303, 39.47206956468066], - [-0.38820874345993606, 39.47179425625767], - [-0.3883195370481606, 39.4715161240378], - [-0.3884189577434814, 39.47123544253617], - [-0.38850690755753947, 39.470952488780696], - [-0.38858329982683976, 39.47066754203858], - [-0.38864805929775503, 39.47038088354062], - [-0.38870112220025393, 39.4700927962035], - [-0.3887424363102825, 39.469803564350634], - [-0.38877196100074, 39.46951347343143], - [-0.388789667281001, 39.46922280973952], - [-0.3887955378249465, 39.46893186013026], - [-0.3887895669874796, 39.468640911737566], - [-0.3887717608095098, 39.46835025169056], - [-0.38874213701140675, 39.468060166830185], - [-0.3887007249749286, 39.4677709434262], - [-0.3886475657136467, 39.467482866894656], - [-0.38858271183189924, 39.4671962215163], - [-0.38850622747231395, 39.466911290156084], - [-0.38841818825195645, 39.466628353984056], - [-0.3883186811871674, 39.46634769219805], - [-0.3882078046071668, 39.46606958174816], - [-0.38808566805651024, 39.46579429706359], - [-0.3879523921864982, 39.46552210978195], - [-0.3878081086356445, 39.465253288481314], - [-0.3876529598993267, 39.46498809841532], - [-0.38748709918874596, 39.46472680125153], - [-0.3873106902793395, 39.46446965481341], - [-0.3871239073487953, 39.46421691282605], - [-0.3869269348048313, 39.463968824665955], - [-0.38671996710290896, 39.46372563511508], - [-0.38650320855406456, 39.4634875841196], - [-0.38627687312304604, 39.46325490655315], - [-0.3860411842169583, 39.46302783198539], - [-0.385796374464624, 39.46280658445557], - [-0.38554268548688025, 39.46259138225168], - [-0.3852803676580363, 39.4623824376953], - [-0.38500967985873014, 39.46217995693217], - [-0.3847308892204265, 39.461984139729104], - [-0.38444427086180893, 39.46179517927701], - [-0.384150107617327, 39.461613262000434], - [-0.3838486897581641, 39.46143856737385], - [-0.3835403147059036, 39.46127126774477], - [-0.38322528673917305, 39.46111152816379], - [-0.38290391669355667, 39.460959506222025], - [-0.3825765216550707, 39.46081535189573], - [-0.38224342464750477, 39.46067920739854], - [-0.38190495431393345, 39.460551207041206], - [-0.38156144459271557, 39.4604314770994], - [-0.3812132343882961, 39.46032013568912], - [-0.3808606672371355, 39.46021729265042], - [-0.3805040909690952, 39.460123049439055], - [-0.3801438573646105, 39.4600374990266], - [-0.3797803218079887, 39.459960725808756], - [-0.37941384293717195, 39.4598928055223], - [-0.37904478229030875, 39.459833805170334], - [-0.378673503949481, 39.459783782956336], - [-0.3783003741819366, 39.45974278822677], - [-0.37792576107917863, 39.45971086142252], - [-0.37755003419426536, 39.459688034039], - [-0.3771735641776775, 39.4596743285951], - [-0.3767967224121093, 39.45966975861106], - [-0.37641988064654114, 39.4596743285951], - [-0.37604341062995333, 39.459688034039], - [-0.37566768374504006, 39.45971086142252], - [-0.37529307064228207, 39.45974278822677], - [-0.3749199408747377, 39.459783782956336], - [-0.37454866253391006, 39.459833805170334], - [-0.37417960188704674, 39.4598928055223], - [-0.37381312301623, 39.459960725808756], - [-0.3734495874596082, 39.4600374990266], - [-0.3730893538551235, 39.460123049439055], - [-0.37273277758708323, 39.46021729265042], - [-0.3723802104359226, 39.46032013568912], - [-0.37203200023150307, 39.4604314770994], - [-0.37168849051028524, 39.460551207041206], - [-0.3713500201767139, 39.46067920739854], - [-0.3710169231691479, 39.46081535189573], - [-0.37068952813066197, 39.460959506222025], - [-0.37036815808504564, 39.46111152816379], - [-0.3700531301183151, 39.46127126774477], - [-0.36974475506605464, 39.46143856737385], - [-0.3694433372068917, 39.461613262000434], - [-0.36914917396240976, 39.46179517927701], - [-0.3688625556037922, 39.461984139729104], - [-0.36858376496548856, 39.46217995693217], - [-0.3683130771661824, 39.4623824376953], - [-0.36805075933733844, 39.46259138225168], - [-0.3677970703595947, 39.46280658445557], - [-0.3675522606072604, 39.46302783198539], - [-0.36731657170117266, 39.46325490655315], - [-0.3670902362701542, 39.4634875841196], - [-0.36687347772130974, 39.46372563511508], - [-0.36666651001938744, 39.463968824665955], - [-0.36646953747542343, 39.46421691282605], - [-0.3662827545448792, 39.46446965481341], - [-0.36610634563547273, 39.46472680125153], - [-0.36594048492489195, 39.46498809841532], - [-0.3657853361885742, 39.465253288481314], - [-0.3656410526377205, 39.46552210978195], - [-0.3655077767677084, 39.46579429706359], - [-0.36538564021705194, 39.46606958174816], - [-0.3652747636370513, 39.46634769219805], - [-0.3651752565722623, 39.466628353984056], - [-0.36508721735190475, 39.466911290156084], - [-0.36501073299231945, 39.4671962215163], - [-0.36494587911057197, 39.467482866894656], - [-0.3648927198492901, 39.4677709434262], - [-0.36485130781281194, 39.468060166830185], - [-0.36482168401470894, 39.46835025169056], - [-0.3648038778367391, 39.468640911737566], - [-0.36479790699927217, 39.46893186013026], - [-0.3648037775432177, 39.46922280973952], - [-0.36482148382347873, 39.46951347343143], - [-0.36485100851393615, 39.469803564350634], - [-0.3648923226239647, 39.4700927962035], - [-0.36494538552646366, 39.47038088354062], - [-0.36501014499737894, 39.47066754203858], - [-0.3650865372666792, 39.470952488780696], - [-0.36517448708073735, 39.47123544253617], - [-0.3652739077760581, 39.4715161240378], - [-0.36538470136428264, 39.47179425625767], - [-0.36550675862838566, 39.47206956468066], - [-0.3656399592299747, 39.472341777575494], - [-0.36578417182758594, 39.472610626262984], - [-0.36593925420586193, 39.472875845381445], - [-0.36610505341548627, 39.47313717314862], - [-0.366281405923738, 39.47339435162029], - [-0.3664681377755187, 39.47364712694494], - [-0.366665064764695, 39.47389524961451], - [-0.3668719926155894, 39.47413847471082], - [-0.36708871717443964, 39.474376562147434], - [-0.36731502461064036, 39.474609276906904], - [-0.3675506916275698, 39.47483638927277], - [-0.3677954856827917, 39.475057675056625], - [-0.36804916521741843, 39.4752729158195], - [-0.3683114798944083, 39.475481899087654], - [-0.3685821708455624, 39.475684418562544], - [-0.36886097092697706, 39.47588027432459], - [-0.3691476049827011, 39.476069273030724], - [-0.36944179011633577, 39.476251228105404], - [-0.36974323597031106, 39.476425959925], - [-0.3700516450125611, 39.47659329599524], - [-0.3703667128303153, 39.47675307112165], - [-0.3706881284307158, 39.47690512757287], - [-0.3710155745479622, 39.47704931523645], - [-0.37134872795668067, 39.47718549176721], - [-0.37168725979120687, 39.47731352272793], - [-0.3720308358704657, 39.477433281722206], - [-0.3723791170281277, 39.47754465051934], - [-0.3727317594477121, 39.477647519171235], - [-0.37308841500230744, 39.47774178612103], - [-0.37344873159857056, 39.47782735830347], - [-0.3738123535246635, 39.47790415123693], - [-0.37417892180178336, 39.47797208910683], - [-0.37454807453893585, 39.47803110484069], - [-0.37491944729060045, 39.478081140174304], - [-0.3752926734169329, 39.47812214570944], - [-0.37566738444614617, 39.47815408096256], - [-0.37604321043871086, 39.47817691440493], - [-0.37641978035301354, 39.47819062349373], - [-0.3767967224121093, 39.47819519469433] + [-0.3767967224121093, 39.47792027425889], + [-0.3771624752655126, 39.477915838750505], + [-0.3775278670252035, 39.47790253660436], + [-0.3778925369543775, 39.477880380953145], + [-0.37825612502969186, 39.47784939367026], + [-0.3786182722971102, 39.47780960534819], + [-0.3789786212266862, 39.47776105526827], + [-0.3793368160659328, 39.477703791361854], + [-0.3796925031914264, 39.477637870162965], + [-0.38004533145829766, 39.47756335675235], + [-0.38039495254726097, 39.47748032469325], + [-0.3807410213088388, 39.47738885595864], + [-0.3810831961044393, 39.47728904085019], + [-0.38142113914394893, 39.477180977909086], + [-0.3817545168195042, 39.47706477381856], + [-0.382083000035113, 39.47694054329855], + [-0.3824062645317976, 39.47680840899221], + [-0.3827239912079377, 39.4766685013448], + [-0.38303586643449467, 39.47652095847477], + [-0.38334158236480737, 39.47636592603721], + [-0.38364083723864917, 39.476203557079955], + [-0.3839333356802484, 39.47603401189237], + [-0.3842187889899756, 39.475857457846914], + [-0.384496915429408, 39.475674069233804], + [-0.3847674404994925, 39.475484027088775], + [-0.3850300972115282, 39.47528751901423], + [-0.3852846263507043, 39.47508473899386], + [-0.38553077673193015, 39.474875887201], + [-0.38576830544770735, 39.47466116980091], + [-0.3859969781077976, 39.47444079874704], + [-0.38621656907045027, 39.47421499157169], + [-0.38642686166496354, 39.47398397117111], + [-0.386627648405357, 39.47374796558531], + [-0.38681873119494825, 39.47350720777287], + [-0.3869999215216302, 39.47326193538074], + [-0.38717104064365965, 39.47301239050961], + [-0.38733191976577114, 39.47275881947478], + [-0.3874824002054476, 39.47250147256287], + [-0.38762233354918196, 39.4722406037847], + [-0.3877515817985777, 39.4719764706244], + [-0.3878700175061461, 39.47170933378517], + [-0.38797752390066703, 39.471439456931904], + [-0.38807399500199163, 39.4711671064308], + [-0.3881593357251753, 39.470892551086365], + [-0.3882334619738392, 39.470616061876036], + [-0.3882963007226719, 39.47033791168274], + [-0.3883477900889894, 39.47005837502537], + [-0.3883878793932865, 39.4697777277879], + [-0.38841652920872133, 39.469496246947024], + [-0.38843371139948607, 39.46921421029877], + [-0.388439409148029, 39.468931896184316], + [-0.3884336169711014, 39.468649583215274], + [-0.38841634072461756, 39.46836754999878], + [-0.38838759759732433, 39.46808607486242], + [-0.3883474160932887, 39.46780543557975], + [-0.38829583600322265, 39.46752590909604], + [-0.3882329083646765, 39.46724777125512], + [-0.38815869541114156, 39.46697129652716], + [-0.3880732705101136, 39.46669675773789], + [-0.38797671809018286, 39.46642442579944], + [-0.38786913355722147, 39.466154569443056], + [-0.38775062319975484, 39.46588745495404], + [-0.3876213040836124, 39.46562334590907], + [-0.3874813039359612, 39.465362502916186], + [-0.3873307610188425, 39.46510518335776], + [-0.38716982399233335, 39.46485164113664], + [-0.38699865176747295, 39.46460212642576], + [-0.3868174133490992, 39.46435688542136], + [-0.3866262876687516, 39.464116160100275], + [-0.3864254634078073, 39.46388018798123], + [-0.3862151388110252, 39.46364920189072], + [-0.38599552149068406, 39.46342342973334], + [-0.3857668282215075, 39.463203094267165], + [-0.38552928472658077, 39.462988412884016], + [-0.38528312545446874, 39.46277959739524], + [-0.38502859334775835, 39.46257685382277], + [-0.3847659396032515, 39.46238038219614], + [-0.3844954234240478, 39.462190376355174], + [-0.3842173117637596, 39.462007023759014], + [-0.3839318790631139, 39.46183050530124], + [-0.38363940697919835, 39.461660995131645], + [-0.3833401841076213, 39.46149866048446], + [-0.3830345056978558, 39.461343661513645], + [-0.3827226733620519, 39.46119615113497], + [-0.3824049947776009, 39.46105627487531], + [-0.3820817833837452, 39.46092417072921], + [-0.38175335807253274, 39.46079996902291], + [-0.381420042874419, 39.46068379228587], + [-0.38108216663882616, 39.46057575513005], + [-0.3807400627099731, 39.46047596413694], + [-0.3803940685982949, 39.46038451775254], + [-0.3800445256477741, 39.46030150619032], + [-0.37969177869951154, 39.46022701134236], + [-0.37933617575186546, 39.46016110669864], + [-0.37897806761749375, 39.46010385727459], + [-0.37861780757763525, 39.46005531954705], + [-0.37825575103397013, 39.46001554139865], + [-0.3778922551583994, 39.45998456207056], + [-0.377527678541089, 39.459962412123865], + [-0.37716238083712245, 39.45994911340946], + [-0.3767967224121093, 39.459944679046494], + [-0.37643106398709625, 39.45994911340946], + [-0.37606576628312965, 39.459962412123865], + [-0.3757011896658193, 39.45998456207056], + [-0.37533769379024856, 39.46001554139865], + [-0.3749756372465834, 39.46005531954705], + [-0.37461537720672494, 39.46010385727459], + [-0.37425726907235324, 39.46016110669864], + [-0.37390166612470715, 39.46022701134236], + [-0.3735489191764446, 39.46030150619032], + [-0.37319937622592386, 39.46038451775254], + [-0.37285338211424557, 39.46047596413694], + [-0.37251127818539254, 39.46057575513005], + [-0.3721734019497997, 39.46068379228587], + [-0.37184008675168595, 39.46079996902291], + [-0.3715116614404735, 39.46092417072921], + [-0.37118845004661777, 39.46105627487531], + [-0.3708707714621668, 39.46119615113497], + [-0.3705589391263629, 39.461343661513645], + [-0.3702532607165974, 39.46149866048446], + [-0.36995403784502034, 39.461660995131645], + [-0.3696615657611048, 39.46183050530124], + [-0.3693761330604591, 39.462007023759014], + [-0.3690980214001709, 39.462190376355174], + [-0.3688275052209672, 39.46238038219614], + [-0.36856485147646034, 39.46257685382277], + [-0.36831031936974995, 39.46277959739524], + [-0.3680641600976379, 39.462988412884016], + [-0.3678266166027112, 39.463203094267165], + [-0.36759792333353475, 39.46342342973334], + [-0.36737830601319343, 39.46364920189072], + [-0.3671679814164114, 39.46388018798123], + [-0.36696715715546707, 39.464116160100275], + [-0.36677603147511945, 39.46435688542136], + [-0.3665947930567457, 39.46460212642576], + [-0.36642362083188534, 39.46485164113664], + [-0.36626268380537613, 39.46510518335776], + [-0.36611214088825744, 39.465362502916186], + [-0.3659721407406063, 39.46562334590907], + [-0.3658428216244638, 39.46588745495404], + [-0.3657243112669972, 39.466154569443056], + [-0.36561672673403584, 39.46642442579944], + [-0.3655201743141051, 39.46669675773789], + [-0.36543474941307713, 39.46697129652716], + [-0.3653605364595422, 39.46724777125512], + [-0.36529760882099604, 39.46752590909604], + [-0.36524602873093, 39.46780543557975], + [-0.36520584722689436, 39.46808607486242], + [-0.36517710409960114, 39.46836754999878], + [-0.3651598278531173, 39.468649583215274], + [-0.3651540356761897, 39.468931896184316], + [-0.3651597334247326, 39.46921421029877], + [-0.3651769156154974, 39.469496246947024], + [-0.3652055654309322, 39.4697777277879], + [-0.36524565473522935, 39.47005837502537], + [-0.3652971441015468, 39.47033791168274], + [-0.3653599828503795, 39.470616061876036], + [-0.3654341090990434, 39.470892551086365], + [-0.365519449822227, 39.4711671064308], + [-0.36561592092355166, 39.471439456931904], + [-0.3657234273180726, 39.47170933378517], + [-0.365841863025641, 39.4719764706244], + [-0.36597111127503673, 39.4722406037847], + [-0.3661110446187711, 39.47250147256287], + [-0.36626152505844756, 39.47275881947478], + [-0.36642240418055905, 39.47301239050961], + [-0.3665935233025885, 39.47326193538074], + [-0.3667747136292705, 39.47350720777287], + [-0.36696579641886173, 39.47374796558531], + [-0.36716658315925516, 39.47398397117111], + [-0.3673768757537684, 39.47421499157169], + [-0.3675964667164211, 39.47444079874704], + [-0.3678251393765113, 39.47466116980091], + [-0.36806266809228855, 39.474875887201], + [-0.36830881847351443, 39.47508473899386], + [-0.3685633476126905, 39.47528751901423], + [-0.3688260043247262, 39.475484027088775], + [-0.3690965293948107, 39.475674069233804], + [-0.36937465583424317, 39.475857457846914], + [-0.3696601091439703, 39.47603401189237], + [-0.3699526075855695, 39.476203557079955], + [-0.37025186245941133, 39.47636592603721], + [-0.370557578389724, 39.47652095847477], + [-0.370869453616281, 39.4766685013448], + [-0.37118718029242104, 39.47680840899221], + [-0.3715104447891057, 39.47694054329855], + [-0.3718389280047145, 39.47706477381856], + [-0.37217230568026977, 39.477180977909086], + [-0.37251024871977945, 39.47728904085019], + [-0.3728524235153799, 39.47738885595864], + [-0.3731984922769577, 39.47748032469325], + [-0.37354811336592103, 39.47756335675235], + [-0.3739009416327923, 39.477637870162965], + [-0.3742566287582859, 39.477703791361854], + [-0.3746148235975325, 39.47776105526827], + [-0.3749751725271085, 39.47780960534819], + [-0.3753373197945268, 39.47784939367026], + [-0.3757009078698411, 39.477880380953145], + [-0.37606557779901517, 39.47790253660436], + [-0.3764309695587061, 39.477915838750505], + [-0.3767967224121093, 39.47792027425889] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/city-line2.geojson b/packages/turf-point-to-line-distance/test/out/city-line2.geojson index d6722db797..5cc3a0cbfd 100644 --- a/packages/turf-point-to-line-distance/test/out/city-line2.geojson +++ b/packages/turf-point-to-line-distance/test/out/city-line2.geojson @@ -30,207 +30,207 @@ "type": "Polygon", "coordinates": [ [ - [-3.592529296875, 40.606347761734895], - [-3.593875714048617, 40.6063316959338], - [-3.5952208005314175, 40.60628351440868], - [-3.596563226953486, 40.606203264778266], - [-3.59790166658538, 40.60609102635459], - [-3.5992347966550295, 40.60594691006426], - [-3.6005612996606433, 40.60577105833835], - [-3.601879864678295, 40.605563644970985], - [-3.6031891886628626, 40.605324874946945], - [-3.60448797774102, 40.60505498423808], - [-3.6057749484949686, 40.60475423956921], - [-3.607048829235617, 40.604422938153355], - [-3.608308361263925, 40.60406140739681], - [-3.609552300119147, 40.60367000457425], - [-3.610779416812714, 40.60324911647421], - [-3.6119884990465088, 40.602799159015305], - [-3.6131783524143297, 40.60232057683355], - [-3.614347801585316, 40.60181384284133], - [-3.6154956914681518, 40.60127945775823], - [-3.6166208883549005, 40.60071794961438], - [-3.6177222810433047, 40.600129873226756], - [-3.618798781936438, 40.599515809648985], - [-3.6198493281186166, 40.598876365595174], - [-3.6208728824064873, 40.59821217283832], - [-3.6218684343742598, 40.59752388758407], - [-3.6228350013520543, 40.59681218982013], - [-3.6237716293963786, 40.59607778264242], - [-3.624677394231779, 40.595321391558194], - [-3.625551402162719, 40.594543763767234], - [-3.6263927909548133, 40.593745667421494], - [-3.627200730684522, 40.59292789086416], - [-3.627974424556494, 40.59209124184884], - [-3.6287131096877423, 40.591236546739616], - [-3.629416057857906, 40.59036464969275], - [-3.6300825762248405, 40.589476411820975], - [-3.6307120080048785, 40.58857271034108], - [-3.6313037331170657, 40.58765443770573], - [-3.6318571687907846, 40.58672250072024], - [-3.632371770136161, 40.5857778196455], - [-3.6328470306767215, 40.584821327287486], - [-3.6332824828437884, 40.58385396807475], - [-3.6336776984321566, 40.5828766971244], - [-3.6340322890166097, 40.58189047929774], - [-3.6343459063289054, 40.5808962882465], - [-3.6346182425948723, 40.57989510545045], - [-3.6348490308313117, 40.57888791924746], - [-3.6350380451024478, 40.57787572385702], - [-3.635185100735687, 40.5768595183981], - [-3.6352900544965174, 40.57584030590231], - [-3.635352804722391, 40.574819092323395], - [-3.635373291415493, 40.57379688554409], - [-3.6353514962943407, 40.572774694381145], - [-3.6352874428041804, 40.571753527589664], - [-3.6351811960862053, 40.57073439286771], - [-3.6350328629056725, 40.569718295862145], - [-3.6348425915389817, 40.56870623917652], - [-3.6346105716199033, 40.56769922138241], - [-3.6343370339450987, 40.56669823603468], - [-3.634022250239172, 40.565704270691974], - [-3.633666532879515, 40.56471830594328], - [-3.6332702345812344, 40.56374131444153], - [-3.632833748042504, 40.56277425994521], - [-3.6323575055507225, 40.56181809636882], - [-3.6318419785498772, 40.560873766843386], - [-3.631287677169581, 40.559942202787475], - [-3.630695149716258, 40.559024322990176], - [-3.630064982127002, 40.558121032706495], - [-3.6293977973866696, 40.557233222766264], - [-3.628694254908805, 40.556361768697414], - [-3.627955049881017, 40.55550752986447], - [-3.6271809125754633, 40.55467134862298], - [-3.626372607625168, 40.55385404949094], - [-3.625530933266844, 40.55305643833775], - [-3.6246567205510374, 40.55227930159179], - [-3.623750832520331, 40.55152340546709], - [-3.622814163356462, 40.55078949521003], - [-3.6218476374971726, 40.55007829436677], - [-3.620852208723684, 40.54939050407207], - [-3.61982885921969, 40.548726802360314], - [-3.6187785986027987, 40.54808784349918], - [-3.617702462929373, 40.547474257346835], - [-3.6166015136737477, 40.54688664873321], - [-3.6154768366828263, 40.546325596865834], - [-3.6143295411070797, 40.54579165476097], - [-3.6131607583089895, 40.545285348700524], - [-3.6119716407500033, 40.54480717771522], - [-3.610763360857085, 40.54435761309463], - [-3.6095371098699656, 40.54393709792443], - [-3.6082940966702117, 40.54354604665144], - [-3.607035546593256, 40.5431848446768], - [-3.60576270022453, 40.54285384797762], - [-3.604476812180877, 40.5425533827576], - [-3.6031791498784247, 40.54228374512693], - [-3.6018709922880996, 40.54204520081163], - [-3.6005536286799997, 40.541837984892794], - [-3.5992283573578256, 40.54166230157593], - [-3.5978964843846106, 40.54151832399055], - [-3.5965593223009527, 40.54140619402033], - [-3.5952181888370176, 40.54132602216386], - [-3.5938744056195286, 40.54127788742621], - [-3.592529296875, 40.54126183724149], - [-3.591184188130472, 40.54127788742621], - [-3.589840404912983, 40.54132602216386], - [-3.588499271449048, 40.54140619402033], - [-3.58716210936539, 40.54151832399055], - [-3.5858302363921744, 40.54166230157593], - [-3.5845049650700003, 40.541837984892794], - [-3.5831876014619004, 40.54204520081163], - [-3.5818794438715758, 40.54228374512693], - [-3.580581781569123, 40.5425533827576], - [-3.57929589352547, 40.54285384797762], - [-3.578023047156744, 40.5431848446768], - [-3.5767644970797883, 40.54354604665144], - [-3.5755214838800353, 40.54393709792443], - [-3.5742952328929154, 40.54435761309463], - [-3.573086952999997, 40.54480717771522], - [-3.5718978354410105, 40.545285348700524], - [-3.5707290526429207, 40.54579165476097], - [-3.569581757067174, 40.546325596865834], - [-3.5684570800762527, 40.54688664873321], - [-3.5673561308206265, 40.547474257346835], - [-3.5662799951472013, 40.54808784349918], - [-3.5652297345303103, 40.548726802360314], - [-3.564206385026317, 40.54939050407207], - [-3.563210956252828, 40.55007829436677], - [-3.562244430393538, 40.55078949521003], - [-3.5613077612296693, 40.55152340546709], - [-3.5604018731989635, 40.55227930159179], - [-3.5595276604831563, 40.55305643833775], - [-3.5586859861248326, 40.55385404949094], - [-3.557877681174536, 40.55467134862298], - [-3.5571035438689838, 40.55550752986447], - [-3.556364338841195, 40.556361768697414], - [-3.555660796363331, 40.557233222766264], - [-3.554993611622999, 40.558121032706495], - [-3.554363444033742, 40.559024322990176], - [-3.5537709165804197, 40.559942202787475], - [-3.5532166152001237, 40.560873766843386], - [-3.5527010881992784, 40.56181809636882], - [-3.552224845707496, 40.56277425994521], - [-3.551788359168766, 40.56374131444153], - [-3.551392060870485, 40.56471830594328], - [-3.5510363435108285, 40.565704270691974], - [-3.550721559804902, 40.56669823603468], - [-3.5504480221300967, 40.56769922138241], - [-3.5502160022110187, 40.56870623917652], - [-3.5500257308443284, 40.569718295862145], - [-3.5498773976637947, 40.57073439286771], - [-3.5497711509458205, 40.571753527589664], - [-3.549707097455659, 40.572774694381145], - [-3.549685302334507, 40.57379688554409], - [-3.5497057890276094, 40.574819092323395], - [-3.5497685392534826, 40.57584030590231], - [-3.5498734930143137, 40.5768595183981], - [-3.5500205486475527, 40.57787572385702], - [-3.5502095629186883, 40.57888791924746], - [-3.550440351155128, 40.57989510545045], - [-3.550712687421095, 40.5808962882465], - [-3.551026304733391, 40.58189047929774], - [-3.5513808953178443, 40.5828766971244], - [-3.5517761109062116, 40.58385396807475], - [-3.552211563073279, 40.584821327287486], - [-3.552686823613839, 40.5857778196455], - [-3.553201424959215, 40.58672250072024], - [-3.5537548606329343, 40.58765443770573], - [-3.554346585745122, 40.58857271034108], - [-3.5549760175251595, 40.589476411820975], - [-3.5556425358920944, 40.59036464969275], - [-3.5563454840622577, 40.591236546739616], - [-3.557084169193507, 40.59209124184884], - [-3.557857863065478, 40.59292789086416], - [-3.558665802795187, 40.593745667421494], - [-3.559507191587281, 40.594543763767234], - [-3.5603811995182215, 40.595321391558194], - [-3.5612869643536205, 40.59607778264242], - [-3.5622235923979457, 40.59681218982013], - [-3.5631901593757402, 40.59752388758407], - [-3.5641857113435123, 40.59821217283832], - [-3.565209265631383, 40.598876365595174], - [-3.5662598118135618, 40.599515809648985], - [-3.5673363127066957, 40.600129873226756], - [-3.5684377053951, 40.60071794961438], - [-3.569562902281849, 40.60127945775823], - [-3.5707107921646846, 40.60181384284133], - [-3.57188024133567, 40.60232057683355], - [-3.573070094703492, 40.602799159015305], - [-3.574279176937287, 40.60324911647421], - [-3.575506293630853, 40.60367000457425], - [-3.576750232486075, 40.60406140739681], - [-3.5780097645143836, 40.604422938153355], - [-3.579283645255032, 40.60475423956921], - [-3.5805706160089805, 40.60505498423808], - [-3.5818694050871374, 40.605324874946945], - [-3.5831787290717054, 40.605563644970985], - [-3.5844972940893567, 40.60577105833835], - [-3.585823797094971, 40.60594691006426], - [-3.58715692716462, 40.60609102635459], - [-3.5884953667965145, 40.606203264778266], - [-3.589837793218583, 40.60628351440868], - [-3.591182879701383, 40.6063316959338], - [-3.592529296875, 40.606347761734895] + [-3.592529296875, 40.60602538523366], + [-3.5938623697696777, 40.60600947866], + [-3.5951941251810005, 40.6059617746596], + [-3.5965232469333337, 40.60588232037856], + [-3.597848421465152, 40.605771194341706], + [-3.599168339132803, 40.60562850637471], + [-3.6004816955103065, 40.605454397494974], + [-3.6017871926838874, 40.60524903977175], + [-3.60308354053994, 40.60501263615534], + [-3.604369458045117, 40.60474542027563], + [-3.605643674517246, 40.60444765621031], + [-3.6069049308858205, 40.604119638222734], + [-3.6081519809407654, 40.60376169046993], + [-3.6093835925682267, 40.60337416668096], + [-3.6105985489721646, 40.60295744980593], + [-3.6117956498804844, 40.60251195163606], + [-3.6129737127345343, 40.602038112395086], + [-3.614131573860742, 40.60153640030268], + [-3.615268089623238, 40.60100731110987], + [-3.6163821375562972, 40.600451367607434], + [-3.6174726174754857, 40.599869119107396], + [-3.618538452566372, 40.599261140898285], + [-3.6195785904497506, 40.598628033674714], + [-3.6205920042222894, 40.59797042294182], + [-3.621577693471587, 40.59728895839522], + [-3.622534685264609, 40.596584313276956], + [-3.623462035108548, 40.595857183708304], + [-3.624358827883139, 40.5951082879999], + [-3.625224178743516, 40.59433836594002], + [-3.6260572339927157, 40.59354817806165], + [-3.62685717192298, 40.59273850488912], + [-3.62762320362502, 40.59191014616502], + [-3.6283545737644536, 40.59106392005826], + [-3.6290505613246657, 40.59020066235392], + [-3.62971048031536, 40.58932122562581], + [-3.6303336804461157, 40.58842647839257], + [-3.6309195477642993, 40.587517304258114], + [-3.631467505256723, 40.58659460103716], + [-3.6319770134144673, 40.585659279867144], + [-3.6324475707603225, 40.58471226430669], + [-3.6328787143383634, 40.58375448942232], + [-3.63327002016518, 40.58278690086369], + [-3.6336211036423567, 40.58181045392862], + [-3.633931619929799, 40.5808261126188], + [-3.6342012642795796, 40.57983484868691], + [-3.6344297723299905, 40.57883764067638], + [-3.6346169203595404, 40.57783547295455], + [-3.6347625255006792, 40.57682933474024], + [-3.63486644591305, 40.5758202191268], + [-3.634928580916153, 40.574809122101335], + [-3.634948871081288, 40.5737970415614], + [-3.634927298282747, 40.57278497632995], + [-3.634863885708202, 40.57177392516953], + [-3.634758697828335, 40.57076488579669], + [-3.634611840325757, 40.56975885389766], + [-3.634423459983317, 40.568756822146185], + [-3.634193744531938, 40.56775977922449], + [-3.633922922458165, 40.56676870884838], + [-3.633611262771641, 40.56578458879742], + [-3.633259074732764, 40.56480838995108], + [-3.6328667075408254, 40.56384107533194], + [-3.632434549982963, 40.562883599156734], + [-3.6319630300442993, 40.56193690589624], + [-3.6314526144796724, 40.561001929345], + [-3.6309038083474134, 40.560079591701616], + [-3.6303171545056356, 40.55917080266072], + [-3.6296932330715803, 40.55827645851727], + [-3.629032660844533, 40.55739744128436], + [-3.6283360906929456, 40.55653461782507], + [-3.6276042109063398, 40.555688838999465], + [-3.626837744512681, 40.554860938827396], + [-3.6260374485618803, 40.554051733668075], + [-3.625204113376179, 40.55326202141707], + [-3.624338561768121, 40.552492580721626], + [-3.623441648226934, 40.551744170214995], + [-3.6225142580741014, 40.55101752777059], + [-3.621557306588975, 40.55031336977659], + [-3.6205717381052898, 40.5496323904318], + [-3.6195585250794804, 40.548975261063426], + [-3.6185186671316982, 40.54834262946732], + [-3.6174531900605027, 40.54773511927155], + [-3.6163631448321643, 40.547153329323706], + [-3.615249606545591, 40.54659783310261], + [-3.6141136733738826, 40.54606917815507], + [-3.612956465483545, 40.545567885558086], + [-3.6117791239324273, 40.54509444940715], + [-3.6105828095474526, 40.544649336331084], + [-3.6093687017832257, 40.54423298503387], + [-3.608137997562646, 40.543845805863945], + [-3.6068919101006354, 40.543488180411345], + [-3.6056316677121316, 40.543160461133176], + [-3.6043585126054922, 40.542862971007594], + [-3.6030736996624992, 40.54259600321684], + [-3.601778495206115, 40.54235982085949], + [-3.600474175757211, 40.54215465669224], + [-3.5991620267814475, 40.541980712901506], + [-3.5978433414275304, 40.541838160905], + [-3.596519419258057, 40.54172714118353], + [-3.5951915649741717, 40.541647763143175], + [-3.5938610871352736, 40.54160010500787], + [-3.592529296875, 40.541584213742716], + [-3.591197506614727, 40.54160010500787], + [-3.589867028775829, 40.541647763143175], + [-3.5885391744919435, 40.54172714118353], + [-3.58721525232247, 40.541838160905], + [-3.585896566968553, 40.541980712901506], + [-3.5845844179927893, 40.54215465669224], + [-3.5832800985438857, 40.54235982085949], + [-3.5819848940875008, 40.54259600321684], + [-3.5807000811445078, 40.542862971007594], + [-3.5794269260378693, 40.543160461133176], + [-3.5781666836493646, 40.543488180411345], + [-3.576920596187354, 40.543845805863945], + [-3.5756898919667752, 40.54423298503387], + [-3.574475784202548, 40.544649336331084], + [-3.5732794698175727, 40.54509444940715], + [-3.572102128266455, 40.545567885558086], + [-3.570944920376118, 40.54606917815507], + [-3.569808987204409, 40.54659783310261], + [-3.5686954489178366, 40.547153329323706], + [-3.5676054036894977, 40.54773511927155], + [-3.566539926618302, 40.54834262946732], + [-3.56550006867052, 40.548975261063426], + [-3.5644868556447102, 40.5496323904318], + [-3.563501287161025, 40.55031336977659], + [-3.5625443356758986, 40.55101752777059], + [-3.561616945523066, 40.551744170214995], + [-3.5607200319818793, 40.552492580721626], + [-3.5598544803738212, 40.55326202141707], + [-3.5590211451881197, 40.554051733668075], + [-3.5582208492373204, 40.554860938827396], + [-3.5574543828436602, 40.555688838999465], + [-3.5567225030570553, 40.55653461782507], + [-3.556025932905467, 40.55739744128436], + [-3.55536536067842, 40.55827645851727], + [-3.5547414392443635, 40.55917080266072], + [-3.5541547854025874, 40.560079591701616], + [-3.553605979270328, 40.561001929345], + [-3.5530955637057016, 40.56193690589624], + [-3.5526240437670373, 40.562883599156734], + [-3.5521918862091746, 40.56384107533194], + [-3.551799519017236, 40.56480838995108], + [-3.551447330978359, 40.56578458879742], + [-3.551135671291835, 40.56676870884838], + [-3.550864849218062, 40.56775977922449], + [-3.5506351337666824, 40.568756822146185], + [-3.5504467534242425, 40.56975885389766], + [-3.550299895921665, 40.57076488579669], + [-3.5501947080417984, 40.57177392516953], + [-3.550131295467253, 40.57278497632995], + [-3.550109722668712, 40.5737970415614], + [-3.5501300128338475, 40.574809122101335], + [-3.55019214783695, 40.5758202191268], + [-3.550296068249321, 40.57682933474024], + [-3.55044167339046, 40.57783547295455], + [-3.55062882142001, 40.57883764067638], + [-3.550857329470421, 40.57983484868691], + [-3.551126973820201, 40.5808261126188], + [-3.5514374901076438, 40.58181045392862], + [-3.55178857358482, 40.58278690086369], + [-3.5521798794116375, 40.58375448942232], + [-3.5526110229896775, 40.58471226430669], + [-3.5530815803355327, 40.585659279867144], + [-3.5535910884932775, 40.58659460103716], + [-3.554139045985701, 40.587517304258114], + [-3.5547249133038847, 40.58842647839257], + [-3.5553481134346394, 40.58932122562581], + [-3.5560080324253343, 40.59020066235392], + [-3.556704019985547, 40.59106392005826], + [-3.5574353901249807, 40.59191014616502], + [-3.55820142182702, 40.59273850488912], + [-3.5590013597572843, 40.59354817806165], + [-3.5598344150064842, 40.59433836594002], + [-3.5606997658668607, 40.5951082879999], + [-3.561596558641452, 40.595857183708304], + [-3.5625239084853915, 40.596584313276956], + [-3.5634809002784134, 40.59728895839522], + [-3.5644665895277106, 40.59797042294182], + [-3.5654800033002503, 40.598628033674714], + [-3.566520141183629, 40.599261140898285], + [-3.567585976274515, 40.599869119107396], + [-3.5686764561937028, 40.600451367607434], + [-3.5697905041267624, 40.60100731110987], + [-3.570927019889258, 40.60153640030268], + [-3.572084881015466, 40.602038112395086], + [-3.573262943869516, 40.60251195163606], + [-3.574460044777836, 40.60295744980593], + [-3.5756750011817733, 40.60337416668096], + [-3.576906612809235, 40.60376169046993], + [-3.5781536628641795, 40.604119638222734], + [-3.5794149192327547, 40.60444765621031], + [-3.580689135704884, 40.60474542027563], + [-3.58197505321006, 40.60501263615534], + [-3.583271401066113, 40.60524903977175], + [-3.584576898239694, 40.605454397494974], + [-3.585890254617197, 40.60562850637471], + [-3.5872101722848484, 40.605771194341706], + [-3.5885353468166667, 40.60588232037856], + [-3.589864468568999, 40.6059617746596], + [-3.591196223980323, 40.60600947866], + [-3.592529296875, 40.60602538523366] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/city-segment-inside1.geojson b/packages/turf-point-to-line-distance/test/out/city-segment-inside1.geojson index 62cd1e3f8e..3bf8fd81c7 100644 --- a/packages/turf-point-to-line-distance/test/out/city-segment-inside1.geojson +++ b/packages/turf-point-to-line-distance/test/out/city-segment-inside1.geojson @@ -30,207 +30,207 @@ "type": "Polygon", "coordinates": [ [ - [-6.0047149658203125, 37.38173807898709], - [-6.005372299073763, 37.381729871871954], - [-6.0060289831874485, 37.38170525863135], - [-6.006684369663929, 37.381664263571714], - [-6.007337811289779, 37.381606927177074], - [-6.007988662775988, 37.381533306068896], - [-6.008636281396446, 37.38144347295018], - [-6.009280027623878, 37.381337516533456], - [-6.009919265762576, 37.38121554145301], - [-6.010553364577327, 37.38107766816137], - [-6.011181697917877, 37.38092403281011], - [-6.011803645338334, 37.38075478711514], - [-6.012418592710884, 37.380570098206626], - [-6.013025932833204, 37.38037014846361], - [-6.01362506602898, 37.38015513533359], - [-6.014215400740913, 37.379925271137154], - [-6.014796354115646, 37.379680782858], - [-6.015367352580006, 37.37942191191833], - [-6.01592783240802, 37.37914891394006], - [-6.016477240278099, 37.378862058492], - [-6.017015033819875, 37.37856162882315], - [-6.017540682150134, 37.37824792158262], - [-6.018053666397305, 37.37792124652619], - [-6.018553480213996, 37.377581926209984], - [-6.019039630277075, 37.37723029567146], - [-6.019511636774775, 37.376866702098155], - [-6.019969033880372, 37.37649150448433], - [-6.020411370211957, 37.376105073276015], - [-6.020838209277829, 37.37570779000477], - [-6.0212491299071065, 37.375300046910475], - [-6.021643726665097, 37.37488224655357], - [-6.022021610253042, 37.374454801417066], - [-6.022382407891826, 37.37401813349895], - [-6.022725763689293, 37.37357267389495], - [-6.023051338990778, 37.37311886237256], - [-6.023358812712556, 37.37265714693638], - [-6.023647881657835, 37.372187983385494], - [-6.023918260815019, 37.371711834862985], - [-6.024169683637928, 37.37122917139844], - [-6.02440190230773, 37.37074046944349], - [-6.024614687976294, 37.370246211401195], - [-6.024807830990759, 37.36974688514948], - [-6.024981141099086, 37.3692429835593], - [-6.025134447636411, 37.3687350040078], - [-6.025267599691998, 37.36822344788714], - [-6.025380466256653, 37.367708820109385], - [-6.0254729363504556, 37.36719162860793], - [-6.025544919130674, 37.36667238383603], - [-6.025596343979785, 37.36615159826285], - [-6.025627160573504, 37.36562978586756], - [-6.025637338928764, 37.365107461631986], - [-6.0256268694316155, 37.36458514103234], - [-6.025595762845011, 37.36406333953052], - [-6.025544050296487, 37.363542572065356], - [-6.025471783245746, 37.363023352544545], - [-6.025379033432198, 37.36250619333761], - [-6.0252658928025, 37.361991604770324], - [-6.0251324734181795, 37.361480094621356], - [-6.024978907343458, 37.360972167621355], - [-6.024805346513346, 37.360468324955065], - [-6.02461196258219, 37.35996906376712], - [-6.024398946752817, 37.35947487667164], - [-6.02416650958643, 37.35898625126659], - [-6.023914880793464, 37.358503669652926], - [-6.023644309005622, 37.358027607959244], - [-6.02335506152931, 37.35755853587244], - [-6.023047424080701, 37.357096916174676], - [-6.022721700502744, 37.35664320428715], - [-6.0223782124643455, 37.35619784782128], - [-6.022017299142062, 37.3557612861375], - [-6.0216393168846025, 37.35533394991231], - [-6.021244638860484, 37.35491626071383], - [-6.020833654689188, 37.35450863058642], - [-6.020406770056176, 37.35411146164468], - [-6.019964406312164, 37.35372514567726], - [-6.019507000057037, 37.353350063760956], - [-6.019035002708814, 37.35298658588516], - [-6.01854888005811, 37.35263507058755], - [-6.018049111808508, 37.35229586460085], - [-6.017536191103308, 37.35196930251131], - [-6.017010624039132, 37.35165570642923], - [-6.01647292916683, 37.35135538567169], - [-6.015923636980213, 37.351068636457974], - [-6.015363289393101, 37.350795741617844], - [-6.014792439205185, 37.35053697031305], - [-6.0142116495572635, 37.350292577772315], - [-6.013621493376353, 37.35006280503999], - [-6.013022552811227, 37.34984787873881], - [-6.012415418658964, 37.349648010846686], - [-6.011800689783007, 37.3494633984881], - [-6.011178972523371, 37.34929422373996], - [-6.010550880099531, 37.349140653452466], - [-6.009917032006593, 37.34900283908472], - [-6.009278053405322, 37.34888091655579], - [-6.008634574506658, 37.34877500611077], - [-6.007987229951285, 37.34868521220255], - [-6.007336658184867, 37.34861162338889], - [-6.0066835008295865, 37.348554312245334], - [-6.006028402052568, 37.348513335293724], - [-6.00537200793182, 37.34848873294659], - [-6.0047149658203125, 37.348480529467395], - [-6.004057923708805, 37.34848873294659], - [-6.003401529588056, 37.348513335293724], - [-6.0027464308110385, 37.348554312245334], - [-6.002093273455758, 37.34861162338889], - [-6.00144270168934, 37.34868521220255], - [-6.000795357133966, 37.34877500611077], - [-6.000151878235304, 37.34888091655579], - [-5.999512899634033, 37.34900283908472], - [-5.998879051541093, 37.349140653452466], - [-5.998250959117254, 37.34929422373996], - [-5.997629241857618, 37.3494633984881], - [-5.997014512981661, 37.349648010846686], - [-5.996407378829397, 37.34984787873881], - [-5.995808438264273, 37.35006280503999], - [-5.995218282083361, 37.350292577772315], - [-5.994637492435439, 37.35053697031305], - [-5.994066642247524, 37.350795741617844], - [-5.993506294660411, 37.351068636457974], - [-5.992957002473794, 37.35135538567169], - [-5.992419307601492, 37.35165570642923], - [-5.991893740537316, 37.35196930251131], - [-5.991380819832116, 37.35229586460085], - [-5.990881051582514, 37.35263507058755], - [-5.99039492893181, 37.35298658588516], - [-5.989922931583588, 37.353350063760956], - [-5.989465525328461, 37.35372514567726], - [-5.9890231615844485, 37.35411146164468], - [-5.988596276951436, 37.35450863058642], - [-5.98818529278014, 37.35491626071383], - [-5.987790614756022, 37.35533394991231], - [-5.987412632498562, 37.3557612861375], - [-5.9870517191762795, 37.35619784782128], - [-5.9867082311378805, 37.35664320428715], - [-5.986382507559924, 37.357096916174676], - [-5.986074870111314, 37.35755853587244], - [-5.985785622635002, 37.358027607959244], - [-5.9855150508471615, 37.358503669652926], - [-5.985263422054194, 37.35898625126659], - [-5.985030984887807, 37.35947487667164], - [-5.984817969058434, 37.35996906376712], - [-5.98462458512728, 37.360468324955065], - [-5.984451024297166, 37.360972167621355], - [-5.984297458222445, 37.361480094621356], - [-5.984164038838126, 37.361991604770324], - [-5.984050898208426, 37.36250619333761], - [-5.983958148394878, 37.363023352544545], - [-5.983885881344137, 37.363542572065356], - [-5.983834168795613, 37.36406333953052], - [-5.9838030622090095, 37.36458514103234], - [-5.98379259271186, 37.365107461631986], - [-5.98380277106712, 37.36562978586756], - [-5.983833587660839, 37.36615159826285], - [-5.98388501250995, 37.36667238383603], - [-5.9839569952901694, 37.36719162860793], - [-5.984049465383972, 37.367708820109385], - [-5.984162331948626, 37.36822344788714], - [-5.984295484004215, 37.3687350040078], - [-5.984448790541538, 37.3692429835593], - [-5.984622100649865, 37.36974688514948], - [-5.98481524366433, 37.370246211401195], - [-5.985028029332894, 37.37074046944349], - [-5.985260248002697, 37.37122917139844], - [-5.985511670825607, 37.371711834862985], - [-5.985782049982789, 37.372187983385494], - [-5.986071118928068, 37.37265714693638], - [-5.986378592649846, 37.37311886237256], - [-5.986704167951332, 37.37357267389495], - [-5.987047523748799, 37.37401813349895], - [-5.9874083213875835, 37.374454801417066], - [-5.987786204975527, 37.37488224655357], - [-5.988180801733518, 37.375300046910475], - [-5.988591722362795, 37.37570779000477], - [-5.989018561428667, 37.376105073276015], - [-5.989460897760252, 37.37649150448433], - [-5.98991829486585, 37.376866702098155], - [-5.990390301363549, 37.37723029567146], - [-5.990876451426628, 37.377581926209984], - [-5.9913762652433205, 37.37792124652619], - [-5.99188924949049, 37.37824792158262], - [-5.992414897820749, 37.37856162882315], - [-5.992952691362526, 37.378862058492], - [-5.993502099232604, 37.37914891394006], - [-5.994062579060619, 37.37942191191833], - [-5.994633577524979, 37.379680782858], - [-5.995214530899711, 37.379925271137154], - [-5.995804865611644, 37.38015513533359], - [-5.99640399880742, 37.38037014846361], - [-5.997011338929741, 37.380570098206626], - [-5.99762628630229, 37.38075478711514], - [-5.998248233722747, 37.38092403281011], - [-5.998876567063297, 37.38107766816137], - [-5.999510665878049, 37.38121554145301], - [-6.000149904016746, 37.381337516533456], - [-6.000793650244178, 37.38144347295018], - [-6.001441268864636, 37.381533306068896], - [-6.002092120350845, 37.381606927177074], - [-6.002745561976695, 37.381664263571714], - [-6.003400948453176, 37.38170525863135], - [-6.0040576325668615, 37.381729871871954], - [-6.0047149658203125, 37.38173807898709] + [-6.0047149658203125, 37.38167284314159], + [-6.005369719740231, 37.381664668230634], + [-6.006023827069253, 37.38164015157079], + [-6.006676641856281, 37.381599317373066], + [-6.007327519429171, 37.38154220596246], + [-6.007975817032622, 37.38146887373818], + [-6.008620894464146, 37.38137939311773], + [-6.00926211470749, 37.38127385246532], + [-6.009898844562894, 37.38115235600438], + [-6.010530455273525, 37.3810150237145], + [-6.011156323147495, 37.38086199121266], + [-6.011775830174828, 37.38069340961909], + [-6.012388364638748, 37.38050944540773], + [-6.012993321720721, 37.38031028024154], + [-6.01359010409859, 37.380096110792806], + [-6.014178122537265, 37.379867148548485], + [-6.014756796471341, 37.37962361960109], + [-6.015325554579076, 37.379365764424975], + [-6.015883835347175, 37.37909383763847], + [-6.016431087625788, 37.37880810775202], + [-6.0169667711731964, 37.378508856902656], + [-6.017490357189638, 37.37819638057483], + [-6.018001328839736, 37.377870987308285], + [-6.0184991817630245, 37.37753299839284], + [-6.018983424572061, 37.37718274755073], + [-6.019453579337623, 37.37682058060653], + [-6.019909182060527, 37.376446855145275], + [-6.020349783129591, 37.3760619401588], + [-6.020774947765292, 37.37566621568101], + [-6.021184256448675, 37.37526007241211], + [-6.021577305335104, 37.374843911332384], + [-6.021953706652434, 37.37441814330584], + [-6.022313089083229, 37.37398318867403], + [-6.022655098130623, 37.37353947684068], + [-6.022979396467497, 37.373087445847226], + [-6.023285664268614, 37.372627541939984], + [-6.023573599525376, 37.37216021912914], + [-6.023842918342927, 37.37168593874014], + [-6.024093355219282, 37.37120516895794], + [-6.024324663306228, 37.37071838436439], + [-6.02453661465173, 37.37022606546946], + [-6.024729000423632, 37.36972869823655], + [-6.02490163111441, 37.369226773602534], + [-6.025054336726796, 37.36872078699286], + [-6.025186966940079, 37.36821123783229], + [-6.025299391256965, 37.36769862905173], + [-6.025391499130798, 37.36718346659164], + [-6.02546320007307, 37.36666625890246], + [-6.025514423741105, 37.36614751644271], + [-6.025545120005821, 37.36562775117503], + [-6.025555258999542, 37.365107476060885], + [-6.02554483114379, 37.364587204554205], + [-6.02551384715705, 37.3640674500947], + [-6.025462338042505, 37.36354872560115], + [-6.0253903550557615, 37.36303154296533], + [-6.025297969652599, 37.36251641254685], + [-6.025185273416803, 37.36200384266973], + [-6.025052377968172, 37.361494339120874], + [-6.024899414850762, 37.36098840465118], + [-6.024726535401538, 37.360486538479634], + [-6.024533910599502, 37.35998923580098], + [-6.024321730895523, 37.359496987297305], + [-6.0240902060229855, 37.3590102786542], + [-6.023839564789473, 37.35852959008193], + [-6.0235700548497055, 37.358055395841824], + [-6.02328194245994, 37.35758816377884], + [-6.022975512214098, 37.35712835486029], + [-6.022651066761868, 37.356676422721506], + [-6.022308926509088, 37.35623281321863], + [-6.021949429300682, 37.35579796398927], + [-6.021572930086494, 37.35537230402117], + [-6.021179800570312, 37.354956253229425], + [-6.020770428842493, 37.354550222042796], + [-6.020345218996477, 37.35415461099922], + [-6.019904590729645, 37.353769810351224], + [-6.0194489789288586, 37.353396199681484], + [-6.0189788332411265, 37.353034147528795], + [-6.018494617629807, 37.352684011025175], + [-6.017996809916783, 37.352346135543954], + [-6.017485901311074, 37.35202085435968], + [-6.016962395924343, 37.35170848831984], + [-6.016426810273752, 37.35140934552893], + [-6.015879672772713, 37.35112372104494], + [-6.015321523209971, 37.35085189658892], + [-6.014752912217564, 37.350594140267475], + [-6.014174400728197, 37.350350706308795], + [-6.013586559422511, 37.35012183481235], + [-6.012989968166851, 37.34990775151252], + [-6.012385215442036, 37.34970866755627], + [-6.011772897763715, 37.349524779295386], + [-6.011153619094871, 37.34935626809309], + [-6.010527990251052, 37.349203300145504], + [-6.009896628298893, 37.34906602631811], + [-6.009260155948546, 37.348944581997166], + [-6.0086192009405845, 37.348839086956474], + [-6.007974395428011, 37.348749645239465], + [-6.007326375353934, 37.348676345056816], + [-6.006675779825563, 37.348619258699564], + [-6.006023250485095, 37.348578442468046], + [-6.005369430878148, 37.348553936616376], + [-6.0047149658203125, 37.348545765312906], + [-6.004060500762476, 37.348553936616376], + [-6.00340668115553, 37.348578442468046], + [-6.002754151815063, 37.348619258699564], + [-6.0021035562866905, 37.348676345056816], + [-6.001455536212614, 37.348749645239465], + [-6.0008107307000405, 37.348839086956474], + [-6.000169775692079, 37.348944581997166], + [-5.999533303341731, 37.34906602631811], + [-5.998901941389572, 37.349203300145504], + [-5.998276312545753, 37.34935626809309], + [-5.997657033876911, 37.349524779295386], + [-5.997044716198589, 37.34970866755627], + [-5.996439963473773, 37.34990775151252], + [-5.995843372218113, 37.35012183481235], + [-5.995255530912427, 37.350350706308795], + [-5.99467701942306, 37.350594140267475], + [-5.994108408430655, 37.35085189658892], + [-5.993550258867911, 37.35112372104494], + [-5.993003121366873, 37.35140934552893], + [-5.9924675357162815, 37.35170848831984], + [-5.99194403032955, 37.35202085435968], + [-5.9914331217238415, 37.352346135543954], + [-5.990935314010819, 37.352684011025175], + [-5.990451098399498, 37.353034147528795], + [-5.989980952711766, 37.353396199681484], + [-5.98952534091098, 37.353769810351224], + [-5.989084712644148, 37.35415461099922], + [-5.988659502798131, 37.354550222042796], + [-5.988250131070312, 37.354956253229425], + [-5.987857001554131, 37.35537230402117], + [-5.987480502339942, 37.35579796398927], + [-5.987121005131536, 37.35623281321863], + [-5.986778864878756, 37.356676422721506], + [-5.986454419426527, 37.35712835486029], + [-5.986147989180684, 37.35758816377884], + [-5.985859876790919, 37.358055395841824], + [-5.985590366851151, 37.35852959008193], + [-5.9853397256176395, 37.3590102786542], + [-5.985108200745102, 37.359496987297305], + [-5.9848960210411235, 37.35998923580098], + [-5.9847033962390865, 37.360486538479634], + [-5.984530516789862, 37.36098840465118], + [-5.984377553672453, 37.361494339120874], + [-5.984244658223821, 37.36200384266973], + [-5.984131961988026, 37.36251641254685], + [-5.9840395765848635, 37.36303154296533], + [-5.983967593598119, 37.36354872560115], + [-5.983916084483574, 37.3640674500947], + [-5.983885100496834, 37.364587204554205], + [-5.9838746726410825, 37.365107476060885], + [-5.983884811634804, 37.36562775117503], + [-5.983915507899519, 37.36614751644271], + [-5.983966731567554, 37.36666625890246], + [-5.984038432509826, 37.36718346659164], + [-5.984130540383659, 37.36769862905173], + [-5.984242964700545, 37.36821123783229], + [-5.984375594913829, 37.36872078699286], + [-5.984528300526214, 37.369226773602534], + [-5.9847009312169925, 37.36972869823655], + [-5.984893316988894, 37.37022606546946], + [-5.985105268334398, 37.37071838436439], + [-5.985336576421342, 37.37120516895794], + [-5.985587013297698, 37.37168593874014], + [-5.985856332115249, 37.37216021912914], + [-5.98614426737201, 37.372627541939984], + [-5.986450535173127, 37.373087445847226], + [-5.986774833510002, 37.37353947684068], + [-5.987116842557396, 37.37398318867403], + [-5.987476224988192, 37.37441814330584], + [-5.987852626305521, 37.374843911332384], + [-5.98824567519195, 37.37526007241211], + [-5.988654983875333, 37.37566621568101], + [-5.989080148511033, 37.3760619401588], + [-5.989520749580098, 37.376446855145275], + [-5.989976352303003, 37.37682058060653], + [-5.9904465070685635, 37.37718274755073], + [-5.9909307498776, 37.37753299839284], + [-5.991428602800888, 37.377870987308285], + [-5.991939574450986, 37.37819638057483], + [-5.992463160467428, 37.378508856902656], + [-5.992998844014836, 37.37880810775202], + [-5.993546096293449, 37.37909383763847], + [-5.994104377061548, 37.379365764424975], + [-5.9946731351692835, 37.37962361960109], + [-5.995251809103359, 37.379867148548485], + [-5.995839827542034, 37.380096110792806], + [-5.996436609919903, 37.38031028024154], + [-5.997041567001877, 37.38050944540773], + [-5.997654101465798, 37.38069340961909], + [-5.998273608493129, 37.38086199121266], + [-5.998899476367099, 37.3810150237145], + [-5.99953108707773, 37.38115235600438], + [-6.000167816933134, 37.38127385246532], + [-6.000809037176479, 37.38137939311773], + [-6.001454114608002, 37.38146887373818], + [-6.002102412211454, 37.38154220596246], + [-6.002753289784344, 37.381599317373066], + [-6.003406104571371, 37.38164015157079], + [-6.004060211900394, 37.381664668230634], + [-6.0047149658203125, 37.38167284314159] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/city-segment-inside2.geojson b/packages/turf-point-to-line-distance/test/out/city-segment-inside2.geojson index 0eede6637a..d76727da6f 100644 --- a/packages/turf-point-to-line-distance/test/out/city-segment-inside2.geojson +++ b/packages/turf-point-to-line-distance/test/out/city-segment-inside2.geojson @@ -27,207 +27,207 @@ "type": "Polygon", "coordinates": [ [ - [-0.3767967224121093, 39.47817829771828], - [-0.37717297676517364, 39.478173734857535], - [-0.37754885965266904, 39.47816005078006], - [-0.3779239999762024, 39.4781372589958], - [-0.37829802737136786, 39.4781053820064], - [-0.3786705725738289, 39.478064451283075], - [-0.3790412677843082, 39.47801450723546], - [-0.37940974703212244, 39.47795559917164], - [-0.3797756465369009, 39.477887785249465], - [-0.38013860506812935, 39.47781113241903], - [-0.3804982643021618, 39.4777257163565], - [-0.38085426917634524, 39.47763162138934], - [-0.38120626823990733, 39.477528940412945], - [-0.3815539140012577, 39.47741777479881], - [-0.38189686327135797, 39.477298234294395], - [-0.3822347775028214, 39.4771704369146], - [-0.3825673231244046, 39.477034508825156], - [-0.38289417187056, 39.47689058421791], - [-0.3832150011057224, 39.476738805178286], - [-0.38352949414300874, 39.47657932154475], - [-0.383837340557015, 39.47641229076082], - [-0.3841382364904002, 39.47623787771947], - [-0.3844318849539543, 39.476056254600195], - [-0.3847179961198538, 39.47586760069882], - [-0.3849962876078137, 39.47567210225041], - [-0.3852664847638536, 39.47546995224517], - [-0.38552832093140305, 39.475261350237865], - [-0.38578153771447654, 39.47504650215058], - [-0.3860258852326613, 39.4748256200693], - [-0.38626112236766286, 39.4745989220344], - [-0.386487017001168, 39.47436663182521], - [-0.3867033462437899, 39.47412897873896], - [-0.3869098966548689, 39.473886197364294], - [-0.38710646445291524, 39.47363852734952], - [-0.38729285571648314, 39.473386213165945], - [-0.38746888657528306, 39.47312950386634], - [-0.387634383391341, 39.47286865283905], - [-0.3877891829300298, 39.47260391755761], - [-0.3879331325208033, 39.47233555932666], - [-0.388066090207477, 39.47206384302373], - [-0.3881879248879085, 39.47178903683776], - [-0.3882985164429403, 39.47151141200427], - [-0.3883977558544816, 39.47123124253753], - [-0.3884855453126127, 39.47094880496003], - [-0.38856179831160775, 39.47066437802948], - [-0.38862643973478556, 39.470378242463575], - [-0.3886794059281041, 39.4700906806629], - [-0.3887206447624299, 39.46980197643214], - [-0.38875011568442186, 39.46951241469996], - [-0.388767789755983, 39.46922228123774], - [-0.38877364968224115, 39.46893186237752], - [-0.38876768982803694, 39.468641444729435], - [-0.38874991622289995, 39.468351314898825], - [-0.3887203465545154, 39.4680617592034], - [-0.3886790101506874, 39.46777306339072], - [-0.388625947949819, 39.46748551235623], - [-0.38856121245994185, 39.46719938986212], - [-0.3884848677063361, 39.46691497825739], - [-0.3883969891677966, 39.466632558199244], - [-0.38829766370160856, 39.46635240837626], - [-0.3881869894573102, 39.46607480523338], - [-0.38806507577932936, 39.46580002269933], - [-0.38793204309859025, 39.46552833191621], - [-0.38778802281320285, 39.4652600009723], - [-0.387633157158351, 39.46499529463743], - [-0.3874675990655111, 39.46473447410197], - [-0.38729151201114187, 39.46447779671916], - [-0.38710506985499543, 39.46422551575136], - [-0.3869084566682113, 39.46397788012027], - [-0.3867018665513634, 39.46373513416147], - [-0.3864855034426428, 39.46349751738353], - [-0.38625958091636264, 39.463265264231765], - [-0.3860243219719901, 39.4630386038572], - [-0.3857799588139098, 39.46281775989053], - [-0.3855267326221398, 39.46260295022168], - [-0.3852648933142251, 39.46239438678503], - [-0.3849946992985444, 39.46219227535045], - [-0.38471641721927496, 39.46199681532048], - [-0.3844303216932651, 39.4618081995337], - [-0.3841366950390765, 39.46162661407475], - [-0.38383582699846114, 39.46145223809086], - [-0.38352801445054896, 39.461285243615244], - [-0.38321356111902705, 39.46112579539757], - [-0.38289277727259896, 39.46097405074161], - [-0.3825659794190192, 39.46083015935015], - [-0.38223348999300305, 39.460694263177494], - [-0.38189563703832, 39.46056649628954], - [-0.38155275388438203, 39.46044698473169], - [-0.3812051788176456, 39.460335846404604], - [-0.3808532547481496, 39.460233190948024], - [-0.38049732887151716, 39.460139119632764], - [-0.3801377523267535, 39.46005372526087], - [-0.3797748798501746, 39.4599770920742], - [-0.37940906942580827, 39.45990929567137], - [-0.37904068193260887, 39.45985040293338], - [-0.3786700807888337, 39.45980047195755], - [-0.37829763159392754, 39.45975955200041], - [-0.37792370176826995, 39.459727683429094], - [-0.377548660191135, 39.45970489768158], - [-0.3771728768372216, 39.45969121723573], - [-0.3767967224121093, 39.45968665558711], - [-0.376420567986997, 39.45969121723573], - [-0.3760447846330837, 39.45970489768158], - [-0.37566974305594875, 39.459727683429094], - [-0.37529581323029115, 39.45975955200041], - [-0.374923364035385, 39.45980047195755], - [-0.3745527628916098, 39.45985040293338], - [-0.37418437539841043, 39.45990929567137], - [-0.3738185649740441, 39.4599770920742], - [-0.3734556924974652, 39.46005372526087], - [-0.37309611595270153, 39.460139119632764], - [-0.3727401900760692, 39.460233190948024], - [-0.3723882660065731, 39.460335846404604], - [-0.3720406909398366, 39.46044698473169], - [-0.37169780778589867, 39.46056649628954], - [-0.37135995483121564, 39.460694263177494], - [-0.37102746540519943, 39.46083015935015], - [-0.37070066755161973, 39.46097405074161], - [-0.3703798837051917, 39.46112579539757], - [-0.37006543037366973, 39.461285243615244], - [-0.36975761782575756, 39.46145223809086], - [-0.36945674978514215, 39.46162661407475], - [-0.3691631231309537, 39.4618081995337], - [-0.36887702760494373, 39.46199681532048], - [-0.3685987455256743, 39.46219227535045], - [-0.3683285515099936, 39.46239438678503], - [-0.3680667122020788, 39.46260295022168], - [-0.3678134860103089, 39.46281775989053], - [-0.36756912285222865, 39.4630386038572], - [-0.36733386390785605, 39.463265264231765], - [-0.3671079413815759, 39.46349751738353], - [-0.36689157827285523, 39.46373513416147], - [-0.3666849881560075, 39.46397788012027], - [-0.36648837496922326, 39.46422551575136], - [-0.36630193281307677, 39.46447779671916], - [-0.3661258457587076, 39.46473447410197], - [-0.3659602876658677, 39.46499529463743], - [-0.36580542201101585, 39.4652600009723], - [-0.36566140172562844, 39.46552833191621], - [-0.36552836904488933, 39.46580002269933], - [-0.36540645536690847, 39.46607480523338], - [-0.3652957811226102, 39.46635240837626], - [-0.3651964556564221, 39.466632558199244], - [-0.3651085771178826, 39.46691497825739], - [-0.36503223236427684, 39.46719938986212], - [-0.3649674968743997, 39.46748551235623], - [-0.36491443467353135, 39.46777306339072], - [-0.3648730982697033, 39.4680617592034], - [-0.36484352860131875, 39.468351314898825], - [-0.3648257549961817, 39.468641444729435], - [-0.3648197951419775, 39.46893186237752], - [-0.3648256550682358, 39.46922228123774], - [-0.36484332913979683, 39.46951241469996], - [-0.36487280006178874, 39.46980197643214], - [-0.3649140388961145, 39.4700906806629], - [-0.3649670050894331, 39.470378242463575], - [-0.36503164651261094, 39.47066437802948], - [-0.36510789951160605, 39.47094880496003], - [-0.36519568896973703, 39.47123124253753], - [-0.3652949283812784, 39.47151141200427], - [-0.3654055199363102, 39.47178903683776], - [-0.3655273546167417, 39.47206384302373], - [-0.3656603123034154, 39.47233555932666], - [-0.3658042618941889, 39.47260391755761], - [-0.3659590614328777, 39.47286865283905], - [-0.36612455824893564, 39.47312950386634], - [-0.36630058910773555, 39.473386213165945], - [-0.3664869803713034, 39.47363852734952], - [-0.3666835481693497, 39.473886197364294], - [-0.3668900985804288, 39.47412897873896], - [-0.3671064278230507, 39.47436663182521], - [-0.36733232245655584, 39.4745989220344], - [-0.36756755959155735, 39.4748256200693], - [-0.3678119071097421, 39.47504650215058], - [-0.36806512389281565, 39.475261350237865], - [-0.3683269600603651, 39.47546995224517], - [-0.368597157216405, 39.47567210225041], - [-0.3688754487043649, 39.47586760069882], - [-0.3691615598702644, 39.476056254600195], - [-0.36945520833381845, 39.47623787771947], - [-0.3697561042672037, 39.47641229076082], - [-0.37006395068121, 39.47657932154475], - [-0.3703784437184964, 39.476738805178286], - [-0.3706992729536587, 39.47689058421791], - [-0.3710261216998141, 39.477034508825156], - [-0.3713586673213972, 39.4771704369146], - [-0.3716965815528607, 39.477298234294395], - [-0.372039530822961, 39.47741777479881], - [-0.37238717658431136, 39.477528940412945], - [-0.37273917564787346, 39.47763162138934], - [-0.3730951805220569, 39.4777257163565], - [-0.3734548397560893, 39.47781113241903], - [-0.37381779828731776, 39.477887785249465], - [-0.37418369779209626, 39.47795559917164], - [-0.37455217703991045, 39.47801450723546], - [-0.3749228722503898, 39.478064451283075], - [-0.37529541745285083, 39.4781053820064], - [-0.37566944484801623, 39.4781372589958], - [-0.37604458517154965, 39.47816005078006], - [-0.37642046805904505, 39.478173734857535], - [-0.3767967224121093, 39.47817829771828] + [-0.3767967224121093, 39.477903066051326], + [-0.37716177489791164, 39.47789863903635], + [-0.3775264669817148, 39.47788536236202], + [-0.37789043861774285, 39.477863249135886], + [-0.37825333047231247, 39.47783232118945], + [-0.37861478427899564, 39.47779260905657], + [-0.37897444319272194, 39.47774415194336], + [-0.3793319521424701, 39.477686997689354], + [-0.379686958182198, 39.47762120272026], + [-0.3800391108396624, 39.47754683199218], + [-0.3803880624627833, 39.47746395892743], + [-0.38073346856320767, 39.477372665341946], + [-0.38107498815673313, 39.47727304136445], + [-0.38141228410025274, 39.47716518534734], + [-0.38174502342488703, 39.477049203769525], + [-0.38207287766497294, 39.47692521113114], + [-0.3823955231825837, 39.47679332984047], + [-0.382712641487257, 39.476653690092895], + [-0.3830239195506159, 39.476506429742294], + [-0.3833290501155698, 39.47635169416476], + [-0.38362773199978956, 39.476189636114974], + [-0.3839196703931562, 39.476020415575285], + [-0.384204577148889, 39.47584419959757], + [-0.384482171068065, 39.47566116213819], + [-0.38475217817724733, 39.47547148388615], + [-0.3850143319989503, 39.47527535208451], + [-0.3852683738146716, 39.475072960345436], + [-0.38551405292023305, 39.47486450845887], + [-0.3857511268731777, 39.47465020219519], + [-0.3859793617319791, 39.47443025310193], + [-0.38619853228682693, 39.47420487829473], + [-0.3864084222817614, 39.47397430024297], + [-0.3866088246279377, 39.47373874654993], + [-0.38679954160781144, 39.473498449727984], + [-0.3869803850700424, 39.473253646969006], + [-0.38715117661492787, 39.47300457991003], + [-0.3873117477701807, 39.47275149439463], + [-0.3874619401568817, 39.472494640230124], + [-0.38760160564544305, 39.47223427094089], + [-0.3877306065014306, 39.47197064351796], + [-0.38784881552110156, 39.47170401816535], + [-0.38795611615652636, 39.471434658042995], + [-0.388052402630173, 39.471162829007035], + [-0.38813758003884125, 39.470888799347264], + [-0.38821156444684746, 39.47061283952225], + [-0.3882742829683686, 39.47033522189236], + [-0.38832567383886696, 39.47005622045089], + [-0.38836568647552727, 39.46977611055353], + [-0.3883942815266472, 39.46949516864664], + [-0.38841143090993646, 39.46921367199437], + [-0.38841711783968763, 39.468931898404946], + [-0.38841133684279433, 39.46865012595656], + [-0.388394093763603, 39.46836863272291], + [-0.38836540575759587, 39.468087696498706], + [-0.3883253012739137, 39.46780759452571], + [-0.388273820026737, 39.46752860321897], + [-0.38821101295555654, 39.46725099789422], + [-0.38813694217437494, 39.46697505249616], + [-0.38805168090989084, 39.46670103932823], + [-0.38795531342872824, 39.466429228783916], + [-0.3878479349537872, 39.466159889080025], + [-0.3877296515697967, 39.465893285992124], + [-0.3876005801181681, 39.46562968259227], + [-0.38746084808125314, 39.46536933898968], + [-0.387310593456122, 39.46511251207401], + [-0.3871499646179889, 39.4648594552621], + [-0.3869791201734212, 39.464610418247986], + [-0.38679822880347675, 39.46436564675666], + [-0.38660746909692834, 39.46412538230179], + [-0.38640702937373866, 39.46388986194746], + [-0.3861971074989624, 39.46365931807452], + [-0.38597791068725934, 39.46343397815133], + [-0.38574965529821315, 39.463214064509614], + [-0.38551256662265765, 39.462999794125096], + [-0.3852668786602229, 39.46279137840372], + [-0.38501283388831986, 39.46258902297312], + [-0.3847506830227932, 39.462392927479954], + [-0.38448068477047886, 39.4622032853931], + [-0.3842031055739085, 39.46202028381288], + [-0.3839182193484155, 39.461844103286715], + [-0.38362630721189955, 39.46167491763103], + [-0.3833276572075175, 39.461512893760066], + [-0.3830225640195731, 39.461358191521256], + [-0.3827113286828857, 39.46121096353771], + [-0.3823942582859232, 39.4610713550578], + [-0.38207166566799283, 39.46093950381199], + [-0.3817438691107857, 39.4608155398771], + [-0.38141119202458107, 39.46069958554812], + [-0.38107396262941506, 39.460591755217656], + [-0.38073251363153116, 39.460492155263246], + [-0.3803871818954278, 39.46040088394246], + [-0.38003830811182515, 39.46031803129619], + [-0.37968623646187927, 39.460243679059744], + [-0.37933131427797057, 39.460177900582494], + [-0.37897389170140144, 39.46012076075544], + [-0.37861432133733863, 39.46007231594736], + [-0.3782529579073385, 39.46003261394923], + [-0.3778901578997956, 39.460001693927154], + [-0.37752627921865994, 39.45997958638372], + [-0.3771616808307642, 39.45996631312801], + [-0.3767967224121093, 39.45996188725407], + [-0.3764317639934545, 39.45996631312801], + [-0.37606716560555875, 39.45997958638372], + [-0.3757032869244231, 39.460001693927154], + [-0.37534048691688027, 39.46003261394923], + [-0.37497912348688, 39.46007231594736], + [-0.37461955312281725, 39.46012076075544], + [-0.37426213054624824, 39.460177900582494], + [-0.3739072083623394, 39.460243679059744], + [-0.37355513671239354, 39.46031803129619], + [-0.3732062629287909, 39.46040088394246], + [-0.3728609311926875, 39.460492155263246], + [-0.3725194821948037, 39.460591755217656], + [-0.3721822527996376, 39.46069958554812], + [-0.3718495757134329, 39.4608155398771], + [-0.3715217791562259, 39.46093950381199], + [-0.3711991865382955, 39.4610713550578], + [-0.37088211614133304, 39.46121096353771], + [-0.37057088080464556, 39.461358191521256], + [-0.3702657876167012, 39.461512893760066], + [-0.36996713761231914, 39.46167491763103], + [-0.36967522547580317, 39.461844103286715], + [-0.3693903392503102, 39.46202028381288], + [-0.36911276005373983, 39.4622032853931], + [-0.3688427618014255, 39.462392927479954], + [-0.36858061093589883, 39.46258902297312], + [-0.3683265661639958, 39.46279137840372], + [-0.368080878201561, 39.462999794125096], + [-0.3678437895260056, 39.463214064509614], + [-0.36761553413695935, 39.46343397815133], + [-0.3673963373252563, 39.46365931807452], + [-0.36718641545048, 39.46388986194746], + [-0.36698597572729036, 39.46412538230179], + [-0.36679521602074194, 39.46436564675666], + [-0.3666143246507975, 39.464610418247986], + [-0.36644348020622974, 39.4648594552621], + [-0.3662828513680967, 39.46511251207401], + [-0.36613259674296555, 39.46536933898968], + [-0.3659928647060505, 39.46562968259227], + [-0.365863793254422, 39.465893285992124], + [-0.3657455098704314, 39.466159889080025], + [-0.3656381313954904, 39.466429228783916], + [-0.36554176391432786, 39.46670103932823], + [-0.3654565026498437, 39.46697505249616], + [-0.3653824318686622, 39.46725099789422], + [-0.3653196247974817, 39.46752860321897], + [-0.36526814355030496, 39.46780759452571], + [-0.3652280390666228, 39.468087696498706], + [-0.3651993510606157, 39.46836863272291], + [-0.36518210798142436, 39.46865012595656], + [-0.36517632698453106, 39.468931898404946], + [-0.36518201391428223, 39.46921367199437], + [-0.3651991632975715, 39.46949516864664], + [-0.3652277583486915, 39.46977611055353], + [-0.3652677709853517, 39.47005622045089], + [-0.3653191618558501, 39.47033522189236], + [-0.36538188037737124, 39.47061283952225], + [-0.36545586478537745, 39.470888799347264], + [-0.3655410421940457, 39.471162829007035], + [-0.36563732866769233, 39.471434658042995], + [-0.3657446293031171, 39.47170401816535], + [-0.3658628383227881, 39.47197064351796], + [-0.36599183917877565, 39.47223427094089], + [-0.366131504667337, 39.472494640230124], + [-0.366281697054038, 39.47275149439463], + [-0.3664422682092908, 39.47300457991003], + [-0.36661305975417624, 39.473253646969006], + [-0.36679390321640726, 39.473498449727984], + [-0.366984620196281, 39.47373874654993], + [-0.3671850225424573, 39.47397430024297], + [-0.36739491253739176, 39.47420487829473], + [-0.3676140830922396, 39.47443025310193], + [-0.367842317951041, 39.47465020219519], + [-0.36807939190398564, 39.47486450845887], + [-0.3683250710095471, 39.475072960345436], + [-0.3685791128252684, 39.47527535208451], + [-0.36884126664697137, 39.47547148388615], + [-0.3691112737561537, 39.47566116213819], + [-0.3693888676753297, 39.47584419959757], + [-0.3696737744310625, 39.476020415575285], + [-0.36996571282442914, 39.476189636114974], + [-0.3702643947086489, 39.47635169416476], + [-0.3705695252736028, 39.476506429742294], + [-0.3708808033369617, 39.476653690092895], + [-0.37119792164163506, 39.47679332984047], + [-0.3715205671592458, 39.47692521113114], + [-0.3718484213993317, 39.477049203769525], + [-0.37218116072396595, 39.47716518534734], + [-0.37251845666748556, 39.47727304136445], + [-0.37285997626101103, 39.477372665341946], + [-0.37320538236143536, 39.47746395892743], + [-0.3735543339845563, 39.47754683199218], + [-0.3739064866420207, 39.47762120272026], + [-0.3742614926817486, 39.477686997689354], + [-0.37461900163149675, 39.47774415194336], + [-0.37497866054522294, 39.47779260905657], + [-0.3753401143519061, 39.47783232118945], + [-0.3757030062064758, 39.477863249135886], + [-0.3760669778425038, 39.47788536236202], + [-0.37643166992630706, 39.47789863903635], + [-0.3767967224121093, 39.477903066051326] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/city-segment-inside3.geojson b/packages/turf-point-to-line-distance/test/out/city-segment-inside3.geojson index dcb644fcb0..5865a831b8 100644 --- a/packages/turf-point-to-line-distance/test/out/city-segment-inside3.geojson +++ b/packages/turf-point-to-line-distance/test/out/city-segment-inside3.geojson @@ -27,207 +27,207 @@ "type": "Polygon", "coordinates": [ [ - [-3.592529296875, 40.605582910383504], - [-3.5938440544139856, 40.60556722235348], - [-3.5951575125965687, 40.605520173767665], - [-3.5964683733559686, 40.605441811123505], - [-3.597775341203348, 40.60533221186543], - [-3.5990771245135305, 40.605191484308044], - [-3.600372436806821, 40.60501976752856], - [-3.601659998025631, 40.60481723122884], - [-3.6029385358046238, 40.604584075566926], - [-3.604206786733098, 40.60432053095845], - [-3.605463497608343, 40.604026857847906], - [-3.606707426678687, 40.60370334645031], - [-3.607937344875007, 40.60335031646313], - [-3.6091520370294443, 40.602968116749146], - [-3.610350303080111, 40.6025571249903], - [-3.6115309592605747, 40.60211774731297], - [-3.6126928392729187, 40.601650417885196], - [-3.61383479544321, 40.601155598485896], - [-3.614955699858219, 40.60063377804687], - [-3.6160544454822467, 40.600085472167954], - [-3.6171299472529337, 40.59951122260566], - [-3.6181811431549877, 40.59891159673597], - [-3.6192069952707184, 40.598287186991826], - [-3.620206490806364, 40.597638610275794], - [-3.6211786430931734, 40.5969665073485], - [-3.6221224925622564, 40.59627154219359], - [-3.62303710769223, 40.59555440135971], - [-3.6239215859287293, 40.59481579328012], - [-3.624775054574868, 40.59405644757084], - [-3.6255966716517785, 40.59327711430781], - [-3.6263856267283776, 40.59247856328397], - [-3.6271411417195525, 40.59166158324677], - [-3.6278624716519694, 40.590826981117225], - [-3.6285489053967837, 40.58997558119087], - [-3.6291997663685125, 40.589108224321805], - [-3.629814413189403, 40.58822576709038], - [-3.6303922403186597, 40.58732908095545], - [-3.6309326786459146, 40.58641905139212], - [-3.631435196048372, 40.58549657701566], - [-3.631899297911103, 40.58456256869258], - [-3.632324527609994, 40.58361794863984], - [-3.6327104669568784, 40.58266364951283], - [-3.633056736606463, 40.581700613483285], - [-3.6333629964246392, 40.58072979130795], - [-3.6336289458178617, 40.579752141388845], - [-3.633854324023283, 40.57876862882624], - [-3.6340389103593895, 40.5777802244651], - [-3.6341825244369135, 40.57678790393604], - [-3.634285026329847, 40.57579264669172], - [-3.6343463167064023, 40.57479543503969], - [-3.6343663369198382, 40.57379725317253], - [-3.634345069059075, 40.57279908619629], - [-3.634282535959082, 40.571801919158275], - [-3.6341788011710547, 40.57080673607496], - [-3.6340339688924486, 40.569814518961216], - [-3.6338481838569523, 40.56882624686161], - [-3.633621631184546, 40.56784289488476], - [-3.6333545361918245, 40.566865433241865], - [-3.633047164162788, 40.56589482629016], - [-3.6326998200803673, 40.56493203158229], - [-3.632312848318964, 40.563977998922596], - [-3.631886632298339, 40.5630336694312], - [-3.6314215940992156, 40.562099974616785], - [-3.6309181940410014, 40.56117783545903], - [-3.6303769302220634, 40.5602681615015], - [-3.6297983380230363, 40.55937184995603], - [-3.629182989573671, 40.558489784819415], - [-3.628531493183772, 40.55762283600307], - [-3.6278444927387987, 40.55677185847698], - [-3.6271226670607457, 40.555937691428205], - [-3.6263667292349435, 40.555121157435224], - [-3.625577425903461, 40.5543230616587], - [-3.6247555365258237, 40.55354419104947], - [-3.6239018726077634, 40.55278531357455], - [-3.6230172768988047, 40.55204717746201], - [-3.622102622559447, 40.5513305104652], - [-3.621158812298803, 40.55063601914738], - [-3.620186777483524, 40.54996438818718], - [-3.6191874772189, 40.549316279705586], - [-3.618161897403039, 40.54869233261533], - [-3.617111049755068, 40.5480931619931], - [-3.6160359708182797, 40.54751935847517], - [-3.6149377209392415, 40.54697148767721], - [-3.6138173832238336, 40.54645008963864], - [-3.612676062471256, 40.54595567829228], - [-3.6115148840870392, 40.54548874095954], - [-3.61033499297611, 40.54504973787191], - [-3.6091375524170073, 40.5446391017191], - [-3.6079237429183273, 40.54425723722406], - [-3.6066947610585176, 40.543904520745784], - [-3.605451818310144, 40.54358129990976], - [-3.6041961398497664, 40.54328789326677], - [-3.6029289633545827, 40.54302458998017], - [-3.6016515377870078, 40.54279164954209], - [-3.600365122168345, 40.54258930151876], - [-3.5990709843427693, 40.54241774532518], - [-3.5977703997327755, 40.54227715002945], - [-3.5964646500873334, 40.54216765418682], - [-3.5951550222239286, 40.54208936570374], - [-3.593842806765714, 40.542042361731966], - [-3.592529296875, 40.542026688592884], - [-3.5912157869842867, 40.542042361731966], - [-3.589903571526072, 40.54208936570374], - [-3.588593943662667, 40.54216765418682], - [-3.5872881940172245, 40.54227715002945], - [-3.5859876094072307, 40.54241774532518], - [-3.584693471581655, 40.54258930151876], - [-3.5834070559629927, 40.54279164954209], - [-3.5821296303954173, 40.54302458998017], - [-3.580862453900234, 40.54328789326677], - [-3.579606775439856, 40.54358129990976], - [-3.5783638326914824, 40.543904520745784], - [-3.577134850831673, 40.54425723722406], - [-3.5759210413329927, 40.5446391017191], - [-3.57472360077389, 40.54504973787191], - [-3.5735437096629608, 40.54548874095954], - [-3.572382531278744, 40.54595567829228], - [-3.5712412105261677, 40.54645008963864], - [-3.570120872810759, 40.54697148767721], - [-3.569022622931721, 40.54751935847517], - [-3.5679475439949324, 40.5480931619931], - [-3.566896696346961, 40.54869233261533], - [-3.5658711165311012, 40.549316279705586], - [-3.5648718162664763, 40.54996438818718], - [-3.563899781451197, 40.55063601914738], - [-3.5629559711905534, 40.5513305104652], - [-3.5620413168511953, 40.55204717746201], - [-3.561156721142236, 40.55278531357455], - [-3.5603030572241763, 40.55354419104947], - [-3.559481167846539, 40.5543230616587], - [-3.5586918645150574, 40.555121157435224], - [-3.5579359266892543, 40.555937691428205], - [-3.5572141010112013, 40.55677185847698], - [-3.5565271005662282, 40.55762283600307], - [-3.5558756041763293, 40.558489784819415], - [-3.555260255726964, 40.55937184995603], - [-3.5546816635279366, 40.5602681615015], - [-3.554140399708998, 40.56117783545903], - [-3.5536369996507844, 40.562099974616785], - [-3.5531719614516613, 40.5630336694312], - [-3.5527457454310367, 40.563977998922596], - [-3.5523587736696327, 40.56493203158229], - [-3.552011429587212, 40.56589482629016], - [-3.551704057558176, 40.566865433241865], - [-3.5514369625654547, 40.56784289488476], - [-3.5512104098930486, 40.56882624686161], - [-3.5510246248575523, 40.569814518961216], - [-3.5508797925789466, 40.57080673607496], - [-3.5507760577909195, 40.571801919158275], - [-3.5507135246909254, 40.57279908619629], - [-3.550692256830162, 40.57379725317253], - [-3.550712277043598, 40.57479543503969], - [-3.5507735674201535, 40.57579264669172], - [-3.5508760693130865, 40.57678790393604], - [-3.5510196833906114, 40.5777802244651], - [-3.5512042697267177, 40.57876862882624], - [-3.5514296479321383, 40.579752141388845], - [-3.5516955973253603, 40.58072979130795], - [-3.5520018571435363, 40.581700613483285], - [-3.5523481267931216, 40.58266364951283], - [-3.552734066140007, 40.58361794863984], - [-3.553159295838897, 40.58456256869258], - [-3.5536233977016285, 40.58549657701566], - [-3.5541259151040854, 40.58641905139212], - [-3.5546663534313403, 40.58732908095545], - [-3.5552441805605977, 40.58822576709038], - [-3.5558588273814884, 40.589108224321805], - [-3.5565096883532163, 40.58997558119087], - [-3.557196122098031, 40.590826981117225], - [-3.557917452030448, 40.59166158324677], - [-3.5586729670216224, 40.59247856328397], - [-3.5594619220982224, 40.59327711430781], - [-3.5602835391751326, 40.59405644757084], - [-3.561137007821271, 40.59481579328012], - [-3.56202148605777, 40.59555440135971], - [-3.562936101187744, 40.59627154219359], - [-3.563879950656827, 40.5969665073485], - [-3.5648521029436364, 40.597638610275794], - [-3.5658515984792816, 40.598287186991826], - [-3.5668774505950123, 40.59891159673597], - [-3.5679286464970663, 40.59951122260566], - [-3.5690041482677537, 40.600085472167954], - [-3.570102893891781, 40.60063377804687], - [-3.5712237983067903, 40.601155598485896], - [-3.572365754477082, 40.601650417885196], - [-3.5735276344894253, 40.60211774731297], - [-3.5747082906698893, 40.6025571249903], - [-3.5759065567205566, 40.602968116749146], - [-3.5771212488749935, 40.60335031646313], - [-3.5783511670713133, 40.60370334645031], - [-3.579595096141657, 40.604026857847906], - [-3.580851807016902, 40.60432053095845], - [-3.5821200579453767, 40.604584075566926], - [-3.5833985957243693, 40.60481723122884], - [-3.5846861569431785, 40.60501976752856], - [-3.58598146923647, 40.605191484308044], - [-3.5872832525466523, 40.60533221186543], - [-3.588590220394032, 40.605441811123505], - [-3.5899010811534318, 40.605520173767665], - [-3.5912145393360144, 40.60556722235348], - [-3.592529296875, 40.605582910383504] + [-3.592529296875, 40.60525484040387], + [-3.593830474774089, 40.605239314409665], + [-3.5951303667562624, 40.60519275177097], + [-3.5964276881808104, 40.60511519850428], + [-3.5977211569581566, 40.60500673125301], + [-3.5990094948221962, 40.604867457211455], + [-3.600291428598792, 40.604697514018355], + [-3.601565691469119, 40.604497069620365], + [-3.602831024226608, 40.60426632210533], + [-3.6040861765262022, 40.60400549950575], + [-3.6053299081246797, 40.603714859572506], + [-3.6065609901107925, 40.603394689519085], + [-3.607778206123972, 40.60304530573659], + [-3.6089803535603875, 40.602667053479905], + [-3.610166244765143, 40.602260306525054], + [-3.611334708209402, 40.601825466798516], + [-3.612484589651283, 40.601362963978474], + [-3.6136147532793332, 40.60087325506861], + [-3.614724082837454, 40.600356823944885], + [-3.6158114827301495, 40.59981418087565], + [-3.6168758791069813, 40.59924586201564], + [-3.6179162209251676, 40.59865242887438], + [-3.61893148098924, 40.59803446775947], + [-3.6199206569667477, 40.59739258919535], + [-3.6208827723789834, 40.59672742731812], + [-3.621816877565753, 40.596039639247124], + [-3.6227220506232305, 40.59532990443361], + [-3.6235973983139735, 40.5945989239876], + [-3.6244420569481948, 40.59384741998316], + [-3.625255193235426, 40.59307613474322], + [-3.6260360051057385, 40.592285830104174], + [-3.6267837224997006, 40.59147728666145], + [-3.6274976081263244, 40.590651302996605], + [-3.628176958188229, 40.58980869488654], + [-3.6288211030733506, 40.58895029449607], + [-3.6294294080124914, 40.588076949554164], + [-3.630001273702106, 40.58718952251506], + [-3.6305361368916955, 40.58628888970484], + [-3.631033470935269, 40.585375940454526], + [-3.6314927863063278, 40.5844515762203], + [-3.631913631075899, 40.58351670969206], + [-3.6322955913531527, 40.58257226389081], + [-3.6326382916881976, 40.58161917125618], + [-3.63294139543668, 40.58065837272466], + [-3.6332046050858438, 40.57969081679965], + [-3.63342766254176, 40.57871745861413], + [-3.633610349377466, 40.57773925898708], + [-3.633752487041796, 40.57675718347427], + [-3.633853937028723, 40.575772201414686], + [-3.633914601007062, 40.57478528497327], + [-3.6339344209104665, 40.57379740818112], + [-3.6339133789876064, 40.57280954597402], + [-3.6338514978125573, 40.57182267323018], + [-3.6337488402553837, 40.570837763808264], + [-3.6336055094129893, 40.56985578958654], + [-3.6334216485003274, 40.56887771950425], + [-3.6331974407021055, 40.56790451860589], + [-3.6329331089851546, 40.566937147089725], + [-3.6326289158716913, 40.565976559360934], + [-3.632285163173693, 40.565023703091], + [-3.6319021916887086, 40.56407951828358], + [-3.6314803808574005, 40.56314493634827], + [-3.6310201483832025, 40.562220879182945], + [-3.6305219498144736, 40.56130825826562], + [-3.6299862780895977, 40.56040797375671], + [-3.6294136630454874, 40.559520913612644], + [-3.6288046708899997, 40.558647952711546], + [-3.628159903638816, 40.55778995199201], + [-3.6274799985173263, 40.556947757605705], + [-3.626765627328168, 40.556122200084644], + [-3.6260174957850153, 40.55531409352397], + [-3.625236342813321, 40.55452423478103], + [-3.62442293981869, 40.55375340269152], + [-3.623578089923631, 40.55300235730347], + [-3.6227026271734344, 40.552271839129844], + [-3.621797415711981, 40.55156256842034], + [-3.6208633489282818, 40.55087524445336], + [-3.6199013485746065, 40.55021054484856], + [-3.6189123638570737, 40.54956912490089], + [-3.6178973704995783, 40.54895161693651], + [-3.616857369782007, 40.548358629691485], + [-3.6157933875536648, 40.54779074771367], + [-3.6147064732228844, 40.5472485307884], + [-3.6135976987238143, 40.54673251338862], + [-3.61246815746139, 40.5462432041499], + [-3.6113189632355196, 40.54578108537087], + [-3.6101512491455314, 40.5453466125396], + [-3.6089661664759483, 40.5449402138863], + [-3.607764883564687, 40.544562289962826], + [-3.6065485846547616, 40.54421321324946], + [-3.6053184687306117, 40.5438933277892], + [-3.6040757483401995, 40.54360294885], + [-3.602821648403996, 40.54334236261532], + [-3.6015574050120227, 40.5431118259032], + [-3.600284264210103, 40.542911565914224], + [-3.599003480776514, 40.54274178000844], + [-3.597716316990196, 40.542602635511756], + [-3.5964240413917357, 40.542494269551675], + [-3.5951279275382984, 40.54241678892272], + [-3.5938292527537268, 40.54237026998165], + [-3.592529296875, 40.542354758572515], + [-3.5912293409962737, 40.54237026998165], + [-3.589930666211702, 40.54241678892272], + [-3.5886345523582652, 40.542494269551675], + [-3.5873422767598044, 40.542602635511756], + [-3.5860551129734866, 40.54274178000844], + [-3.5847743295398975, 40.542911565914224], + [-3.583501188737978, 40.5431118259032], + [-3.5822369453460046, 40.54334236261532], + [-3.580982845409801, 40.54360294885], + [-3.5797401250193883, 40.5438933277892], + [-3.5785100090952384, 40.54421321324946], + [-3.577293710185313, 40.544562289962826], + [-3.576092427274052, 40.5449402138863], + [-3.57490734460447, 40.5453466125396], + [-3.57373963051448, 40.54578108537087], + [-3.57259043628861, 40.5462432041499], + [-3.571460895026186, 40.54673251338862], + [-3.570352120527116, 40.5472485307884], + [-3.5692652061963357, 40.54779074771367], + [-3.568201223967993, 40.548358629691485], + [-3.5671612232504217, 40.54895161693651], + [-3.5661462298929263, 40.54956912490089], + [-3.5651572451753935, 40.55021054484856], + [-3.5641952448217187, 40.55087524445336], + [-3.5632611780380192, 40.55156256842034], + [-3.562355966576565, 40.552271839129844], + [-3.561480503826369, 40.55300235730347], + [-3.56063565393131, 40.55375340269152], + [-3.5598222509366795, 40.55452423478103], + [-3.559041097964985, 40.55531409352397], + [-3.558292966421833, 40.556122200084644], + [-3.557578595232674, 40.556947757605705], + [-3.5568986901111845, 40.55778995199201], + [-3.5562539228599994, 40.558647952711546], + [-3.555644930704513, 40.559520913612644], + [-3.5550723156604023, 40.56040797375671], + [-3.554536643935527, 40.56130825826562], + [-3.554038445366798, 40.562220879182945], + [-3.5535782128926, 40.56314493634827], + [-3.5531564020612922, 40.56407951828358], + [-3.552773430576307, 40.565023703091], + [-3.552429677878309, 40.565976559360934], + [-3.5521254847648454, 40.566937147089725], + [-3.551861153047895, 40.56790451860589], + [-3.5516369452496726, 40.56887771950425], + [-3.551453084337011, 40.56985578958654], + [-3.5513097534946167, 40.570837763808264], + [-3.5512070959374427, 40.57182267323018], + [-3.551145214762394, 40.57280954597402], + [-3.5511241728395335, 40.57379740818112], + [-3.551143992742938, 40.57478528497327], + [-3.5512046567212785, 40.575772201414686], + [-3.551306106708204, 40.57675718347427], + [-3.5514482443725344, 40.57773925898708], + [-3.5516309312082406, 40.57871745861413], + [-3.5518539886641562, 40.57969081679965], + [-3.55211719831332, 40.58065837272466], + [-3.552420302061803, 40.58161917125618], + [-3.5527630023968477, 40.58257226389081], + [-3.5531449626741014, 40.58351670969206], + [-3.5535658074436727, 40.5844515762203], + [-3.554025122814731, 40.585375940454526], + [-3.554522456858304, 40.58628888970484], + [-3.555057320047894, 40.58718952251506], + [-3.555629185737508, 40.588076949554164], + [-3.55623749067665, 40.58895029449607], + [-3.556881635561771, 40.58980869488654], + [-3.557560985623676, 40.590651302996605], + [-3.5582748712502994, 40.59147728666145], + [-3.5590225886442615, 40.592285830104174], + [-3.559803400514574, 40.59307613474322], + [-3.5606165368018057, 40.59384741998316], + [-3.561461195436027, 40.5945989239876], + [-3.56233654312677, 40.59532990443361], + [-3.5632417161842476, 40.596039639247124], + [-3.5641758213710166, 40.59672742731812], + [-3.5651379367832527, 40.59739258919535], + [-3.56612711276076, 40.59803446775947], + [-3.567142372824833, 40.59865242887438], + [-3.568182714643019, 40.59924586201564], + [-3.569247111019852, 40.59981418087565], + [-3.5703345109125464, 40.600356823944885], + [-3.571443840470667, 40.60087325506861], + [-3.572574004098717, 40.601362963978474], + [-3.5737238855405975, 40.601825466798516], + [-3.5748923489848576, 40.602260306525054], + [-3.5760782401896125, 40.602667053479905], + [-3.577280387626028, 40.60304530573659], + [-3.5784976036392075, 40.603394689519085], + [-3.5797286856253203, 40.603714859572506], + [-3.580972417223798, 40.60400549950575], + [-3.582227569523392, 40.60426632210533], + [-3.583492902280881, 40.604497069620365], + [-3.5847671651512085, 40.604697514018355], + [-3.586049098927804, 40.604867457211455], + [-3.587337436791844, 40.60500673125301], + [-3.5886309055691896, 40.60511519850428], + [-3.589928226993738, 40.60519275177097], + [-3.591228118975911, 40.605239314409665], + [-3.592529296875, 40.60525484040387] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/city-segment-obtuse1.geojson b/packages/turf-point-to-line-distance/test/out/city-segment-obtuse1.geojson index a3db567261..8f0a2437c9 100644 --- a/packages/turf-point-to-line-distance/test/out/city-segment-obtuse1.geojson +++ b/packages/turf-point-to-line-distance/test/out/city-segment-obtuse1.geojson @@ -42,12 +42,12 @@ [-6.042197077091976, 37.38136003111692], [-6.04313559305344, 37.38105101361256], [-6.044061422490312, 37.38071871650848], - [-6.044973651039865, 37.38036346804896], + [-6.044973651039864, 37.38036346804896], [-6.04587137781173, 37.37998561914491], [-6.046753716279467, 37.379585543026245], [-6.047619795157733, 37.379163634872214], - [-6.04846875926421, 37.378720311420025], - [-6.049299770365408, 37.37825601055217], + [-6.0484687592642095, 37.378720311420025], + [-6.0492997703654074, 37.37825601055217], [-6.050112008005509, 37.3777711908627], [-6.05090467031743, 37.37726633120325], [-6.051676974815305, 37.376741930208844], @@ -58,65 +58,65 @@ [-6.055207195465312, 37.3738455784915], [-6.055842101034343, 37.373215444133365], [-6.056451776372602, 37.372569769017396], - [-6.05703562009246, 37.37190919073983], + [-6.057035620092459, 37.37190919073983], [-6.057593056360492, 37.371234361596535], - [-6.058123535464374, 37.37054594793782], + [-6.058123535464373, 37.37054594793782], [-6.058626534353744, 37.36984462950922], - [-6.059101557154549, 37.36913109877935], - [-6.059548135656323, 37.36840606025507], - [-6.0599658297719685, 37.3676702297849], + [-6.0591015571545475, 37.36913109877934], + [-6.059548135656323, 37.36840606025506], + [-6.059965829771967, 37.3676702297849], [-6.060354227969559, 37.3669243338513], - [-6.060712947675787, 37.3661691088525], - [-6.061041635650622, 37.365405300374626], + [-6.060712947675786, 37.3661691088525], + [-6.061041635650621, 37.365405300374626], [-6.061339968332868, 37.36463366245482], - [-6.061607652156258, 37.36385495683615], - [-6.061844423835801, 37.36306995221488], + [-6.061607652156257, 37.36385495683615], + [-6.0618444238358, 37.36306995221488], [-6.062050050624106, 37.362279423481134], [-6.062224330537456, 37.36148415095337], [-6.0623670925514, 37.36068491960772], - [-6.062478196765716, 37.3598825183027], + [-6.062478196765714, 37.3598825183027], [-6.0625575345385565, 37.359077739000305], [-6.062605028589718, 37.35827137598412], [-6.062620633072877, 37.3574642250751], - [-6.062604333616798, 37.35665708284616], - [-6.062556147335455, 37.35585074583599], + [-6.062604333616797, 37.35665708284616], + [-6.062556147335454, 37.35585074583599], [-6.062476122807084, 37.35504600976288], [-6.062364340022205, 37.354243668739834], - [-6.062220910300662, 37.353444514490924], + [-6.0622209103006615, 37.353444514490924], [-6.062045976177818, 37.352649335570426], [-6.061839711259985, 37.35185891658501], - [-6.061602320049291, 37.35107403742004], - [-6.061334037738125, 37.3502954724705], + [-6.06160232004929, 37.35107403742004], + [-6.061334037738124, 37.3502954724705], [-6.061035129973439, 37.349523989877525], [-6.060705892591087, 37.34876035077115], [-6.060346651320524, 37.348005308520094], [-6.059957761460153, 37.34725960798927], - [-6.059539607523658, 37.34652398480574], - [-6.059092602857662, 37.345799164633895], + [-6.059539607523658, 37.346523984805756], + [-6.059092602857662, 37.3457991646339], [-6.058617189231142, 37.34508586246052], [-6.058113836396972, 37.34438478189046], - [-6.057583041626067, 37.34369661445363], - [-6.057025329214581, 37.34302203892382], + [-6.057583041626066, 37.34369661445363], + [-6.05702532921458, 37.34302203892382], [-6.056441249964655, 37.34236172065045], [-6.0558313806392405, 37.34171631090328], [-6.05519632339155, 37.34108644623126], - [-6.054536705169668, 37.34047274783587], + [-6.054536705169667, 37.34047274783587], [-6.053853177096964, 37.33987582095966], [-6.053146413828883, 37.33929625429056], [-6.052417112886771, 37.33873461938242], [-6.0516659939693875, 37.338191470092696], [-6.050893798242781, 37.33766734203739], [-6.050101287609245, 37.33716275206408], - [-6.049289243956044, 37.33667819774345], - [-6.048458468384681, 37.33621415687984], - [-6.047609780421451, 37.33577108704121], - [-6.04674401721003, 37.33534942510912], + [-6.049289243956043, 37.33667819774345], + [-6.0484584683846805, 37.33621415687984], + [-6.047609780421449, 37.33577108704121], + [-6.046744017210029, 37.33534942510912], [-6.045862032686948, 37.33494958684908], [-6.044964696740686, 37.33457196650159], [-6.044052894355279, 37.33421693639459], [-6.043127524739219, 37.33388484657723], [-6.042189500440534, 37.33357602447572], - [-6.041239746448892, 37.33329077457146], + [-6.041239746448891, 37.33329077457146], [-6.040279199285616, 37.33302937810159], [-6.039308806082496, 37.33279209278262], [-6.038329523650277, 37.33257915255698], @@ -147,11 +147,11 @@ [-6.013841004762625, 37.33534942510912], [-6.012975241551205, 37.33577108704121], [-6.012126553587974, 37.33621415687984], - [-6.011295778016612, 37.33667819774345], - [-6.01048373436341, 37.33716275206408], + [-6.0112957780166125, 37.33667819774345], + [-6.010483734363411, 37.33716275206408], [-6.009691223729873, 37.33766734203739], [-6.008919028003269, 37.338191470092696], - [-6.008167909085884, 37.33873461938242], + [-6.008167909085885, 37.33873461938242], [-6.007438608143773, 37.33929625429056], [-6.0067318448756915, 37.33987582095966], [-6.006048316802987, 37.34047274783587], @@ -162,39 +162,39 @@ [-6.003001980346588, 37.34369661445363], [-6.002471185575684, 37.34438478189046], [-6.001967832741514, 37.34508586246052], - [-6.001492419114993, 37.345799164633895], - [-6.001045414448996, 37.34652398480574], + [-6.001492419114993, 37.3457991646339], + [-6.001045414448996, 37.346523984805756], [-6.000627260512502, 37.34725960798927], [-6.000238370652132, 37.348005308520094], [-5.9998791293815685, 37.34876035077115], [-5.999549891999216, 37.349523989877525], [-5.99925098423453, 37.3502954724705], - [-5.998982701923365, 37.35107403742004], + [-5.9989827019233655, 37.35107403742004], [-5.9987453107126685, 37.35185891658501], [-5.998539045794837, 37.352649335570426], [-5.998364111671993, 37.353444514490924], - [-5.99822068195045, 37.354243668739834], - [-5.99810889916557, 37.35504600976288], + [-5.9982206819504515, 37.354243668739834], + [-5.9981088991655716, 37.35504600976288], [-5.998028874637201, 37.35585074583599], - [-5.997980688355858, 37.35665708284616], + [-5.997980688355859, 37.35665708284616], [-5.997964388899779, 37.3574642250751], - [-5.997979993382937, 37.35827137598412], + [-5.997979993382938, 37.35827137598412], [-5.998027487434099, 37.359077739000305], - [-5.99810682520694, 37.3598825183027], + [-5.998106825206941, 37.3598825183027], [-5.998217929421254, 37.36068491960772], - [-5.998360691435198, 37.36148415095337], + [-5.9983606914352, 37.36148415095337], [-5.9985349713485485, 37.362279423481134], [-5.9987405981368545, 37.36306995221488], [-5.998977369816397, 37.36385495683615], [-5.999245053639787, 37.36463366245482], - [-5.999543386322033, 37.365405300374626], - [-5.999872074296868, 37.3661691088525], + [-5.999543386322034, 37.365405300374626], + [-5.999872074296869, 37.3661691088525], [-6.0002307940030954, 37.3669243338513], [-6.000619192200688, 37.3676702297849], - [-6.001036886316332, 37.36840606025507], - [-6.001483464818107, 37.36913109877935], + [-6.001036886316332, 37.36840606025506], + [-6.001483464818108, 37.36913109877934], [-6.001958487618912, 37.36984462950922], - [-6.002461486508281, 37.37054594793782], + [-6.002461486508283, 37.37054594793782], [-6.002991965612162, 37.371234361596535], [-6.003549401880195, 37.37190919073983], [-6.004133245600054, 37.372569769017396], @@ -202,15 +202,15 @@ [-6.005377826507343, 37.3738455784915], [-6.006037335957668, 37.374459549825964], [-6.006720798595192, 37.375056751817056], - [-6.007427540022713, 37.375636594691116], + [-6.0074275400227135, 37.375636594691116], [-6.008156862805083, 37.37619850580421], - [-6.008908047157349, 37.376741930208844], + [-6.00890804715735, 37.376741930208844], [-6.0096803516552235, 37.37726633120325], [-6.010473013967147, 37.3777711908627], - [-6.011285251607247, 37.37825601055217], - [-6.012116262708445, 37.378720311420025], + [-6.011285251607249, 37.37825601055217], + [-6.012116262708446, 37.378720311420025], [-6.012965226814923, 37.379163634872214], - [-6.013831305693188, 37.379585543026245], + [-6.013831305693189, 37.379585543026245], [-6.014713644160925, 37.37998561914491], [-6.01561137093279, 37.38036346804896], [-6.016523599482343, 37.38071871650848], diff --git a/packages/turf-point-to-line-distance/test/out/city-segment-obtuse2.geojson b/packages/turf-point-to-line-distance/test/out/city-segment-obtuse2.geojson index 54b3b25cf0..76e83f8b35 100644 --- a/packages/turf-point-to-line-distance/test/out/city-segment-obtuse2.geojson +++ b/packages/turf-point-to-line-distance/test/out/city-segment-obtuse2.geojson @@ -36,7 +36,7 @@ [-6.032947456831202, 37.43865587540591], [-6.03411600325615, 37.438463651480795], [-6.035276362073334, 37.438242367104564], - [-6.036427386880658, 37.43799224091489], + [-6.036427386880657, 37.43799224091489], [-6.037567940530723, 37.437713520043985], [-6.038696896257897, 37.437406479873545], [-6.039813138794942, 37.4370714237617], @@ -44,26 +44,26 @@ [-6.04200308733949, 37.43631861519681], [-6.0430746301857825, 37.435901606498845], [-6.044129135661999, 37.43545806863238], - [-6.045165562299424, 37.43498843978332], + [-6.045165562299424, 37.434988439783304], [-6.0461828865465685, 37.434493183905204], - [-6.0471801037821455, 37.4339727902595], - [-6.0481562293090505, 37.43342777293063], + [-6.047180103782144, 37.4339727902595], + [-6.04815622930905, 37.43342777293063], [-6.049110299328371, 37.432858670316705], [-6.050041371892426, 37.43226604459602], [-6.050948527835923, 37.431650481170145], [-6.051830871684267, 37.431012588083995], - [-6.052687532538163, 37.43035299542358], + [-6.052687532538162, 37.43035299542358], [-6.053517664933593, 37.42967235469195], [-6.054320449676364, 37.428971338164004], [-6.055095094650356, 37.42825063822083], - [-6.055840835598698, 37.427510966664165], - [-6.05655693687711, 37.42675305401172], - [-6.057242692178652, 37.425977648774094], + [-6.055840835598697, 37.427510966664165], + [-6.05655693687711, 37.426753054011705], + [-6.057242692178651, 37.425977648774094], [-6.057897425229177, 37.42518551671394], [-6.058520490452821, 37.42437744008814], [-6.059111273606855, 37.423554216873775], [-6.059669192385302, 37.42271665997863], - [-6.060193696990736, 37.42186559643703], + [-6.060193696990734, 37.42186559643703], [-6.060684270673682, 37.421001866591816], [-6.061140430239141, 37.420126323263275], [-6.061561726519708, 37.41923983090584], @@ -76,28 +76,28 @@ [-6.063504231245609, 37.41280246949063], [-6.063634663506621, 37.41186061484546], [-6.063727782235971, 37.410915970699115], - [-6.063783496941013, 37.40996946938892], - [-6.063801754053343, 37.409022045049824], + [-6.063783496941012, 37.40996946938892], + [-6.063801754053342, 37.409022045049824], [-6.063782536976084, 37.40807463269228], [-6.063725866094653, 37.407128167279446], [-6.06363179875104, 37.4061835828046], [-6.063500429181638, 37.40524181136959], - [-6.063331888418703, 37.40430378226528], + [-6.063331888418702, 37.40430378226528], [-6.063126344155575, 37.403370421055044], [-6.062884000575809, 37.40244264866187], [-6.062605098146403, 37.40152138046032], - [-6.062289913375344, 37.40060752537409], - [-6.061938758533746, 37.39970198497998], + [-6.062289913375343, 37.40060752537409], + [-6.061938758533745, 37.39970198497998], [-6.061551981342863, 37.3988056526193], [-6.061129964626304, 37.3979194125175], [-6.060673125927819, 37.39704413891295], - [-6.06018191709504, 37.39618069519561], + [-6.060181917095039, 37.39618069519561], [-6.059656823829615, 37.39532993305653], [-6.059098365204186, 37.394492691649084], [-6.058507093146716, 37.3936697967625], [-6.057883591892659, 37.3928620600088], - [-6.057228477405559, 37.39207027802373], - [-6.05654239676664, 37.391295231682626], + [-6.057228477405558, 37.39207027802373], + [-6.0565423967666385, 37.391295231682626], [-6.055826027534007, 37.3905376853317], [-6.0550800770720965, 37.38979838603595], [-6.0543052818520495, 37.389078062843936], @@ -110,7 +110,7 @@ [-6.048141689195878, 37.384624265418694], [-6.047165889005906, 37.38407960698643], [-6.046169053206509, 37.383559563415936], - [-6.045152164989438, 37.383064647410045], + [-6.045152164989438, 37.38306464741005], [-6.044116227255172, 37.3825953468889], [-6.043062261625723, 37.38215212451027], [-6.041991307439279, 37.38173541721498], @@ -144,7 +144,7 @@ [-6.009667322931814, 37.38173541721498], [-6.00859636874537, 37.38215212451027], [-6.007542403115921, 37.3825953468889], - [-6.006506465381655, 37.383064647410045], + [-6.006506465381655, 37.38306464741005], [-6.0054895771645835, 37.383559563415936], [-6.004492741365187, 37.38407960698643], [-6.0035169411752145, 37.384624265418694], @@ -158,29 +158,29 @@ [-5.9965785532989955, 37.38979838603595], [-5.995832602837086, 37.3905376853317], [-5.9951162336044534, 37.391295231682626], - [-5.994430152965533, 37.39207027802373], + [-5.994430152965535, 37.39207027802373], [-5.993775038478433, 37.3928620600088], [-5.993151537224376, 37.3936697967625], [-5.992560265166906, 37.394492691649084], [-5.992001806541479, 37.39532993305653], - [-5.991476713276053, 37.39618069519561], + [-5.991476713276054, 37.39618069519561], [-5.990985504443273, 37.39704413891295], [-5.9905286657447885, 37.3979194125175], [-5.99010664902823, 37.3988056526193], - [-5.989719871837346, 37.39970198497998], - [-5.989368716995748, 37.40060752537409], + [-5.989719871837347, 37.39970198497998], + [-5.98936871699575, 37.40060752537409], [-5.989053532224689, 37.40152138046032], [-5.988774629795283, 37.40244264866187], [-5.988532286215518, 37.403370421055044], [-5.988326741952391, 37.40430378226528], [-5.988158201189454, 37.40524181136959], - [-5.988026831620052, 37.4061835828046], + [-5.9880268316200524, 37.4061835828046], [-5.98793276427644, 37.407128167279446], [-5.98787609339501, 37.40807463269228], [-5.987856876317751, 37.409022045049824], [-5.98787513343008, 37.40996946938892], [-5.987930848135122, 37.410915970699115], - [-5.988023966864471, 37.41186061484546], + [-5.988023966864472, 37.41186061484546], [-5.9881543991254835, 37.41280246949063], [-5.988322017585026, 37.413740605015334], [-5.988526658189662, 37.41467409543624], @@ -190,15 +190,15 @@ [-5.989710885556227, 37.41834326475341], [-5.990096903851385, 37.41923983090584], [-5.990518200131952, 37.420126323263275], - [-5.99097435969741, 37.421001866591816], + [-5.990974359697412, 37.421001866591816], [-5.991464933380358, 37.42186559643703], - [-5.99198943798579, 37.42271665997863], + [-5.991989437985791, 37.42271665997863], [-5.992547356764239, 37.423554216873775], [-5.993138139918271, 37.42437744008814], [-5.993761205141915, 37.42518551671394], [-5.994415938192442, 37.425977648774094], - [-5.995101693493983, 37.42675305401172], - [-5.995817794772394, 37.427510966664165], + [-5.995101693493983, 37.426753054011705], + [-5.995817794772396, 37.427510966664165], [-5.996563535720737, 37.42825063822083], [-5.997338180694729, 37.428971338164004], [-5.998140965437501, 37.42967235469195], @@ -208,9 +208,9 @@ [-6.001617258478667, 37.43226604459602], [-6.002548331042723, 37.432858670316705], [-6.003502401062043, 37.43342777293063], - [-6.004478526588947, 37.4339727902595], + [-6.004478526588948, 37.4339727902595], [-6.005475743824523, 37.434493183905204], - [-6.006493068071668, 37.43498843978332], + [-6.006493068071668, 37.434988439783304], [-6.007529494709093, 37.43545806863238], [-6.0085840001853095, 37.435901606498845], [-6.009655543031603, 37.43631861519681], @@ -218,7 +218,7 @@ [-6.0118454915761514, 37.4370714237617], [-6.012961734113197, 37.437406479873545], [-6.014090689840369, 37.437713520043985], - [-6.015231243490434, 37.43799224091489], + [-6.015231243490436, 37.43799224091489], [-6.016382268297759, 37.438242367104564], [-6.017542627114943, 37.438463651480795], [-6.0187111735398915, 37.43865587540591], diff --git a/packages/turf-point-to-line-distance/test/out/distances.json b/packages/turf-point-to-line-distance/test/out/distances.json index 6be35e82b3..8d322e8dfd 100644 --- a/packages/turf-point-to-line-distance/test/out/distances.json +++ b/packages/turf-point-to-line-distance/test/out/distances.json @@ -1,22 +1,22 @@ { - "city-line1": 1.0299686758, - "city-line2": 3.6186172981, - "city-segment-inside1": 1.1489389115, - "city-segment-inside2": 1.0280898152, - "city-segment-inside3": 3.5335695907, + "city-line1": 0.9993988759, + "city-line2": 3.5827706171, + "city-segment-inside1": 1.1444315439, + "city-segment-inside2": 0.9974854079, + "city-segment-inside3": 3.497089823, "city-segment-obtuse1": 2.8573246363, "city-segment-obtuse2": 3.3538913334, "city-segment-projected1": 3.5886611693, "city-segment-projected2": 4.163469898, - "issue-1156": 189.6618028794, - "line-fiji": 27.1266612008, - "line-resolute-bay": 425.0745081528, - "line1": 23.4224834672, - "line2": 188.015686924, - "segment-fiji": 27.6668301762, + "issue-1156": 189.0688047021, + "line-fiji": 26.8418623324, + "line-resolute-bay": 424.8707545895, + "line1": 25.6934928869, + "line2": 188.0655411712, + "segment-fiji": 27.3835094108, "segment1": 69.0934195756, "segment1a": 69.0934195756, "segment2": 69.0934195756, "segment3": 69.0828960461, - "segment4": 332.8803863574 + "segment4": 340.7276874254 } diff --git a/packages/turf-point-to-line-distance/test/out/issue-1156.geojson b/packages/turf-point-to-line-distance/test/out/issue-1156.geojson index 9bb9d7dfc4..b63e46a74c 100644 --- a/packages/turf-point-to-line-distance/test/out/issue-1156.geojson +++ b/packages/turf-point-to-line-distance/test/out/issue-1156.geojson @@ -33,207 +33,207 @@ "type": "Polygon", "coordinates": [ [ - [11.028348, 41.00170566721549], - [11.02827700886751, 41.00170482554991], - [11.02820608780013, 41.001702301383844], - [11.028135306793807, 41.001698097208546], - [11.028064735706222, 41.001692217173336], - [11.027994444187819, 41.00168466708156], - [11.027924501613064, 41.001675454384824], - [11.027854977011954, 41.00166458817562], - [11.027785939001863, 41.00165207917843], - [11.027717455719817, 41.00163793973901], - [11.027649594755225, 41.00162218381236], - [11.027582423083171, 41.00160482694883], - [11.027516006998276, 41.001585886278804], - [11.027450412049278, 41.00156538049577], - [11.027385702974316, 41.00154332983794], - [11.02732194363703, 41.001519756068184], - [11.027259196963524, 41.00149468245259], - [11.027197524880242, 41.00146813373746], - [11.027136988252854, 41.00144013612497], - [11.02707764682617, 41.001410717247204], - [11.02701955916517, 41.00137990613891], - [11.026962782597213, 41.00134773320887], - [11.026907373155424, 41.001314230209864], - [11.026853385523424, 41.001279430207305], - [11.026800872981335, 41.0012433675466], - [11.02674988735321, 41.00120607781931], - [11.026700478955878, 41.00116759782794], - [11.026652696549288, 41.00112796554963], - [11.026606587288397, 41.00108722009871], - [11.026562196676629, 41.00104540168805], - [11.02651956852097, 41.001002551589366], - [11.026478744888745, 41.000958712092505], - [11.026439766066112, 41.00091392646371], - [11.0264026705183, 41.000868238902825], - [11.026367494851664, 41.00082169449983], - [11.026334273777577, 41.00077433919017], - [11.026303040078172, 41.00072621970953], - [11.026273824574002, 41.00067738354764], - [11.02624665609365, 41.00062787890144], - [11.026221561445281, 41.000577754627486], - [11.026198565390201, 41.00052706019374], - [11.026177690618448, 41.00047584563077], - [11.0261589577264, 41.00042416148227], - [11.026142385196481, 41.000372058755346], - [11.026127989378933, 41.000319588870006], - [11.0261157844757, 41.00026680360851], - [11.026105782526429, 41.00021375506425], - [11.026097993396617, 41.00016049559027], - [11.026092424767892, 41.00010707774772], - [11.026089082130442, 41.00005355425388], - [11.026087968777636, 40.99999997793016], - [11.026089085802786, 40.999946401649986], - [11.026092432098084, 40.999892878286616], - [11.026098004355733, 40.99983946066096], - [11.026105797071214, 40.999786201489435], - [11.026115802548752, 40.999733153331974], - [11.02612801090893, 40.999680368540126], - [11.02614241009845, 40.99962789920543], - [11.026158985902066, 40.99957579710793], - [11.026177721956612, 40.9995241136652], - [11.026198599767191, 40.999472899881525], - [11.026221598725423, 40.99942220629756], - [11.026246696129817, 40.99937208294048], - [11.026273867208193, 40.99932257927467], - [11.026303085142123, 40.99927374415279], - [11.026334321093445, 40.99922562576766], - [11.026367544232713, 40.99917827160471], - [11.026402721769646, 40.9991317283951], - [11.02643981898549, 40.99908604206956], - [11.02647879926731, 40.99904125771318], - [11.026519624144107, 40.998997419520826], - [11.026562253324824, 40.99895457075355], - [11.026606644738084, 40.998912753695954], - [11.026652754573739, 40.99887200961443], - [11.026700537326096, 40.998832378716436], - [11.026749945838839, 40.99879390011083], - [11.026800931351556, 40.998756611769316], - [11.026853443547875, 40.99872055048893], - [11.02690743060511, 40.99868575185576], - [11.026962839245407, 40.99865225020982], - [11.02701961478831, 40.9986200786112], - [11.027077701204732, 40.99858926880739], - [11.027137041172233, 40.998559851202046], - [11.027197576131588, 40.998531854824904], - [11.027259246344572, 40.99850530730317], - [11.027321990952899, 40.998480234834275], - [11.027385748038267, 40.99845666216004], - [11.027450454683466, 40.99843461254221], - [11.027516047034444, 40.99841410773956], - [11.027582460363313, 40.99839516798641], - [11.027649629132217, 40.99837781197265], - [11.027717487057982, 40.99836205682531], - [11.027785967177529, 40.99834791809166], - [11.027855001913922, 40.9983354097239], - [11.027924523143062, 40.99832454406533], - [11.027994462260875, 40.998315331838235], - [11.028064750251007, 40.99830778213326], - [11.028135317752923, 40.99830190240051], - [11.028206095130324, 40.9982976984421], - [11.028277012539853, 40.998295174406515], - [11.028348, 40.99829433278449], - [11.028418987460148, 40.998295174406515], - [11.028489904869677, 40.9982976984421], - [11.028560682247077, 40.99830190240051], - [11.028631249748994, 40.99830778213326], - [11.028701537739126, 40.998315331838235], - [11.028771476856939, 40.99832454406533], - [11.028840998086078, 40.9983354097239], - [11.028910032822472, 40.99834791809166], - [11.028978512942018, 40.99836205682531], - [11.029046370867784, 40.99837781197265], - [11.029113539636688, 40.99839516798641], - [11.029179952965556, 40.99841410773956], - [11.029245545316535, 40.99843461254221], - [11.029310251961734, 40.99845666216004], - [11.029374009047102, 40.998480234834275], - [11.029436753655428, 40.99850530730317], - [11.029498423868413, 40.998531854824904], - [11.029558958827767, 40.998559851202046], - [11.029618298795269, 40.99858926880739], - [11.02967638521169, 40.9986200786112], - [11.029733160754592, 40.99865225020982], - [11.02978856939489, 40.99868575185576], - [11.029842556452126, 40.99872055048893], - [11.029895068648445, 40.998756611769316], - [11.029946054161162, 40.99879390011083], - [11.029995462673904, 40.998832378716436], - [11.030043245426262, 40.99887200961443], - [11.030089355261916, 40.998912753695954], - [11.030133746675176, 40.99895457075355], - [11.030176375855893, 40.998997419520826], - [11.030217200732691, 40.99904125771318], - [11.03025618101451, 40.99908604206956], - [11.030293278230355, 40.9991317283951], - [11.030328455767288, 40.99917827160471], - [11.030361678906555, 40.99922562576766], - [11.030392914857877, 40.99927374415279], - [11.030422132791807, 40.99932257927467], - [11.03044930387018, 40.99937208294048], - [11.030474401274578, 40.99942220629756], - [11.03049740023281, 40.999472899881525], - [11.030518278043388, 40.9995241136652], - [11.030537014097934, 40.99957579710793], - [11.030553589901551, 40.99962789920543], - [11.03056798909107, 40.999680368540126], - [11.030580197451249, 40.999733153331974], - [11.030590202928787, 40.999786201489435], - [11.030597995644268, 40.99983946066096], - [11.030603567901917, 40.999892878286616], - [11.030606914197215, 40.999946401649986], - [11.030608031222364, 40.99999997793016], - [11.030606917869559, 41.00005355425388], - [11.030603575232108, 41.00010707774772], - [11.030598006603382, 41.00016049559027], - [11.030590217473572, 41.00021375506425], - [11.030580215524301, 41.00026680360851], - [11.030568010621067, 41.000319588870006], - [11.03055361480352, 41.000372058755346], - [11.0305370422736, 41.00042416148227], - [11.030518309381552, 41.00047584563077], - [11.0304974346098, 41.00052706019374], - [11.03047443855472, 41.000577754627486], - [11.030449343906351, 41.00062787890144], - [11.030422175425999, 41.00067738354764], - [11.030392959921828, 41.00072621970953], - [11.030361726222424, 41.00077433919017], - [11.030328505148336, 41.00082169449983], - [11.030293329481701, 41.000868238902825], - [11.030256233933889, 41.00091392646371], - [11.030217255111255, 41.000958712092505], - [11.030176431479031, 41.001002551589366], - [11.030133803323372, 41.00104540168805], - [11.030089412711604, 41.00108722009871], - [11.030043303450713, 41.00112796554963], - [11.029995521044123, 41.00116759782794], - [11.02994611264679, 41.00120607781931], - [11.029895127018666, 41.0012433675466], - [11.029842614476577, 41.001279430207305], - [11.029788626844576, 41.001314230209864], - [11.029733217402788, 41.00134773320887], - [11.02967644083483, 41.00137990613891], - [11.02961835317383, 41.001410717247204], - [11.029559011747146, 41.00144013612497], - [11.029498475119759, 41.00146813373746], - [11.029436803036477, 41.00149468245259], - [11.02937405636297, 41.001519756068184], - [11.029310297025685, 41.00154332983794], - [11.029245587950722, 41.00156538049577], - [11.029179993001724, 41.001585886278804], - [11.02911357691683, 41.00160482694883], - [11.029046405244776, 41.00162218381236], - [11.028978544280184, 41.00163793973901], - [11.028910060998138, 41.00165207917843], - [11.028841022988047, 41.00166458817562], - [11.028771498386936, 41.001675454384824], - [11.028701555812182, 41.00168466708156], - [11.028631264293779, 41.001692217173336], - [11.02856069320619, 41.001698097208546], - [11.02848991219987, 41.001702301383844], - [11.02841899113249, 41.00170482554991], - [11.028348, 41.00170566721549] + [11.028348, 41.001700334262125], + [11.028277230834702, 41.001699495228166], + [11.028206531515425, 41.0016969789544], + [11.028135971819244, 41.00169278792424], + [11.028065621385396, 41.001686926274076], + [11.027995549646542, 41.00167939978909], + [11.027925825760216, 41.00167021589756], + [11.027856518540556, 41.00165938366361], + [11.027787696390387, 41.001646913778124], + [11.027719427233672, 41.0016328185483], + [11.027651778448476, 41.00161711188547], + [11.027584816800456, 41.001599809291385], + [11.027518608376942, 41.001580927842845], + [11.027453218521709, 41.001560486174895], + [11.027388711770469, 41.00153850446246], + [11.027325151787169, 41.00151500440036], + [11.027262601301155, 41.00149000918192], + [11.027201122045236, 41.001463543476085], + [11.027140774694773, 41.00143563340309], + [11.027081618807765, 41.001406306508606], + [11.027023712766072, 41.001375591736625], + [11.0269671137178, 41.00134351940081], + [11.026911877520886, 41.00131012115467], + [11.02685805868796, 41.00127542996022], + [11.026805710332564, 41.00123948005549], + [11.02675488411671, 41.00120230692073], + [11.026705630199904, 41.00116394724338], + [11.026657997189647, 41.00112443888183], + [11.02661203209346, 41.00108382082812], + [11.0265677802725, 41.001042133169356], + [11.026525285396792, 41.00099941704823], + [11.026484589402138, 41.000955714622336], + [11.02644573244874, 41.00091106902263], + [11.02640875288158, 41.0008655243108], + [11.026373687192562, 41.00081912543576], + [11.026340569984544, 41.00077191818941], + [11.026309433937174, 41.00072394916124], + [11.026280309774657, 41.00067526569253], + [11.026253226235456, 41.000625915829495], + [11.026228210043925, 41.000575948275944], + [11.026205285883982, 41.00052541234516], + [11.026184476374725, 41.00047435791128], + [11.026165802048165, 41.00042283535999], + [11.026149281328955, 41.000370895538865], + [11.026134930516237, 41.00031858970715], + [11.026122763767567, 41.00026596948523], + [11.026112793084977, 41.00021308680358], + [11.026105028303135, 41.000159993851604], + [11.026099477079676, 41.00010674302607], + [11.026096144887642, 41.00005338687943], + [11.026095035010133, 40.99999997806796], + [11.026096148537059, 40.99994656929976], + [11.026099484364101, 40.999893213282775], + [11.026105039193828, 40.99983996267278], + [11.02611280753895, 40.99978687002135], + [11.02612278172778, 40.999733987724106], + [11.02613495191181, 40.999681367968904], + [11.026149306075453, 40.9996290626844], + [11.026165830047919, 40.99957712348877], + [11.026184507517234, 40.99952560163884], + [11.026205320046339, 40.99947454797938], + [11.026228247091312, 40.999424012893066], + [11.02625326602166, 40.999374046250686], + [11.026280352142663, 40.9993246973619], + [11.02630947871977, 40.9992760149267], + [11.026340617005, 40.999228046987206], + [11.026373736265304, 40.999180840880406], + [11.02640880381294, 40.999134443191316], + [11.02644578503772, 40.99908889970711], + [11.026484643441192, 40.9990442553719], + [11.02652534067265, 40.99900055424234], + [11.026567836567018, 40.998957839444316], + [11.026612089184466, 40.998916153130175], + [11.026658054851827, 40.9988755364373], + [11.026705688205693, 40.99883602944746], + [11.026754942237186, 40.99879767114722], + [11.026805768338354, 40.99876049938958], + [11.026858116350143, 40.998724550856544], + [11.02691193461189, 40.99868986102294], + [11.026967170012318, 40.9986564641214], + [11.027023768041932, 40.9986243931087], + [11.027081672846816, 40.99859367963307], + [11.027140827283754, 40.99856435400307], + [11.0272011729766, 40.9985364451577], + [11.027262650373896, 40.99850998063781], + [11.027325198807622, 40.99848498655893], + [11.027388756553066, 40.9984614875855], + [11.027453260889713, 40.998439506906564], + [11.027518648163147, 40.99841906621288], + [11.027584853847843, 40.998400185675486], + [11.027651812610834, 40.99838288392586], + [11.027719458376177, 40.99836717803748], + [11.027787724390139, 40.998353083509016], + [11.027856543287053, 40.99834061424906], + [11.027925847155789, 40.99832978256227], + [11.027995567606759, 40.99832059913748], + [11.02806563583937, 40.998313073036876], + [11.028135982709935, 40.99830721168727], + [11.028206538799854, 40.998303020872655], + [11.028277234484115, 40.99830050472853], + [11.028348, 40.99829966573786], + [11.028418765515886, 40.99830050472853], + [11.028489461200147, 40.998303020872655], + [11.028560017290065, 40.99830721168727], + [11.02863036416063, 40.998313073036876], + [11.028700432393242, 40.99832059913748], + [11.028770152844212, 40.99832978256227], + [11.028839456712948, 40.99834061424906], + [11.028908275609862, 40.998353083509016], + [11.028976541623821, 40.99836717803748], + [11.029044187389166, 40.99838288392586], + [11.029111146152157, 40.998400185675486], + [11.029177351836854, 40.99841906621288], + [11.029242739110288, 40.998439506906564], + [11.029307243446935, 40.9984614875855], + [11.029370801192378, 40.99848498655893], + [11.029433349626105, 40.99850998063781], + [11.0294948270234, 40.9985364451577], + [11.029555172716247, 40.99856435400307], + [11.029614327153183, 40.99859367963307], + [11.029672231958068, 40.9986243931087], + [11.029728829987683, 40.9986564641214], + [11.02978406538811, 40.99868986102294], + [11.029837883649858, 40.998724550856544], + [11.029890231661646, 40.99876049938958], + [11.029941057762814, 40.99879767114722], + [11.029990311794307, 40.99883602944746], + [11.030037945148173, 40.9988755364373], + [11.030083910815534, 40.998916153130175], + [11.030128163432982, 40.998957839444316], + [11.03017065932735, 40.99900055424234], + [11.030211356558809, 40.9990442553719], + [11.03025021496228, 40.99908889970711], + [11.03028719618706, 40.999134443191316], + [11.030322263734696, 40.999180840880406], + [11.030355382995001, 40.999228046987206], + [11.03038652128023, 40.9992760149267], + [11.030415647857337, 40.9993246973619], + [11.03044273397834, 40.999374046250686], + [11.030467752908688, 40.999424012893066], + [11.030490679953662, 40.99947454797938], + [11.030511492482766, 40.99952560163884], + [11.030530169952081, 40.99957712348877], + [11.030546693924547, 40.9996290626844], + [11.03056104808819, 40.999681367968904], + [11.03057321827222, 40.999733987724106], + [11.03058319246105, 40.99978687002135], + [11.030590960806173, 40.99983996267278], + [11.0305965156359, 40.999893213282775], + [11.030599851462942, 40.99994656929976], + [11.030600964989867, 40.99999997806796], + [11.030599855112358, 41.00005338687943], + [11.030596522920325, 41.00010674302607], + [11.030590971696865, 41.000159993851604], + [11.030583206915024, 41.00021308680358], + [11.030573236232433, 41.00026596948523], + [11.030561069483763, 41.00031858970715], + [11.030546718671046, 41.000370895538865], + [11.030530197951835, 41.00042283535999], + [11.030511523625275, 41.00047435791128], + [11.030490714116018, 41.00052541234516], + [11.030467789956075, 41.000575948275944], + [11.030442773764545, 41.000625915829495], + [11.030415690225343, 41.00067526569253], + [11.030386566062827, 41.00072394916124], + [11.030355430015456, 41.00077191818941], + [11.030322312807439, 41.00081912543576], + [11.030287247118421, 41.0008655243108], + [11.03025026755126, 41.00091106902263], + [11.030211410597863, 41.000955714622336], + [11.030170714603207, 41.00099941704823], + [11.0301282197275, 41.001042133169356], + [11.03008396790654, 41.00108382082812], + [11.030038002810352, 41.00112443888183], + [11.029990369800096, 41.00116394724338], + [11.02994111588329, 41.00120230692073], + [11.029890289667437, 41.00123948005549], + [11.02983794131204, 41.00127542996022], + [11.029784122479114, 41.00131012115467], + [11.0297288862822, 41.00134351940081], + [11.029672287233929, 41.001375591736625], + [11.029614381192236, 41.001406306508606], + [11.029555225305227, 41.00143563340309], + [11.029494877954765, 41.001463543476085], + [11.029433398698846, 41.00149000918192], + [11.029370848212832, 41.00151500440036], + [11.029307288229532, 41.00153850446246], + [11.029242781478292, 41.001560486174895], + [11.029177391623058, 41.001580927842845], + [11.029111183199545, 41.001599809291385], + [11.029044221551525, 41.00161711188547], + [11.028976572766329, 41.0016328185483], + [11.028908303609613, 41.001646913778124], + [11.028839481459444, 41.00165938366361], + [11.028770174239785, 41.00167021589756], + [11.028700450353458, 41.00167939978909], + [11.028630378614604, 41.001686926274076], + [11.028560028180756, 41.00169278792424], + [11.028489468484576, 41.0016969789544], + [11.028418769165299, 41.001699495228166], + [11.028348, 41.001700334262125] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/line-fiji.geojson b/packages/turf-point-to-line-distance/test/out/line-fiji.geojson index 8ae6591cfc..e74a446ef2 100644 --- a/packages/turf-point-to-line-distance/test/out/line-fiji.geojson +++ b/packages/turf-point-to-line-distance/test/out/line-fiji.geojson @@ -43,207 +43,207 @@ "type": "Polygon", "coordinates": [ [ - [-180.46142578124994, -17.237716136273125], - [-180.4694489667334, -17.23783635318522], - [-180.47746426577237, -17.23819688575123], - [-180.48546379958304, -17.23879737957517], - [-180.49343970469613, -17.239637244379622], - [-180.5013841405959, -17.240715654579297], - [-180.50928929733868, -17.24203155008315], - [-180.51714740314276, -17.2435836373245], - [-180.5249507319425, -17.245370390518072], - [-180.5326916109009, -17.247390053142794], - [-180.5403624278719, -17.249640639649073], - [-180.54795563880714, -17.252119937388876], - [-180.55546377509896, -17.254825508766803], - [-180.56287945085356, -17.257754693610256], - [-180.57019537008736, -17.260904611756388], - [-180.57740433383952, -17.2642721658535], - [-180.5844992471944, -17.267854044374246], - [-180.59147312620675, -17.27164672483778], - [-180.59831910472406, -17.275646477238002], - [-180.6050304410982, -17.2798493676745], - [-180.61160052478164, -17.284251262182945], - [-180.61802288280035, -17.288847830761267], - [-180.62429118609856, -17.293634551587918], - [-180.63039925574822, -17.29860671542819], - [-180.63634106901807, -17.303759430224503], - [-180.64211076529563, -17.309087625866365], - [-180.647702651857, -17.314586059135436], - [-180.6531112094788, -17.320249318821176], - [-180.65833109788596, -17.326071831002103], - [-180.66335716103123, -17.332047864487798], - [-180.66818443220012, -17.338171536416453], - [-180.67280813893683, -17.344436818002666], - [-180.6772237077857, -17.350837540430064], - [-180.68142676884412, -17.35736740088313], - [-180.68541316012127, -17.364019968712544], - [-180.68917893169947, -17.370788691728084], - [-180.69272034969245, -17.377666902613203], - [-180.6960338999977, -17.384647825455055], - [-180.6991162918379, -17.391724582383755], - [-180.70196446108855, -17.39889020031458], - [-180.70457557338736, -17.406137617786484], - [-180.7069470270228, -17.413459691890523], - [-180.70907645559822, -17.420849205281385], - [-180.7109617304682, -17.428298873265348], - [-180.71260096294532, -17.435801350957743], - [-180.71399250627363, -17.443349240503025], - [-180.71513495736733, -17.450935098350467], - [-180.71602715831207, -17.458551442578326], - [-180.716668197627, -17.466190760259444], - [-180.71705741128588, -17.47384551486101], - [-180.71719438349587, -17.48150815367129], - [-180.71707894723272, -17.48917111524603], - [-180.71671118453085, -17.49682683686723], - [-180.7160914265288, -17.50446776200696], - [-180.71522025326772, -17.51208634778879], - [-180.71409849324436, -17.51967507243959], - [-180.71272722271718, -17.527226442724167], - [-180.7111077647666, -17.53473300135552], - [-180.7092416881095, -17.542187334373207], - [-180.70713080566836, -17.54958207848257], - [-180.70477717289668, -17.556909928347487], - [-180.70218308586146, -17.564163643829236], - [-180.69935107908398, -17.57133605716445], - [-180.69628392314095, -17.578420080074682], - [-180.69298462202767, -17.58540871080065], - [-180.68945641028614, -17.592295041053934], - [-180.68570274989912, -17.599072262879186], - [-180.68172732695456, -17.605733675419824], - [-180.67753404808178, -17.612272691580447], - [-180.6731270366641, -17.618682844579105], - [-180.66851062883006, -17.624957794382837], - [-180.66368936922768, -17.63109133401984], - [-180.65866800658554, -17.637077395761892], - [-180.653451489065, -17.642910057170653], - [-180.64804495940717, -17.64858354700163], - [-180.64245374988099, -17.654092250959817], - [-180.63668337703524, -17.659430717301007], - [-180.63073953626102, -17.664593662273052], - [-180.62462809616972, -17.669575975391442], - [-180.61835509279175, -17.674372724543744], - [-180.6119267236015, -17.678979160917613], - [-180.60534934137596, -17.683390723747305], - [-180.59862944789083, -17.687603044873697], - [-180.591773687463, -17.691611953113128], - [-180.58478884034344, -17.6954134784305], - [-180.5776818159696, -17.699003855912256], - [-180.57045964608236, -17.70237952953516], - [-180.5631294777152, -17.705537155726866], - [-180.55569856606348, -17.70847360671458], - [-180.5481742672399, -17.71118597365835], - [-180.54056403092468, -17.713671569565623], - [-180.53287539291765, -17.71592793198409], - [-180.5251159675996, -17.71795282546992], - [-180.51729344031196, -17.719744243828863], - [-180.509415559661, -17.721300412127803], - [-180.50149012975658, -17.722619788474688], - [-180.4935250023914, -17.723701065564917], - [-180.48552806917135, -17.724543171992632], - [-180.47750725360277, -17.725145273325467], - [-180.4694705031472, -17.72550677294161], - [-180.46142578124994, -17.725627312628383], - [-180.45338105935272, -17.72550677294161], - [-180.44534430889715, -17.725145273325467], - [-180.43732349332856, -17.724543171992632], - [-180.4293265601085, -17.723701065564917], - [-180.42136143274334, -17.722619788474688], - [-180.41343600283892, -17.721300412127803], - [-180.40555812218798, -17.719744243828863], - [-180.39773559490033, -17.71795282546992], - [-180.38997616958227, -17.71592793198409], - [-180.38228753157523, -17.713671569565623], - [-180.37467729526003, -17.71118597365835], - [-180.36715299643643, -17.70847360671458], - [-180.35972208478472, -17.705537155726866], - [-180.35239191641756, -17.70237952953516], - [-180.3451697465303, -17.699003855912256], - [-180.33806272215648, -17.6954134784305], - [-180.33107787503693, -17.691611953113128], - [-180.32422211460909, -17.687603044873697], - [-180.31750222112396, -17.683390723747305], - [-180.31092483889842, -17.678979160917613], - [-180.3044964697082, -17.674372724543744], - [-180.2982234663302, -17.669575975391442], - [-180.29211202623895, -17.664593662273052], - [-180.28616818546473, -17.659430717301007], - [-180.28039781261896, -17.654092250959817], - [-180.27480660309277, -17.64858354700163], - [-180.26940007343492, -17.642910057170653], - [-180.26418355591437, -17.637077395761892], - [-180.25916219327223, -17.63109133401984], - [-180.25434093366985, -17.624957794382837], - [-180.2497245258358, -17.618682844579105], - [-180.24531751441813, -17.61227269158045], - [-180.24112423554536, -17.605733675419824], - [-180.2371488126008, -17.599072262879186], - [-180.23339515221377, -17.592295041053934], - [-180.22986694047225, -17.58540871080065], - [-180.22656763935902, -17.578420080074682], - [-180.22350048341593, -17.57133605716445], - [-180.22066847663845, -17.564163643829236], - [-180.21807438960323, -17.556909928347487], - [-180.21572075683156, -17.54958207848257], - [-180.21360987439041, -17.542187334373207], - [-180.2117437977333, -17.53473300135552], - [-180.21012433978277, -17.527226442724167], - [-180.2087530692556, -17.51967507243959], - [-180.2076313092322, -17.51208634778879], - [-180.20676013597114, -17.50446776200696], - [-180.20614037796906, -17.49682683686723], - [-180.20577261526725, -17.48917111524603], - [-180.20565717900405, -17.48150815367129], - [-180.20579415121404, -17.47384551486101], - [-180.20618336487294, -17.466190760259444], - [-180.20682440418784, -17.458551442578326], - [-180.20771660513262, -17.450935098350467], - [-180.2088590562263, -17.443349240503025], - [-180.2102505995546, -17.435801350957743], - [-180.21188983203172, -17.428298873265348], - [-180.2137751069017, -17.420849205281385], - [-180.2159045354771, -17.413459691890523], - [-180.21827598911258, -17.406137617786484], - [-180.22088710141136, -17.39889020031458], - [-180.22373527066202, -17.391724582383755], - [-180.22681766250224, -17.384647825455055], - [-180.23013121280746, -17.377666902613203], - [-180.23367263080044, -17.370788691728084], - [-180.23743840237864, -17.364019968712544], - [-180.24142479365582, -17.35736740088313], - [-180.2456278547142, -17.350837540430064], - [-180.25004342356308, -17.344436818002666], - [-180.2546671302998, -17.338171536416453], - [-180.2594944014687, -17.332047864487798], - [-180.26452046461395, -17.326071831002103], - [-180.26974035302112, -17.320249318821176], - [-180.2751489106429, -17.314586059135436], - [-180.28074079720432, -17.309087625866365], - [-180.28651049348184, -17.303759430224503], - [-180.2924523067517, -17.29860671542819], - [-180.29856037640135, -17.293634551587918], - [-180.30482867969957, -17.288847830761267], - [-180.31125103771828, -17.284251262182945], - [-180.31782112140172, -17.2798493676745], - [-180.32453245777586, -17.275646477238002], - [-180.33137843629316, -17.27164672483778], - [-180.33835231530554, -17.267854044374246], - [-180.3454472286604, -17.2642721658535], - [-180.35265619241258, -17.260904611756388], - [-180.35997211164639, -17.257754693610256], - [-180.36738778740096, -17.254825508766803], - [-180.37489592369278, -17.252119937388876], - [-180.382489134628, -17.249640639649073], - [-180.390159951599, -17.247390053142794], - [-180.3979008305574, -17.245370390518072], - [-180.40570415935716, -17.2435836373245], - [-180.41356226516123, -17.24203155008315], - [-180.42146742190405, -17.240715654579297], - [-180.4294118578038, -17.239637244379622], - [-180.43738776291687, -17.23879737957517], - [-180.44538729672755, -17.23819688575123], - [-180.4534025957665, -17.23783635318522], - [-180.46142578124994, -17.237716136273125] + [-180.46142578124994, -17.240277390492903], + [-180.46936484304584, -17.240396346922275], + [-180.4772961007639, -17.240753099274347], + [-180.48521175790825, -17.241347296854627], + [-180.49310403313993, -17.24217835555094], + [-180.50096516783762, -17.24324545840104], + [-180.5087874336378, -17.244547556386543], + [-180.51656313994602, -17.246083369452382], + [-180.5242846414141, -17.24785138775095], + [-180.53194434537474, -17.24984987310963], + [-180.53953471922722, -17.252076860720518], + [-180.54704829776773, -17.254530161050603], + [-180.5544776904568, -17.257207361970732], + [-180.56181558861732, -17.260105831101328], + [-180.56905477255668, -17.263222718372766], + [-180.5761881186057, -17.26655495879784], + [-180.58320860606855, -17.27009927545395], + [-180.59010932407662, -17.273852182672087], + [-180.5968834783394, -17.27780998942964], + [-180.6035243977876, -17.281968802944004], + [-180.61002554109984, -17.286324532463365], + [-180.6163805031093, -17.290872893251425], + [-180.62258302108157, -17.295609410762054], + [-180.6286269808602, -17.30052942500015], + [-180.63450642287182, -17.30562809506449], + [-180.64021554798686, -17.31090040386842], + [-180.64574872322854, -17.316341163033805], + [-180.65110048732618, -17.321945017953723], + [-180.65626555610592, -17.327706453019154], + [-180.66123882771433, -17.33361979700461], + [-180.66601538767003, -17.33967922860772], + [-180.6705905137371, -17.345878782137483], + [-180.6749596806169, -17.35221235334582], + [-180.679118564452, -17.35867370539684], + [-180.6830630471393, -17.36525647496817], + [-180.6867892204463, -17.37195417847861], + [-180.69029338992743, -17.378760218435993], + [-180.6935720786359, -17.3856678898994], + [-180.6966220306272, -17.392670387049353], + [-180.69944021425025, -17.399760809859877], + [-180.70202382522362, -17.40693217086581], + [-180.704370289492, -17.414177402019078], + [-180.7064772658613, -17.42148936162711], + [-180.70834264840803, -17.42886084136689], + [-180.7099645686612, -17.43628457336771], + [-180.71134139755407, -17.443753237355864], + [-180.7124717471426, -17.4512594678543], + [-180.71335447208946, -17.458795861430197], + [-180.71398867091133, -17.466354983983532], + [-180.71437368698756, -17.473929378069325], + [-180.7145091093291, -17.48151157024661], + [-180.7143947731061, -17.48909407844673], + [-180.7140307599338, -17.496669419353907], + [-180.71341739791492, -17.504230115790666], + [-180.7125552614394, -17.511768704100913], + [-180.71144517073958, -17.519277741523407], + [-180.71008819120252, -17.52674981354817], + [-180.70848563243783, -17.534177541248784], + [-180.70663904710327, -17.541553588583003], + [-180.70455022948732, -17.548870669654665], + [-180.70222121385044, -17.55612155592948], + [-180.69965427252586, -17.563299083397556], + [-180.69685191378215, -17.570396159675497], + [-180.69381687944755, -17.577405771040873], + [-180.69055214229982, -17.58432098939205], + [-180.68706090322277, -17.591134979126373], + [-180.68334658813217, -17.597841003929666], + [-180.67941284467358, -17.604432433470283], + [-180.67526353869545, -17.61090274999088], + [-180.6709027504999, -17.617245554791175], + [-180.66633477087564, -17.62345457459518], + [-180.66156409691555, -17.629523667796327], + [-180.656595427624, -17.63544683057422], + [-180.65143365931675, -17.641218202876583], + [-180.6460838808192, -17.64683207426048], + [-180.6405513684663, -17.652282889586647], + [-180.63484158091012, -17.657565254561153], + [-180.62896015373903, -17.662673941118705], + [-180.62291289391453, -17.66760389264194], + [-180.61670577403123, -17.67235022901143], + [-180.6103449264049, -17.67690825148113], + [-180.6038366369954, -17.68127344737417], + [-180.59718733917006, -17.685441494594215], + [-180.59040360731393, -17.689408265947566], + [-180.58349215029327, -17.693169833271693], + [-180.57645980477912, -17.696722471365714], + [-180.56931352843756, -17.700062661718835], + [-180.5620603929937, -17.703187096032828], + [-180.55470757717654, -17.70609267953485], + [-180.5472623595519, -17.708776534077177], + [-180.53973211125097, -17.71123600102051], + [-180.5321242886019, -17.713468643898], + [-180.52444642567184, -17.715472250857022], + [-180.5167061267279, -17.71724483687624], + [-180.50891105862408, -17.718784645755594], + [-180.50106894312256, -17.72009015187715], + [-180.4931875491574, -17.72116006173491], + [-180.48527468504858, -17.721993315231995], + [-180.47733819067463, -17.722589086743906], + [-180.46938592961206, -17.722946785946597], + [-180.46142578124994, -17.7230660584086], + [-180.45346563288786, -17.722946785946597], + [-180.44551337182529, -17.722589086743906], + [-180.43757687745133, -17.721993315231995], + [-180.42966401334252, -17.72116006173491], + [-180.42178261937735, -17.72009015187715], + [-180.41394050387584, -17.718784645755594], + [-180.406145435772, -17.71724483687624], + [-180.3984051368281, -17.715472250857022], + [-180.39072727389805, -17.713468643898], + [-180.38311945124894, -17.71123600102051], + [-180.37558920294802, -17.708776534077177], + [-180.3681439853234, -17.70609267953485], + [-180.36079116950623, -17.703187096032828], + [-180.35353803406235, -17.700062661718835], + [-180.3463917577208, -17.696722471365714], + [-180.33935941220665, -17.693169833271693], + [-180.33244795518598, -17.689408265947566], + [-180.32566422332988, -17.685441494594215], + [-180.31901492550452, -17.68127344737417], + [-180.31250663609504, -17.67690825148113], + [-180.30614578846868, -17.67235022901143], + [-180.29993866858538, -17.66760389264194], + [-180.29389140876094, -17.662673941118705], + [-180.2880099815898, -17.65756525456116], + [-180.2823001940336, -17.652282889586647], + [-180.27676768168072, -17.64683207426048], + [-180.27141790318316, -17.641218202876583], + [-180.2662561348759, -17.63544683057422], + [-180.26128746558436, -17.629523667796335], + [-180.25651679162434, -17.62345457459518], + [-180.25194881200002, -17.617245554791175], + [-180.24758802380447, -17.61090274999088], + [-180.24343871782634, -17.604432433470283], + [-180.23950497436775, -17.597841003929666], + [-180.23579065927714, -17.591134979126373], + [-180.2322994202001, -17.58432098939205], + [-180.22903468305236, -17.577405771040873], + [-180.22599964871776, -17.570396159675497], + [-180.22319728997405, -17.563299083397556], + [-180.22063034864954, -17.55612155592948], + [-180.2183013330126, -17.548870669654665], + [-180.21621251539665, -17.541553588583007], + [-180.2143659300621, -17.534177541248784], + [-180.2127633712974, -17.52674981354817], + [-180.21140639176033, -17.519277741523407], + [-180.2102963010605, -17.511768704100913], + [-180.209434164585, -17.504230115790666], + [-180.20882080256612, -17.496669419353907], + [-180.2084567893938, -17.48909407844673], + [-180.20834245317081, -17.48151157024661], + [-180.20847787551236, -17.473929378069325], + [-180.20886289158858, -17.466354983983532], + [-180.20949709041045, -17.458795861430197], + [-180.21037981535733, -17.4512594678543], + [-180.21151016494585, -17.443753237355864], + [-180.2128869938387, -17.43628457336771], + [-180.21450891409188, -17.42886084136689], + [-180.2163742966386, -17.421489361627113], + [-180.2184812730079, -17.414177402019078], + [-180.2208277372763, -17.40693217086581], + [-180.22341134824967, -17.399760809859877], + [-180.22622953187272, -17.392670387049353], + [-180.22927948386402, -17.3856678898994], + [-180.23255817257248, -17.378760218435993], + [-180.23606234205363, -17.37195417847861], + [-180.2397885153606, -17.36525647496817], + [-180.2437329980479, -17.35867370539684], + [-180.24789188188308, -17.35221235334582], + [-180.25226104876282, -17.345878782137483], + [-180.25683617482989, -17.33967922860772], + [-180.2616127347856, -17.333619797004612], + [-180.266586006394, -17.327706453019154], + [-180.27175107517374, -17.321945017953723], + [-180.27710283927138, -17.316341163033805], + [-180.28263601451306, -17.31090040386842], + [-180.2883451396281, -17.30562809506449], + [-180.29422458163972, -17.30052942500015], + [-180.30026854141835, -17.295609410762054], + [-180.30647105939065, -17.290872893251425], + [-180.31282602140007, -17.286324532463365], + [-180.31932716471232, -17.281968802944004], + [-180.3259680841605, -17.27780998942964], + [-180.3327422384233, -17.273852182672087], + [-180.33964295643136, -17.27009927545395], + [-180.34666344389422, -17.26655495879784], + [-180.35379678994323, -17.263222718372766], + [-180.3610359738826, -17.260105831101328], + [-180.36837387204312, -17.257207361970732], + [-180.37580326473218, -17.254530161050603], + [-180.3833168432727, -17.252076860720518], + [-180.39090721712518, -17.24984987310963], + [-180.3985669210858, -17.24785138775095], + [-180.4062884225539, -17.246083369452382], + [-180.41406412886215, -17.244547556386543], + [-180.4218863946623, -17.24324545840104], + [-180.42974752936, -17.24217835555094], + [-180.43763980459167, -17.241347296854627], + [-180.445555461736, -17.240753099274347], + [-180.45348671945408, -17.240396346922275], + [-180.46142578124994, -17.240277390492903] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/line-resolute-bay.geojson b/packages/turf-point-to-line-distance/test/out/line-resolute-bay.geojson index ec7b5fae7d..35527d3861 100644 --- a/packages/turf-point-to-line-distance/test/out/line-resolute-bay.geojson +++ b/packages/turf-point-to-line-distance/test/out/line-resolute-bay.geojson @@ -32,207 +32,207 @@ "type": "Polygon", "coordinates": [ [ - [-7.734374999999999, 76.58896947044825], - [-8.565720507947528, 76.58459589000853], - [-9.394827295761186, 76.57148785002632], - [-10.219476075449865, 76.54968332729258], - [-11.037486004363705, 76.51924519552904], - [-11.84673287728093, 76.48026060483248], - [-12.645166127698092, 76.43284013407973], - [-13.430824314781718, 76.37711673635576], - [-14.20184882941389, 76.31324450168619], - [-14.956495617204236, 76.2413972645798], - [-15.693144784629656, 76.1617670860392], - [-16.410308023018505, 76.07456264076048], - [-17.106633850627155, 75.98000754025617], - [-17.78091073277376, 75.87833862169754], - [-18.432068191742072, 75.76980423050766], - [-19.059176060507465, 75.6546625223105], - [-19.661442066530345, 75.53317980691935], - [-20.23820795383663, 75.40562895380798], - [-20.788944363835387, 75.27228787510721], - [-21.31324469872945, 75.13343809876127], - [-21.81081818716753, 74.98936344117884], - [-22.281482361356233, 74.84034878562716], - [-22.725155139636392, 74.68667896981177], - [-23.141846689939516, 74.52863778361052], - [-23.531651228861485, 74.36650707580992], - [-23.89473888946148, 74.2005659669334], - [-24.23134776925473, 74.03109016384366], - [-24.54177624897226, 73.85835137072439], - [-24.82637565306844, 73.68261679027025], - [-25.08554330505635, 73.50414870840613], - [-25.319716014775356, 73.32320415557626], - [-25.529364020754848, 73.14003463755945], - [-25.714985398936903, 72.95488592883842], - [-25.87710093909102, 72.76799792174856], - [-26.016249482168575, 72.57960452492307], - [-26.13298370544275, 72.3899336049125], - [-26.22786633738183, 72.19920696526381], - [-26.301466780616792, 72.00764035777823], - [-26.354358118905267, 71.81544352111393], - [-26.387114482480417, 71.62282024234528], - [-26.40030874544185, 71.42996843752687], - [-26.39451052874422, 71.23708024772989], - [-26.370284482735656, 71.04434214741563], - [-26.32818882397663, 70.85193506238261], - [-26.268774102130145, 70.66003449486858], - [-26.192582173975108, 70.46881065370478], - [-26.100145362984772, 70.2784285877081], - [-25.991985784376972, 70.08904832075665], - [-25.86861481703755, 69.9008249872283], - [-25.730532705206485, 69.71390896669094], - [-25.578228274272597, 69.52844601691696], - [-25.412178746426935, 69.34457740445973], - [-25.23284964326189, 69.16244003217145], - [-25.04069476366529, 68.98216656316824], - [-24.836156226539764, 68.80388554085711], - [-24.61966456897227, 68.62772150473242], - [-24.391638891493066, 68.45379510173196], - [-24.152487042990312, 68.2822231930106], - [-23.902605838695827, 68.11311895604857], - [-23.642381305430064, 67.94659198206155], - [-23.37218894899185, 67.78274836872042], - [-23.092394039211445, 67.62169080822358], - [-22.80335190875219, 67.46351867079295], - [-22.505408262256058, 67.30832808368798], - [-22.198899492884177, 67.15621200585004], - [-21.884153003709763, 67.00726029830433], - [-21.561487531783296, 66.86155979045813], - [-21.231213473010975, 66.71919434244082], - [-20.893633206271847, 66.58024490363863], - [-20.54904141545152, 66.44478956757952], - [-20.197725408291483, 66.31290362332571], - [-19.839965431149245, 66.18465960353197], - [-19.47603497893564, 66.06012732932675], - [-19.106201099646402, 65.93937395217114], - [-18.73072469303663, 65.82246399284824], - [-18.349860803101453, 65.70945937773172], - [-17.96385890412679, 65.60041947247876], - [-17.572963180160126, 65.49540111328758], - [-17.177412797827383, 65.3944586358556], - [-16.77744217248646, 65.29764390216832], - [-16.373281227764707, 65.205006325245], - [-15.965155648575195, 65.11659289196024], - [-15.55328712774873, 65.03244818405646], - [-15.137893606453373, 64.95261439745575], - [-14.719189508603641, 64.87713135997429], - [-14.297385969487049, 64.8060365475368], - [-13.872691058857152, 64.73936509898316], - [-13.445309998760438, 64.67714982955293], - [-13.015445376379827, 64.61942124312901], - [-12.583297352190083, 64.56620754331533], - [-12.14906386373068, 64.5175346434181], - [-11.712940825311085, 64.47342617539529], - [-11.275122323969624, 64.43390349783279], - [-10.8358008120136, 64.3989857030009], - [-10.395167296472561, 64.36868962303974], - [-9.953411525800593, 64.34302983531603], - [-9.510722174166295, 64.32201866698973], - [-9.067287023671575, 64.3056661988227], - [-8.623293144842146, 64.2939802682576], - [-8.178927075733814, 64.28696647178896], - [-7.734375, 64.28462816664452], - [-7.289822924266181, 64.28696647178896], - [-6.845456855157856, 64.2939802682576], - [-6.401462976328421, 64.3056661988227], - [-5.958027825833712, 64.32201866698973], - [-5.515338474199408, 64.34302983531603], - [-5.0735827035274355, 64.36868962303974], - [-4.632949187986407, 64.3989857030009], - [-4.1936276760303715, 64.43390349783279], - [-3.755809174688923, 64.47342617539529], - [-3.319686136269315, 64.5175346434181], - [-2.885452647809921, 64.56620754331533], - [-2.453304623620177, 64.61942124312901], - [-2.023440001239565, 64.67714982955293], - [-1.5960589411428492, 64.73936509898316], - [-1.171364030512957, 64.8060365475368], - [-0.7495604913963594, 64.87713135997429], - [-0.33085639354664187, 64.95261439745573], - [0.08453712774872568, 65.03244818405646], - [0.4964056485751929, 65.11659289196024], - [0.904531227764706, 65.205006325245], - [1.308692172486462, 65.29764390216832], - [1.7086627978273798, 65.3944586358556], - [2.1042131801601265, 65.49540111328758], - [2.4951089041267913, 65.60041947247876], - [2.8811108031014516, 65.70945937773172], - [3.2619746930366276, 65.82246399284824], - [3.6374510996464045, 65.93937395217114], - [4.00728497893564, 66.06012732932675], - [4.371215431149242, 66.18465960353197], - [4.728975408291485, 66.31290362332571], - [5.080291415451518, 66.44478956757952], - [5.424883206271845, 66.58024490363863], - [5.762463473010976, 66.71919434244082], - [6.092737531783276, 66.86155979045813], - [6.41540300370976, 67.00726029830433], - [6.730149492884181, 67.15621200585002], - [7.036658262256069, 67.30832808368801], - [7.3346019087521945, 67.46351867079295], - [7.6236440392114275, 67.62169080822356], - [7.9034389489918535, 67.78274836872042], - [8.173631305430066, 67.94659198206155], - [8.433855838695827, 68.11311895604857], - [8.683737042990295, 68.2822231930106], - [8.922888891493065, 68.45379510173196], - [9.150914568972269, 68.62772150473242], - [9.367406226539766, 68.80388554085711], - [9.57194476366529, 68.98216656316824], - [9.76409964326188, 69.16244003217142], - [9.94342874642694, 69.34457740445973], - [10.109478274272595, 69.52844601691696], - [10.261782705206485, 69.71390896669094], - [10.39986481703757, 69.90082498722833], - [10.523235784376979, 70.08904832075665], - [10.63139536298477, 70.2784285877081], - [10.723832173975111, 70.46881065370478], - [10.800024102130147, 70.66003449486858], - [10.859438823976632, 70.85193506238261], - [10.901534482735663, 71.04434214741563], - [10.92576052874422, 71.23708024772989], - [10.931558745441855, 71.42996843752687], - [10.918364482480424, 71.62282024234528], - [10.885608118905262, 71.81544352111393], - [10.832716780616781, 72.00764035777821], - [10.759116337381815, 72.1992069652638], - [10.664233705442753, 72.3899336049125], - [10.547499482168583, 72.57960452492307], - [10.408350939091015, 72.76799792174856], - [10.246235398936895, 72.9548859288384], - [10.060614020754857, 73.14003463755945], - [9.850966014775356, 73.32320415557626], - [9.616793305056357, 73.50414870840613], - [9.35762565306844, 73.68261679027025], - [9.073026248972264, 73.85835137072436], - [8.762597769254748, 74.03109016384366], - [8.425988889461488, 74.2005659669334], - [8.062901228861481, 74.36650707580992], - [7.673096689939509, 74.52863778361052], - [7.25640513963641, 74.68667896981177], - [6.812732361356233, 74.84034878562716], - [6.342068187167544, 74.98936344117884], - [5.84449469872944, 75.13343809876127], - [5.320194363835403, 75.27228787510721], - [4.769457953836645, 75.40562895380798], - [4.192692066530346, 75.53317980691935], - [3.5904260605074683, 75.6546625223105], - [2.963318191742083, 75.76980423050766], - [2.3121607327737674, 75.87833862169751], - [1.6378838506271571, 75.98000754025617], - [0.941558023018506, 76.07456264076048], - [0.2243947846296636, 76.1617670860392], - [-0.5122543827957498, 76.2413972645798], - [-1.2669011705860918, 76.31324450168619], - [-2.03792568521828, 76.37711673635576], - [-2.8235838723019038, 76.43284013407973], - [-3.62201712271906, 76.48026060483248], - [-4.431263995636284, 76.51924519552904], - [-5.249273924550138, 76.54968332729258], - [-6.073922704238814, 76.57148785002632], - [-6.903029492052469, 76.58459589000853], - [-7.734374999999999, 76.58896947044825] + [-7.734374999999999, 76.58602051286941], + [-8.565144421331702, 76.581649963564], + [-9.39367789597315, 76.5685510004748], + [-10.217758869539182, 76.5467615511381], + [-11.03520915451126, 76.51634440809259], + [-11.843907086027288, 76.47738660965338], + [-12.641804490235188, 76.42999859411563], + [-13.426942142522716, 76.37431314739187], + [-14.19746344970851, 76.31048416829415], + [-14.95162615449696, 76.23868527888972], + [-15.687811928559064, 76.15910830950726], + [-16.404533788936927, 76.07196168903313], + [-17.100441337800245, 75.9774687711547], + [-17.77432388512998, 75.87586612627433], + [-18.425111565519206, 75.76740182706286], + [-19.051874602525142, 75.65233375320389], + [-19.653820906145185, 75.53092793797006], + [-20.23029221094424, 75.40345697604236], + [-20.780758974606012, 75.27019850859514], + [-21.30481426012385, 75.13143379826914], + [-21.802166820700865, 74.98744640336622], + [-22.272633596069, 74.83852095751867], + [-22.716131813804385, 74.68494205828752], + [-23.13267087070847, 74.52699326567465], + [-23.522344148726436, 74.36495620941619], + [-23.88532089831963, 74.1991098021686], + [-24.221838300637035, 74.02972955429269], + [-24.532193798994204, 73.85708698486327], + [-24.81673777062464, 73.68144912275741], + [-25.075866591808243, 73.50307809116204], + [-25.310016133536717, 73.32223076856289], + [-25.51965571095902, 73.13915851918941], + [-25.705282497964156, 72.9541069859596], + [-25.867416408339263, 72.76731593916529], + [-26.006595436860078, 72.57901917442733], + [-26.123371447270163, 72.38944445380996], + [-26.21830638920464, 72.19881348438844], + [-26.291968922522372, 72.00734192899687], + [-26.344931425046383, 71.81523944432878], + [-26.377767358189985, 71.6227097420068], + [-26.3910489642081, 71.42995066867377], + [-26.385345268702284, 71.23715430157571], + [-26.36122036239749, 71.04450705650301], + [-26.31923193697851, 70.85218980532848], + [-26.25993005082756, 70.66037800072363], + [-26.183856101757662, 70.4692418059512], + [-26.091541985221046, 70.27894622791919], + [-25.9835094179309, 70.08965125194186], + [-25.860269408323543, 69.90151197688661], + [-25.72232185677262, 69.71467874959397], + [-25.57015526991903, 69.52929729764357], + [-25.40424657488068, 69.34550885970135], + [-25.225061020440684, 69.16345031282765], + [-25.033052153572207, 68.98325429625004], + [-24.82866186083601, 68.80504933121458], + [-24.612320465281737, 68.62895993662265], + [-24.384446870494035, 68.4551067402413], + [-24.145448744352457, 68.28360658534494], + [-23.895722735921858, 68.11457263270424], + [-23.63565471966039, 67.94811445788801], + [-23.3656200618311, 67.7843381438856], + [-23.085983904633974, 67.62334636909146], + [-22.797101464142315, 67.46523849072247], + [-22.49931833863697, 67.31011062376118], + [-22.192970824387114, 67.15805571553719], + [-21.878386236333377, 67.00916361607294], + [-21.555883231490167, 66.86352114433164], + [-21.225772133206036, 66.7212121505131], + [-20.888355254705555, 66.58231757454918], + [-20.543927220587435, 66.44691550095408], + [-20.192775285176197, 66.31508121018659], + [-19.835179646820013, 66.18688722668173], + [-19.471413757398977, 66.06240336370901], + [-19.101744626458718, 65.94169676521116], + [-18.72643311951596, 65.82483194477652], + [-18.345734250197395, 65.71187082189282], + [-17.959897465973864, 65.60287275562763], + [-17.569166927338056, 65.4978945758756], + [-17.173781780350154, 65.39699061230765], + [-16.773976422540343, 65.30021272115302], + [-16.36998076221399, 65.20761030993899], + [-15.962020471253071, 65.11923036030801], + [-15.550317231549254, 65.03511744902674], + [-15.135088975239386, 64.95531376729525], + [-14.71655011894423, 64.87985913845965], + [-14.29491179223713, 64.80879103422565], + [-13.870382060590558, 64.7421445894642], + [-13.443166143067252, 64.67995261569638], + [-13.01346662503737, 64.62224561333706], + [-12.581483666216398, 64.56905178277314], + [-12.14741520432847, 64.52039703434588], + [-11.711457154709219, 64.476304997301], + [-11.273803606168695, 64.4367970277661], + [-10.834647013441227, 64.40189221580822], + [-10.394178386553552, 64.37160739162026], + [-9.952587477446391, 64.34595713087894], + [-9.510062964187535, 64.32495375931235], + [-9.066792633117016, 64.30860735650953], + [-8.622963559266646, 64.29692575900012], + [-8.178762285397463, 64.28991456262607], + [-7.734375, 64.28757712422336], + [-7.289987714602533, 64.28991456262607], + [-6.845786440733357, 64.29692575900012], + [-6.40195736688298, 64.30860735650953], + [-5.958687035812476, 64.32495375931234], + [-5.516162522553611, 64.34595713087894], + [-5.074571613446442, 64.37160739162026], + [-4.634102986558781, 64.40189221580822], + [-4.1949463938313, 64.4367970277661], + [-3.7572928452907877, 64.476304997301], + [-3.321334795671528, 64.52039703434588], + [-2.8872663337836033, 64.56905178277314], + [-2.455283374962631, 64.62224561333706], + [-2.0255838569327484, 64.67995261569638], + [-1.5983679394094443, 64.7421445894642], + [-1.173838207762878, 64.80879103422565], + [-0.7521998810557695, 64.87985913845965], + [-0.33366102476061926, 64.95531376729525], + [0.08156723154925342, 65.03511744902674], + [0.49327047125306617, 65.11923036030801], + [0.9012307622139913, 65.20761030993899], + [1.305226422540347, 65.30021272115302], + [1.7050317803501491, 65.39699061230765], + [2.100416927338057, 65.4978945758756], + [2.4911474659738655, 65.60287275562763], + [2.876984250197395, 65.71187082189282], + [3.2576831195159492, 65.82483194477652], + [3.6329946264587196, 65.94169676521116], + [4.002663757398979, 66.06240336370901], + [4.366429646820011, 66.18688722668173], + [4.7240252851761975, 66.31508121018659], + [5.075177220587435, 66.44691550095408], + [5.419605254705557, 66.58231757454918], + [5.757022133206036, 66.7212121505131], + [6.087133231490147, 66.86352114433163], + [6.4096362363333785, 67.00916361607294], + [6.7242208243871175, 67.15805571553719], + [7.030568338636973, 67.31011062376118], + [7.32835146414232, 67.46523849072247], + [7.617233904633974, 67.62334636909146], + [7.896870061831097, 67.7843381438856], + [8.166904719660394, 67.94811445788801], + [8.42697273592186, 68.11457263270424], + [8.676698744352455, 68.28360658534494], + [8.915696870494015, 68.45510674024129], + [9.143570465281739, 68.62895993662265], + [9.359911860836013, 68.80504933121458], + [9.564302153572209, 68.98325429625004], + [9.756311020440668, 69.16345031282762], + [9.93549657488068, 69.34550885970135], + [10.101405269919033, 69.52929729764357], + [10.253571856772629, 69.71467874959399], + [10.391519408323544, 69.90151197688661], + [10.514759417930899, 70.08965125194186], + [10.622791985221047, 70.27894622791919], + [10.715106101757662, 70.4692418059512], + [10.791180050827563, 70.66037800072363], + [10.850481936978513, 70.85218980532848], + [10.892470362397502, 71.04450705650301], + [10.916595268702286, 71.23715430157571], + [10.922298964208107, 71.42995066867377], + [10.909017358189985, 71.6227097420068], + [10.87618142504638, 71.81523944432878], + [10.823218922522384, 72.00734192899687], + [10.749556389204642, 72.19881348438844], + [10.654621447270172, 72.38944445380996], + [10.537845436860067, 72.5790191744273], + [10.398666408339263, 72.76731593916529], + [10.236532497964165, 72.9541069859596], + [10.050905710959007, 73.13915851918938], + [9.841266133536719, 73.32223076856289], + [9.607116591808248, 73.50307809116204], + [9.34798777062464, 73.68144912275741], + [9.063443798994196, 73.85708698486324], + [8.753088300637033, 74.02972955429266], + [8.416570898319637, 74.1991098021686], + [8.05359414872643, 74.36495620941619], + [7.663920870708464, 74.52699326567465], + [7.247381813804389, 74.68494205828752], + [6.803883596069004, 74.83852095751867], + [6.333416820700874, 74.98744640336622], + [5.836064260123846, 75.13143379826914], + [5.3120089746060275, 75.27019850859514], + [4.7615422109442616, 75.40345697604236], + [4.185070906145185, 75.53092793797006], + [3.5831246025251478, 75.65233375320389], + [2.9563615655192175, 75.76740182706286], + [2.3055738851299945, 75.87586612627433], + [1.6316913378002462, 75.9774687711547], + [0.9357837889369279, 76.07196168903313], + [0.21906192855907122, 76.15910830950726], + [-0.5171238455030263, 76.23868527888972], + [-1.2712865502914739, 76.31048416829415], + [-2.041807857477285, 76.37431314739187], + [-2.8269455097648057, 76.42999859411563], + [-3.6248429139727043, 76.47738660965338], + [-4.433540845488731, 76.51634440809256], + [-5.2509911304608226, 76.5467615511381], + [-6.075072104026851, 76.5685510004748], + [-6.903605578668295, 76.581649963564], + [-7.734374999999999, 76.58602051286941] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/line1.geojson b/packages/turf-point-to-line-distance/test/out/line1.geojson index a72646bf93..4e241c6881 100644 --- a/packages/turf-point-to-line-distance/test/out/line1.geojson +++ b/packages/turf-point-to-line-distance/test/out/line1.geojson @@ -39,207 +39,207 @@ "type": "Polygon", "coordinates": [ [ - [-47.08740234375, 32.607552757551154], - [-47.10004279529611, 32.607384853786485], - [-47.11267063079758, 32.60688131008067], - [-47.125273247229835, 32.606042629025275], - [-47.13783806759333, 32.60486964769641], - [-47.15035255388805, 32.60336353679045], - [-47.1628042200425, 32.60152579941582], - [-47.175180644782266, 32.599358269541646], - [-47.18746948442292, 32.596863110105645], - [-47.19965848557271, 32.594042810783066], - [-47.211735497730245, 32.59090018541944], - [-47.22368848576261, 32.58743836913025], - [-47.23550554224979, 32.58366081507059], - [-47.247174899681085, 32.579571290878874], - [-47.258684942489836, 32.5751738747986], - [-47.27002421891281, 32.570472951482586], - [-47.28118145266096, 32.565473207484615], - [-47.29214555438853, 32.56017962644375], - [-47.30290563294781, 32.55459748396667], - [-47.3134510064173, 32.54873234221409], - [-47.32377121289113, 32.542590044197325], - [-47.33385602101826, 32.5361767077917], - [-47.34369544028022, 32.529498719473224], - [-47.35327973099639, 32.52256272778623], - [-47.36259941404675, 32.51537563654874], - [-47.37164528030169, 32.50794459780371], - [-47.38040839974975, 32.50027700452373], - [-47.38888013031382, 32.49238048307762], - [-47.39705212634748, 32.48426288546703], - [-47.40491634680305, 32.475932281341954], - [-47.412465063063756, 32.46739694980377], - [-47.41969086643281, 32.458665371004905], - [-47.42658667527254, 32.44974621755442], - [-47.433145741787406, 32.44064834573878], - [-47.43936165844511, 32.43138078656739], - [-47.445228364030335, 32.421952736652585], - [-47.450740149326585, 32.41237354893395], - [-47.4558916624216, 32.40265272325683], - [-47.46067791363254, 32.39279989681508], - [-47.46509428004764, 32.38282483446831], - [-47.469136509681384, 32.37273741894368], - [-47.47280072524092, 32.36254764093269], - [-47.47608342750157, 32.352265589093165], - [-47.478981498290196, 32.34190143996702], - [-47.481492203075256, 32.33146544782402], - [-47.483613193163045, 32.32096793444212], - [-47.485342507499986, 32.31041927883478], - [-47.48667857408129, 32.29982990693572], - [-47.48762021096667, 32.28921028125157], - [-47.488166626904324, 32.27857089049278], - [-47.48831742156476, 32.26792223919314], - [-47.488072585386284, 32.25727483732836], - [-47.48743249903458, 32.24663918994387], - [-47.48639793247912, 32.23602578680198], - [-47.4849700436894, 32.225445092058806], - [-47.483150376954335, 32.21490753398054], - [-47.48094086082884, 32.20442349470959], - [-47.47834380571136, 32.19400330008974], - [-47.47536190105696, 32.18365720956086], - [-47.4719982122306, 32.17339540613199], - [-47.46825617700552, 32.16322798644281], - [-47.464139601712205, 32.15316495092261], - [-47.45965265704316, 32.14321619405611], - [-47.454799873519626, 32.13339149476495], - [-47.44958613662602, 32.123700506913984], - [-47.444016681618464, 32.114152749950996], - [-47.438097088013926, 32.10475759968847], - [-47.43183327376663, 32.09552427923559], - [-47.4252314891386, 32.08646185008917], - [-47.41829831027164, 32.07757920339088], - [-47.411040632467625, 32.06888505135919], - [-47.40346566318502, 32.060387918903366], - [-47.39558091475882, 32.05209613542702], - [-47.38739419685198, 32.04401782682853], - [-47.378913608645945, 32.03616090770529], - [-47.370147530778596, 32.02853307376859], - [-47.36110461703744, 32.02114179447594], - [-47.351793785816675, 32.01399430588688], - [-47.34222421134609, 32.0070976037489], - [-47.33240531470075, 32.00045843681896], - [-47.32234675459947, 31.994083300426666], - [-47.31205841800134, 31.987978430284613], - [-47.301550410508504, 31.982149796550793], - [-47.29083304658433, 31.976603098148587], - [-47.279916839595735, 31.971343757348823], - [-47.26881249168865, 31.966376914618607], - [-47.25753088350543, 31.96170742374114], - [-47.24608306375366, 31.95733984721081], - [-47.23448023863495, 31.953278451907174], - [-47.222733761143346, 31.949527205051567], - [-47.21085512024209, 31.946089770449706], - [-47.19885592992836, 31.942969505023378], - [-47.1867479181949, 31.940169455634017], - [-47.17454291589806, 31.937692356200937], - [-47.162252845541296, 31.935540625116506], - [-47.14988970998381, 31.93371636296032], - [-47.13746558108327, 31.932221350514443], - [-47.12499258828221, 31.931057047081236], - [-47.112482907147616, 31.930224589105027], - [-47.099948747872574, 31.929724789099087], - [-47.08740234375, 31.929558134878377], - [-47.07485593962742, 31.929724789099087], - [-47.06232178035238, 31.930224589105027], - [-47.04981209921778, 31.931057047081236], - [-47.03733910641674, 31.932221350514443], - [-47.02491497751618, 31.93371636296032], - [-47.0125518419587, 31.935540625116506], - [-47.000261771601934, 31.937692356200937], - [-46.988056769305096, 31.940169455634017], - [-46.975948757571636, 31.942969505023378], - [-46.963949567257906, 31.946089770449706], - [-46.95207092635665, 31.949527205051567], - [-46.94032444886504, 31.953278451907174], - [-46.928721623746334, 31.95733984721081], - [-46.91727380399456, 31.96170742374114], - [-46.90599219581134, 31.966376914618607], - [-46.89488784790426, 31.971343757348823], - [-46.88397164091566, 31.976603098148587], - [-46.87325427699149, 31.982149796550793], - [-46.86274626949865, 31.987978430284613], - [-46.85245793290052, 31.994083300426666], - [-46.84239937279924, 32.00045843681896], - [-46.8325804761539, 32.0070976037489], - [-46.82301090168332, 32.01399430588688], - [-46.81370007046255, 32.02114179447594], - [-46.8046571567214, 32.02853307376859], - [-46.79589107885405, 32.03616090770529], - [-46.787410490648014, 32.04401782682853], - [-46.779223772741176, 32.05209613542702], - [-46.771339024314976, 32.060387918903366], - [-46.76376405503237, 32.06888505135919], - [-46.756506377228355, 32.07757920339088], - [-46.74957319836139, 32.08646185008917], - [-46.74297141373337, 32.09552427923559], - [-46.73670759948607, 32.10475759968847], - [-46.73078800588153, 32.114152749950996], - [-46.725218550873976, 32.123700506913984], - [-46.72000481398037, 32.13339149476495], - [-46.715152030456835, 32.14321619405611], - [-46.71066508578779, 32.15316495092261], - [-46.70654851049447, 32.16322798644281], - [-46.70280647526939, 32.17339540613199], - [-46.699442786443036, 32.18365720956086], - [-46.69646088178863, 32.19400330008974], - [-46.693863826671155, 32.20442349470959], - [-46.691654310545665, 32.21490753398054], - [-46.68983464381059, 32.225445092058806], - [-46.68840675502087, 32.23602578680198], - [-46.68737218846541, 32.24663918994387], - [-46.686732102113716, 32.25727483732836], - [-46.686487265935234, 32.26792223919314], - [-46.68663806059567, 32.27857089049278], - [-46.687184476533325, 32.28921028125157], - [-46.688126113418704, 32.29982990693572], - [-46.68946218000001, 32.31041927883478], - [-46.69119149433695, 32.32096793444212], - [-46.69331248442474, 32.33146544782402], - [-46.6958231892098, 32.34190143996702], - [-46.69872125999842, 32.352265589093165], - [-46.70200396225907, 32.36254764093269], - [-46.70566817781861, 32.37273741894368], - [-46.709710407452356, 32.38282483446831], - [-46.714126773867456, 32.39279989681508], - [-46.71891302507839, 32.40265272325683], - [-46.72406453817341, 32.41237354893395], - [-46.72957632346966, 32.421952736652585], - [-46.735443029054885, 32.43138078656739], - [-46.74165894571259, 32.44064834573878], - [-46.748218012227454, 32.44974621755442], - [-46.75511382106719, 32.458665371004905], - [-46.76233962443624, 32.46739694980377], - [-46.769888340696944, 32.475932281341954], - [-46.77775256115251, 32.48426288546703], - [-46.78592455718617, 32.49238048307762], - [-46.794396287750246, 32.50027700452373], - [-46.8031594071983, 32.50794459780371], - [-46.812205273453245, 32.51537563654874], - [-46.8215249565036, 32.52256272778623], - [-46.831109247219786, 32.529498719473224], - [-46.84094866648173, 32.5361767077917], - [-46.85103347460886, 32.542590044197325], - [-46.86135368108269, 32.54873234221409], - [-46.87189905455218, 32.55459748396667], - [-46.88265913311146, 32.56017962644375], - [-46.89362323483903, 32.565473207484615], - [-46.90478046858718, 32.570472951482586], - [-46.91611974501016, 32.5751738747986], - [-46.92762978781891, 32.579571290878874], - [-46.9392991452502, 32.58366081507059], - [-46.951116201737385, 32.58743836913025], - [-46.96306918976975, 32.59090018541944], - [-46.97514620192728, 32.594042810783066], - [-46.98733520307707, 32.596863110105645], - [-46.99962404271773, 32.599358269541646], - [-47.01200046745749, 32.60152579941582], - [-47.024452133611945, 32.60336353679045], - [-47.036966619906664, 32.60486964769641], - [-47.04953144027016, 32.606042629025275], - [-47.06213405670242, 32.60688131008067], - [-47.07476189220389, 32.607384853786485], - [-47.08740234375, 32.607552757551154] + [-47.08740234375, 32.64042143641673], + [-47.10127346855645, 32.64023718553941], + [-47.1151307337655, 32.63968461701659], + [-47.12896029414532, 32.638764282984695], + [-47.14274833317819, 32.63747710303488], + [-47.15648107737497, 32.63582436325958], + [-47.170144810538716, 32.63380771491908], + [-47.183725887960335, 32.63142917273006], + [-47.1972107505298, 32.62869111277777], + [-47.21058593874617, 32.6255962700546], + [-47.22383810661004, 32.62214773562775], + [-47.2369540353822, 32.618348953439515], + [-47.24992064719261, 32.614203716743894], + [-47.2627250184837, 32.60971616418371], + [-47.27535439327287, 32.604890775512885], + [-47.28779619621873, 32.59973236696891], + [-47.30003804547644, 32.594246086300906], + [-47.31206776532763, 32.588437407459196], + [-47.32387339857072, 32.5823121249523], + [-47.33544321865799, 32.57587634787837], + [-47.346765741566145, 32.56913649363756], + [-47.35782973738729, 32.562099281332834], + [-47.36862424162819, 32.554771724866825], + [-47.37913856620556, 32.54716112574254], + [-47.38936231012614, 32.53927506557632], + [-47.39928536984024, 32.531121398331464], + [-47.40889794925877, 32.52270824228142], + [-47.418190569423096, 32.51404397171159], + [-47.42715407781894, 32.505137208369206], + [-47.435779657324865, 32.495996812670704], + [-47.44405883478734, 32.486631874676576], + [-47.4519834892142, 32.47705170484364], + [-47.45954585957953, 32.46726582456507], + [-47.46673855223298, 32.45728395650843], + [-47.47355454790741, 32.44711601476262], + [-47.479987208319244, 32.43677209480405], + [-47.486030282356374, 32.426262463293305], + [-47.49167791184917, 32.41559754771321], + [-47.4969246369205, 32.40478792585926], + [-47.501765400911324, 32.3938443151939], + [-47.50619555487913, 32.38277756207574], + [-47.51021086166648, 32.37159863087521], + [-47.513807499538224, 32.36031859298811], + [-47.516982065385704, 32.34894861575826], + [-47.51973157749738, 32.33749995132124], + [-47.522053477895334, 32.32598392538018], + [-47.52394563423802, 32.314411925925484], + [-47.52540634128973, 32.302795391909946], + [-47.52643432195814, 32.291145801890494], + [-47.52702872790106, 32.279474662648305], + [-47.52718913970502, 32.267793497798536], + [-47.52691556663752, 32.25611383640092], + [-47.52620844597631, 32.24444720158274], + [-47.52506864191863, 32.232805099184986], + [-47.523497444074295, 32.221199006443236], + [-47.52149656554652, 32.20964036071381], + [-47.51906814060502, 32.19814054825641], + [-47.516214721956025, 32.18671089308372], + [-47.51293927761439, 32.175362645888825], + [-47.50924518738325, 32.1641069730608], + [-47.50513623894677, 32.15295494579877], + [-47.50061662358228, 32.141917529334776], + [-47.49569093149787, 32.13100557227531], + [-47.4903641468021, 32.120229796071406], + [-47.48464164211274, 32.10960078462706], + [-47.47852917281149, 32.099128974055326], + [-47.47203287095196, 32.08882464259141], + [-47.46515923882863, 32.07869790067208], + [-47.4579151422142, 32.068758681189884], + [-47.450307803273525, 32.05901672993127], + [-47.44234479316206, 32.049481596206924], + [-47.43403402431709, 32.040162623682534], + [-47.425383742450315, 32.03106894141818], + [-47.41640251825003, 32.022209455124106], + [-47.40709923880202, 32.01359283864043], + [-47.397483098737666, 32.00522752564825], + [-47.387563591118344, 31.99712170161924], + [-47.37735049806526, 31.989283296010594], + [-47.366853881143726, 31.98171997471205], + [-47.35608407151117, 31.974439132751378], + [-47.345051659838354, 31.967447887264438], + [-47.3337674860131, 31.960753070735862], + [-47.32224262863601, 31.95436122451587], + [-47.310488394317794, 31.948278592618767], + [-47.29851630678787, 31.942511115808177], + [-47.28633809582377, 31.93706442597402], + [-47.27396568601127, 31.93194384080584], + [-47.26141118534481, 31.927154358766767], + [-47.24868687367817, 31.92270065437247], + [-47.2358051910352, 31.918587073778742], + [-47.222778725790484, 31.914817630681483], + [-47.209620202729816, 31.911396002532292], + [-47.196342471000484, 31.908325527072844], + [-47.18295849196127, 31.90560919919086], + [-47.16948132694214, 31.903249668100138], + [-47.155924124923665, 31.901249234846954], + [-47.14230011014614, 31.899609850144973], + [-47.1286225696584, 31.898333112540143], + [-47.11490484081644, 31.897420266907393], + [-47.10116029874187, 31.896872203279983], + [-47.08740234375, 31.896689456012812], + [-47.073644388758126, 31.896872203279983], + [-47.05989984668355, 31.897420266907393], + [-47.046182117841596, 31.898333112540143], + [-47.032504577353855, 31.899609850144973], + [-47.01888056257633, 31.901249234846954], + [-47.00532336055785, 31.903249668100138], + [-46.99184619553872, 31.90560919919086], + [-46.97846221649951, 31.908325527072844], + [-46.96518448477018, 31.911396002532292], + [-46.952025961709516, 31.914817630681483], + [-46.938999496464795, 31.918587073778742], + [-46.926117813821826, 31.92270065437247], + [-46.91339350215518, 31.927154358766767], + [-46.90083900148872, 31.93194384080584], + [-46.88846659167622, 31.93706442597402], + [-46.87628838071213, 31.942511115808177], + [-46.8643162931822, 31.948278592618767], + [-46.85256205886398, 31.95436122451587], + [-46.84103720148689, 31.960753070735862], + [-46.82975302766164, 31.967447887264438], + [-46.81872061598882, 31.974439132751378], + [-46.80795080635627, 31.98171997471205], + [-46.79745418943473, 31.989283296010594], + [-46.78724109638165, 31.99712170161924], + [-46.77732158876233, 32.00522752564825], + [-46.767705448697974, 32.01359283864043], + [-46.75840216924997, 32.022209455124106], + [-46.74942094504968, 32.03106894141818], + [-46.7407706631829, 32.040162623682534], + [-46.732459894337936, 32.049481596206924], + [-46.72449688422647, 32.05901672993127], + [-46.716889545285795, 32.068758681189884], + [-46.70964544867136, 32.07869790067208], + [-46.70277181654803, 32.08882464259141], + [-46.6962755146885, 32.09912897405532], + [-46.69016304538725, 32.10960078462706], + [-46.68444054069789, 32.120229796071406], + [-46.679113756002124, 32.13100557227531], + [-46.67418806391771, 32.141917529334776], + [-46.669668448553224, 32.15295494579877], + [-46.66555950011674, 32.1641069730608], + [-46.6618654098856, 32.175362645888825], + [-46.65858996554397, 32.18671089308372], + [-46.65573654689497, 32.19814054825641], + [-46.65330812195347, 32.20964036071381], + [-46.6513072434257, 32.221199006443236], + [-46.64973604558136, 32.232805099184986], + [-46.648596241523684, 32.24444720158274], + [-46.64788912086247, 32.25611383640092], + [-46.64761554779498, 32.267793497798536], + [-46.64777595959893, 32.279474662648305], + [-46.64837036554185, 32.291145801890494], + [-46.64939834621026, 32.302795391909946], + [-46.650859053261975, 32.314411925925484], + [-46.65275120960466, 32.32598392538018], + [-46.65507311000261, 32.33749995132124], + [-46.65782262211429, 32.34894861575826], + [-46.66099718796177, 32.36031859298811], + [-46.664593825833514, 32.37159863087521], + [-46.668609132620865, 32.38277756207574], + [-46.67303928658867, 32.3938443151939], + [-46.677880050579496, 32.40478792585926], + [-46.68312677565082, 32.41559754771321], + [-46.68877440514362, 32.426262463293305], + [-46.69481747918075, 32.43677209480404], + [-46.70125013959258, 32.44711601476262], + [-46.70806613526701, 32.45728395650843], + [-46.715258827920465, 32.46726582456507], + [-46.72282119828579, 32.47705170484364], + [-46.73074585271265, 32.486631874676576], + [-46.73902503017513, 32.495996812670704], + [-46.74765060968105, 32.505137208369206], + [-46.7566141180769, 32.51404397171159], + [-46.76590673824121, 32.52270824228142], + [-46.77551931765975, 32.531121398331464], + [-46.785442377373855, 32.53927506557632], + [-46.79566612129443, 32.54716112574254], + [-46.80618044587181, 32.554771724866825], + [-46.8169749501127, 32.562099281332834], + [-46.82803894593385, 32.56913649363756], + [-46.839361468842, 32.57587634787837], + [-46.850931288929274, 32.5823121249523], + [-46.86273692217236, 32.588437407459196], + [-46.87476664202355, 32.594246086300906], + [-46.887008491281264, 32.59973236696891], + [-46.89945029422712, 32.604890775512885], + [-46.91207966901629, 32.60971616418371], + [-46.92488404030738, 32.614203716743894], + [-46.937850652117795, 32.618348953439515], + [-46.950966580889954, 32.62214773562775], + [-46.96421874875382, 32.6255962700546], + [-46.977593936970194, 32.62869111277777], + [-46.99107879953966, 32.63142917273006], + [-47.00465987696128, 32.63380771491908], + [-47.01832361012502, 32.63582436325958], + [-47.0320563543218, 32.63747710303488], + [-47.04584439335467, 32.638764282984695], + [-47.059673953734496, 32.63968461701659], + [-47.07353121894354, 32.64023718553941], + [-47.08740234375, 32.64042143641673] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/line2.geojson b/packages/turf-point-to-line-distance/test/out/line2.geojson index 9a6873c76a..b29276c9b9 100644 --- a/packages/turf-point-to-line-distance/test/out/line2.geojson +++ b/packages/turf-point-to-line-distance/test/out/line2.geojson @@ -32,207 +32,207 @@ "type": "Polygon", "coordinates": [ [ - [-0.54931640625, 2.4379125045090944], - [-0.6024680811718864, 2.4370776021100875], - [-0.6555671499469493, 2.434573721965201], - [-0.7085610593959559, 2.430403344391717], - [-0.7613973622143863, 2.424570600455717], - [-0.8140237697587477, 2.417081267781545], - [-0.866388204651997, 2.4079427646921445], - [-0.9184388531483708, 2.397164142687321], - [-0.970124217198431, 2.384756077268992], - [-1.0213931661557571, 2.370730857124428], - [-1.0721949880674704, 2.3551023716804385], - [-1.1224794404916256, 2.337886097043359], - [-1.1721968007854822, 2.3190990803415485], - [-1.2212979158097326, 2.298759922488963], - [-1.269734250994938, 2.276888759390121], - [-1.3174579387176804, 2.2535072416085202], - [-1.3644218259352834, 2.228638512522269], - [-1.4105795210293786, 2.202307184992278], - [-1.4558854398100847, 2.1745393165699713], - [-1.500294850634117, 2.1453623832729596], - [-1.5437639185917544, 2.114805251958577], - [-1.5862497487192546, 2.082898151326555], - [-1.6277104281949808, 2.04967264158345], - [-1.6681050674792408, 2.015161582802671], - [-1.7073938403595912, 1.9793991020151571], - [-1.7455380228650963, 1.9424205590668708], - [-1.7825000310148233, 1.9042625112803346], - [-1.818243457367611, 1.864962676958419], - [-1.8527331063419108, 1.8245598977695254], - [-1.8859350282762557, 1.78309410005416], - [-1.9178165522026267, 1.7406062550937038], - [-1.9483463173067053, 1.6971383383829115], - [-1.977494303050669, 1.6527332879483547], - [-2.0052318579358133, 1.6074349617556527], - [-2.031531726883911, 1.5612880942488854], - [-2.0563680772177406, 1.5143382520661188], - [-2.0797165232227717, 1.4666317889754177], - [-2.101554149273413, 1.4182158000761445], - [-2.1218595315086817, 1.3691380753107218], - [-2.1406127580435057, 1.319447052332355], - [-2.1577954477031747, 1.269191768774503], - [-2.1733907672697352, 1.2184218139681504], - [-2.1873834472303373, 1.1671872801531338], - [-2.199759796018695, 1.1155387132299794], - [-2.21050771274196, 1.0635270630988625], - [-2.219616698386366, 1.011203633632418], - [-2.2270778654960517, 0.9586200323292603], - [-2.2328839463204524, 0.9058281196951382], - [-2.237029299426619, 0.8528799583987133], - [-2.239509914773756, 0.7998277622490026], - [-2.2403234172481623, 0.7467238450415469], - [-2.239469068657671, 0.6936205693203679], - [-2.236947768185504, 0.640570295102784], - [-2.232762051304362, 0.5876253286141169], - [-2.226916087152384, 0.5348378710792969], - [-2.2194156743734683, 0.4822599676183073], - [-2.210268235425294, 0.42994345629235675], - [-2.1994828093592407, 0.3779399173475685], - [-2.1870700430772785, 0.326300622702901], - [-2.173042181071763, 0.27507648572886534], - [-2.1574130536550222, 0.2243180113634987], - [-2.1401980636865137, 0.17407524661189558], - [-2.1214141718063315, 0.1243977314754103], - [-2.1010798801848076, 0.07533445035646162], - [-2.0792152147990253, 0.026933783984650184], - [-2.0558417062481027, -0.020756538090360082], - [-2.0309823691202302, -0.06768948439401304], - [-2.004661679925627, -0.11381876776520426], - [-1.9769055536107423, -0.1590988908932702], - [-1.9477413186703028, -0.2034851911094607], - [-1.9171976908750947, -0.2469338843891599], - [-1.8853047456346876, -0.2894021085215684], - [-1.8520938890157033, -0.3308479654040562], - [-1.8175978274376363, -0.3712305624189564], - [-1.7818505360696901, -0.4105100528511453], - [-1.7448872259535837, -0.4486476753054216], - [-1.7067443098788158, -0.48560579208335736], - [-1.6674593670384001, -0.5213479264800894], - [-1.627071106494681, -0.5558387989622965], - [-1.5856193294864103, -0.589044362189471], - [-1.543144890609887, -0.6209318348415435], - [-1.4996896579085575, -0.6514697342168717], - [-1.4552964719070818, -0.6806279075656702], - [-1.4100091036274884, -0.7083775621250551], - [-1.3638722116266215, -0.7346912938230417], - [-1.3169312980956502, -0.7595431146200674], - [-1.269232664063968, -0.7829084784578952], - [-1.2208233637512975, -0.8047643057871081], - [-1.1717511581132978, -0.8250890066458043], - [-1.122064467627401, -0.8438625022635657], - [-1.0718123243669102, -0.8610662451663147], - [-1.0210443234127835, -0.8766832377592036], - [-0.9698105736536442, -0.8906980493663565], - [-0.918161648025814, -0.9030968317079119], - [-0.8661485332461469, -0.9138673327965587], - [-0.8138225790914895, -0.9229989092375023], - [-0.7612354472794202, -0.9304825369176022], - [-0.7084390600057546, -0.9363108200712463], - [-0.6554855481949545, -0.9404779987123931], - [-0.6024271995201526, -0.9429799544240963], - [-0.5493164062500002, -0.943814214498735], - [-0.49620561297984705, -0.9429799544240963], - [-0.44314726430504586, -0.9404779987123931], - [-0.39019375249424504, -0.9363108200712463], - [-0.33739736522058117, -0.9304825369176023], - [-0.2848102334085111, -0.9229989092375024], - [-0.23248427925385282, -0.9138673327965585], - [-0.18047116447418723, -0.9030968317079123], - [-0.12882223884635546, -0.8906980493663565], - [-0.07758848908721784, -0.8766832377592041], - [-0.026820488133089387, -0.8610662451663147], - [0.023431655127400253, -0.8438625022635661], - [0.07311834561329729, -0.8250890066458045], - [0.1221905512512972, -0.8047643057871084], - [0.1705998515639674, -0.7829084784578955], - [0.21829848559564907, -0.7595431146200677], - [0.2652393991266209, -0.7346912938230419], - [0.3113762911274874, -0.7083775621250554], - [0.3566636594070814, -0.6806279075656703], - [0.4010568454085569, -0.651469734216872], - [0.4445120781098864, -0.6209318348415437], - [0.48698651698641043, -0.5890443621894709], - [0.5284382939946805, -0.5558387989622966], - [0.5688265545384, -0.5213479264800898], - [0.6081114973788152, -0.4856057920833575], - [0.6462544134535833, -0.448647675305422], - [0.6832177235696894, -0.4105100528511463], - [0.7189650149376363, -0.3712305624189564], - [0.7534610765157032, -0.3308479654040562], - [0.7866719331346874, -0.2894021085215688], - [0.8185648783750944, -0.24693388438916028], - [0.8491085061703024, -0.2034851911094611], - [0.8782727411107418, -0.15909889089327137], - [0.9060288674256267, -0.11381876776520466], - [0.9323495566202291, -0.06768948439401472], - [0.9572088937481023, -0.02075653809036028], - [0.9805824022990252, 0.026933783984649882], - [1.0024470676848078, 0.07533445035646191], - [1.0227813593063315, 0.12439773147541022], - [1.0415652511865132, 0.17407524661189416], - [1.0587802411550222, 0.2243180113634984], - [1.074409368571763, 0.2750764857288646], - [1.0884372305772783, 0.3263006227029003], - [1.1008499968592407, 0.37793991734756704], - [1.1116354229252934, 0.4299434562923548], - [1.1207828618734683, 0.4822599676183073], - [1.128283274652384, 0.5348378710792979], - [1.1341292388043618, 0.5876253286141175], - [1.1383149556855034, 0.6405702951027824], - [1.140836256157671, 0.6936205693203678], - [1.141690604748162, 0.7467238450415465], - [1.1408771022737556, 0.7998277622490033], - [1.1383964869266194, 0.8528799583987136], - [1.1342511338204528, 0.9058281196951369], - [1.1284450529960521, 0.9586200323292603], - [1.1209838858863657, 1.0112036336324175], - [1.1118749002419597, 1.063527063098862], - [1.101126983518695, 1.11553871322998], - [1.0887506347303377, 1.167187280153132], - [1.074757954769735, 1.2184218139681502], - [1.0591626352031749, 1.2691917687745027], - [1.041979945543506, 1.3194470523323543], - [1.0232267190086815, 1.3691380753107225], - [1.0029213367734133, 1.4182158000761431], - [0.981083710722772, 1.4666317889754175], - [0.9577352647177413, 1.5143382520661186], - [0.9328989143839114, 1.5612880942488845], - [0.9065990454358133, 1.607434961755653], - [0.8788614905506698, 1.652733287948354], - [0.849713504806706, 1.6971383383829102], - [0.8191837397026267, 1.7406062550937034], - [0.7873022157762563, 1.7830941000541594], - [0.7541002938419107, 1.8245598977695257], - [0.7196106448676116, 1.8649626769584182], - [0.6838672185148245, 1.9042625112803335], - [0.6469052103650966, 1.94242055906687], - [0.6087610278595906, 1.9793991020151573], - [0.5694722549792406, 2.015161582802672], - [0.5290776156949819, 2.049672641583449], - [0.48761693621925506, 2.082898151326555], - [0.4451311060917546, 2.1148052519585767], - [0.40166203813411594, 2.1453623832729605], - [0.3572526273100854, 2.1745393165699705], - [0.31194670852937956, 2.2023071849922777], - [0.2657890134352834, 2.228638512522269], - [0.21882512621768077, 2.2535072416085202], - [0.1711014384949387, 2.27688875939012], - [0.12266510330973357, 2.2987599224889625], - [0.07356398828548202, 2.3190990803415485], - [0.023846627991625662, 2.337886097043359], - [-0.026437824432529247, 2.3551023716804385], - [-0.07723964634424221, 2.370730857124428], - [-0.12850859530156805, 2.3847560772689915], - [-0.18019395935162935, 2.397164142687321], - [-0.23224460784800297, 2.4079427646921445], - [-0.28460904274125187, 2.4170812677815445], - [-0.337235450285613, 2.424570600455717], - [-0.3900717531040446, 2.430403344391717], - [-0.44306566255305085, 2.434573721965201], - [-0.49616473132811356, 2.4370776021100875], - [-0.54931640625, 2.4379125045090944] + [-0.54931640625, 2.438360853906383], + [-0.6024821884823875, 2.4375257299107815], + [-0.6555953505408664, 2.435021185197018], + [-0.7086033252337368, 2.4308497007448677], + [-0.761453651273227, 2.4250154087237794], + [-0.8140940260763635, 2.4175240883011684], + [-0.8664723583848871, 2.4083831597811085], + [-0.918536820644496, 2.3976016770804933], + [-0.9702359010842001, 2.3851903185517114], + [-1.0215184554372008, 2.3711613761628683], + [-1.0723337582454635, 2.3555287430484935], + [-1.1226315536909959, 2.3383078994456], + [-1.1723621058978269, 2.3195158970318257], + [-1.2214762486497537, 2.2991713416841977], + [-1.2699254344700748, 2.2772943746788754], + [-1.3176617830108166, 2.253906652353926], + [-1.3646381287002864, 2.2290313242588917], + [-1.4108080675992076, 2.202693009816532], + [-1.456126003417198, 2.174917773523682], + [-1.500547192642893, 2.1457330987196923], + [-1.5440277887426304, 2.115167859952363], + [-1.5865248853842704, 2.083252293972651], + [-1.6279965586444112, 2.050017969390782], + [-1.6684019081589907, 2.0154977550276216], + [-1.7077010971790092, 1.9797257869963656], + [-1.7458553914948676, 1.9427374345507415], + [-1.7828271971945877, 1.9045692647369301], + [-1.8185800972229471, 1.865259005887463], + [-1.8530788867103243, 1.8248455099962235], + [-1.8862896070418036, 1.7833687140145786], + [-1.9181795786388027, 1.7408696001094466], + [-1.9487174324272176, 1.697390154924848], + [-1.977873139967725, 1.6529733278891745], + [-2.005618042225537, 1.6076629886110247], + [-2.031924876958512, 1.561503883407013], + [-2.0567678047040507, 1.514541591005499], + [-2.0801224333467685, 1.4668224774706196], + [-2.101965841250349, 1.4183936503914378], + [-2.1222765989384387, 1.3693029123813978], + [-2.141034789310789, 1.3195987139335887], + [-2.1582220263821714, 1.269330105677625], + [-2.173821472532861, 1.218546690084201], + [-2.187817854260684, 1.167298572663593], + [-2.2001974764258145, 1.115636312704563], + [-2.210948234980604, 1.0636108736002996], + [-2.220059628177812, 1.0112735728081306], + [-2.2275227662516404, 0.9586760314898738], + [-2.233330379566971, 0.9058701238797664], + [-2.237476825233159, 0.8529079264269721], + [-2.239958092179682, 0.7998416667597138], + [-2.2407718046918226, 0.746723672518107], + [-2.239917224405487, 0.6936063201027682], + [-2.2373952507610753, 0.6405419833862738], + [-2.2332084199172253, 0.5875829824345153], + [-2.227360902126057, 0.5347815322849735], + [-2.2198584975724227, 0.4821896918288493], + [-2.2107086306804984, 0.4298593128439665], + [-2.1999203428919025, 0.3778419892252343], + [-2.1875042839204264, 0.3261890064593969], + [-2.1734727014893136, 0.27495129139065133], + [-2.1578394295579604, 0.2241793623235951], + [-2.1406198750458287, 0.17392327950982253], + [-2.1218310030623404, 0.12423259606429113], + [-2.1014913206525128, 0.07515630935739893], + [-2.0796208590691254, 0.026742812928496708], + [-2.0562411545833075, -0.0209601510337049], + [-2.031375227846508, -0.06790553859863824], + [-2.00504756181802, -0.11404705034439946], + [-1.9772840782733807, -0.1593391769067504], + [-1.9481121129102656, -0.20373724378242755], + [-1.9175603890697397, -0.24719745534301005], + [-1.8856589900920955, -0.28967693801605165], + [-1.8524393303278728, -0.33113378259067083], + [-1.817934124826067, -0.3715270856053604], + [-1.7821773577230051, -0.41081698977634795], + [-1.745204249356825, -0.4489647234255117], + [-1.7070512221340721, -0.48593263886750815], + [-1.6677558651764175, -0.5216842497165739], + [-1.6273568977771038, -0.55618426707423], + [-1.5858941316983335, -0.5893986345599906], + [-1.5434084323423756, -0.6212945621481215], + [-1.499941678830813, -0.6518405587744457], + [-1.4555367230279406, -0.6810064636782679], + [-1.4102373475459393, -0.7087634764455751], + [-1.3640882227710518, -0.7350841857208448], + [-1.3171348629515216, -0.7599425965560174], + [-1.269423581389651, -0.7833141563664898], + [-1.2210014447817956, -0.8051757794653138], + [-1.1719162267516028, -0.8255058701482164], + [-1.1222163606232458, -0.8442843443034946], + [-1.0719508914826847, -0.8614926495223957], + [-1.0211694275764018, -0.8771137836871207], + [-0.9699220910981681, -0.8911323120152603], + [-0.918259468415645, -0.9035343825411044], + [-0.8662325597896272, -0.9143077400160166], + [-0.8138927286397571, -0.9234417382117981], + [-0.7612916504113916, -0.930927350612784], + [-0.7084812610991171, -0.9367571794842229], + [-0.6555137054830764, -0.9409254633063813], + [-0.6024412851348326, -0.9434280825656705], + [-0.5493164062500002, -0.9442625638960237], + [-0.496191527365167, -0.9434280825656705], + [-0.44311910701692403, -0.9409254633063813], + [-0.3901515514008824, -0.9367571794842229], + [-0.33734116208860965, -0.9309273506127842], + [-0.2847400838602433, -0.9234417382117984], + [-0.23240025271037248, -0.9143077400160162], + [-0.18037334408435624, -0.9035343825411047], + [-0.1287107214018318, -0.8911323120152603], + [-0.0774633849235993, -0.8771137836871211], + [-0.026681921017314945, -0.8614926495223957], + [0.023583548123245292, -0.8442843443034947], + [0.07328341425160229, -0.8255058701482166], + [0.12236863228179506, -0.805175779465314], + [0.17079076888965078, -0.7833141563664899], + [0.21850205045152063, -0.7599425965560179], + [0.26545541027105135, -0.7350841857208449], + [0.31160453504593866, -0.7087634764455758], + [0.35690391052794, -0.681006463678268], + [0.4013088663308128, -0.651840558774446], + [0.44477561984237557, -0.6212945621481217], + [0.4872613191983335, -0.5893986345599904], + [0.5287240852771032, -0.5561842670742302], + [0.5691230526764172, -0.5216842497165743], + [0.608418409634072, -0.48593263886750837], + [0.6465714368568244, -0.4489647234255121], + [0.683544545223004, -0.41081698977634895], + [0.7193013123260671, -0.3715270856053602], + [0.7538065178278723, -0.33113378259067106], + [0.7870261775920951, -0.28967693801605204], + [0.8189275765697395, -0.24719745534301044], + [0.8494793004102653, -0.20373724378242794], + [0.8786512657733799, -0.1593391769067516], + [0.9064147493180198, -0.11404705034439985], + [0.9327424153465073, -0.06790553859863992], + [0.9576083420833074, -0.020960151033705195], + [0.9809880465691253, 0.026742812928496413], + [1.0028585081525125, 0.07515630935739923], + [1.0231981905623404, 0.12423259606429103], + [1.041987062545828, 0.17392327950982114], + [1.0592066170579602, 0.2241793623235947], + [1.0748398889893134, 0.27495129139065055], + [1.0888714714204262, 0.32618900645939625], + [1.1012875303919023, 0.3778419892252328], + [1.1120758181804982, 0.42985931284396467], + [1.1212256850724227, 0.4821896918288493], + [1.1287280896260568, 0.5347815322849746], + [1.1345756074172253, 0.5875829824345161], + [1.1387624382610755, 0.6405419833862721], + [1.141284411905487, 0.6936063201027682], + [1.1421389921918226, 0.7467236725181067], + [1.1413252796796816, 0.7998416667597144], + [1.1388440127331594, 0.8529079264269723], + [1.134697567066971, 0.9058701238797653], + [1.1288899537516401, 0.9586760314898736], + [1.121426815677812, 1.0112735728081301], + [1.112315422480604, 1.0636108736002992], + [1.1015646639258143, 1.1156363127045634], + [1.089185041760684, 1.1672985726635914], + [1.075188660032861, 1.218546690084201], + [1.0595892138821716, 1.2693301056776245], + [1.042401976810789, 1.319598713933588], + [1.0236437864384382, 1.3693029123813987], + [1.0033330287503495, 1.418393650391436], + [0.9814896208467687, 1.466822477470619], + [0.9581349922040512, 1.5145415910054987], + [0.9332920644585123, 1.561503883407012], + [0.906985229725537, 1.6076629886110254], + [0.8792403274677255, 1.6529733278891738], + [0.8500846199272186, 1.6973901549248465], + [0.8195467661388028, 1.740869600109446], + [0.7876567945418037, 1.783368714014578], + [0.754446074210324, 1.8248455099962237], + [0.7199472847229478, 1.8652590058874616], + [0.6841943846945886, 1.9045692647369288], + [0.6472225789948679, 1.9427374345507409], + [0.6090682846790086, 1.9797257869963665], + [0.5697690956589903, 2.0154977550276216], + [0.5293637461444122, 2.0500179693907814], + [0.48789207288427056, 2.0832522939726505], + [0.4453949762426306, 2.1151678599523627], + [0.4019143801428921, 2.145733098719693], + [0.35749319091719867, 2.1749177735236813], + [0.3121752550992088, 2.2026930098165316], + [0.2660053162002864, 2.2290313242588917], + [0.21902897051081688, 2.2539066523539257], + [0.17129262197007514, 2.277294374678875], + [0.12284343614975474, 2.299171341684197], + [0.07372929339782681, 2.3195158970318257], + [0.023998741190995595, 2.3383078994456], + [-0.026299054254536065, 2.3555287430484935], + [-0.07711435706279837, 2.3711613761628683], + [-0.12839691141579898, 2.3851903185517114], + [-0.180095991855504, 2.3976016770804933], + [-0.23216045411511282, 2.4083831597811085], + [-0.28453878642363617, 2.4175240883011675], + [-0.33717916122677233, 2.425015408723779], + [-0.39002948726626374, 2.4308497007448677], + [-0.44303746195913385, 2.435021185197018], + [-0.49615062401761245, 2.4375257299107815], + [-0.54931640625, 2.438360853906383] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/segment-fiji.geojson b/packages/turf-point-to-line-distance/test/out/segment-fiji.geojson index 229eb2ecc9..b2e2f3c5e9 100644 --- a/packages/turf-point-to-line-distance/test/out/segment-fiji.geojson +++ b/packages/turf-point-to-line-distance/test/out/segment-fiji.geojson @@ -30,207 +30,207 @@ "type": "Polygon", "coordinates": [ [ - [-180.46142578124994, -17.232858286679544], - [-180.469608515055, -17.232980894213192], - [-180.47778320621822, -17.23334859630332], - [-180.48594181990782, -17.233961031534516], - [-180.4940763369049, -17.234817597937823], - [-180.50217876139166, -17.235917453575404], - [-180.5102411287182, -17.237259517358385], - [-180.51825551314045, -17.238842470096998], - [-180.5262140355218, -17.240664755782156], - [-180.53410887099207, -17.24272458309719], - [-180.54193225655584, -17.24501992715844], - [-180.54967649864335, -17.247548531482927], - [-180.55733398059746, -17.250307910181498], - [-180.56489717008887, -17.253295350375165], - [-180.57235862645325, -17.25650791483263], - [-180.5797110079432, -17.259942444826336], - [-180.58694707888802, -17.263595563204532], - [-180.5940597167552, -17.267463677676407], - [-180.60104191910634, -17.271542984307253], - [-180.607886810441, -17.27582947122046], - [-180.61458764892237, -17.28031892250277], - [-180.6211378329781, -17.285006922309204], - [-180.62753090776985, -17.28988885916387], - [-180.63376057152558, -17.294959930452542], - [-180.63982068172857, -17.300215147102815], - [-180.64570526115673, -17.305649338447502], - [-180.65140850376707, -17.31125715726664], - [-180.65692478041882, -17.31703308500338], - [-180.66224864443, -17.322971437148908], - [-180.667374836962, -17.329066368791157], - [-180.67229829222688, -17.335311880322312], - [-180.67701414251155, -17.341701823299495], - [-180.6815177230149, -17.348229906453177], - [-180.685804576492, -17.354889701837614], - [-180.68987045770115, -17.361674651117465], - [-180.6937113376492, -17.36857807198459], - [-180.69732340763036, -17.37559316469895], - [-180.70070308305498, -17.38271301874728], - [-180.70384700706342, -17.3899306196133], - [-180.706752053922, -17.397238855652912], - [-180.7094153321968, -17.404630525067713], - [-180.71183418770184, -17.41209834297028], - [-180.71400620621884, -17.419634948534284], - [-180.71592921598506, -17.427232912222628], - [-180.7176012899464, -17.43488474308656], - [-180.71902074777356, -17.442582896128716], - [-180.72018615763795, -17.450319779722992], - [-180.7210963377464, -17.458087763083963], - [-180.721750357631, -17.465879183778593], - [-180.72214753919457, -17.473686355272967], - [-180.7222874575076, -17.481501574506538], - [-180.72216994135772, -17.489317129486626], - [-180.7217950735492, -17.497125306895583], - [-180.7211631909522, -17.504918399703175], - [-180.72027488430115, -17.512688714776743], - [-180.71913099774198, -17.520428580481482], - [-180.71773262812786, -17.528130354263503], - [-180.716081124064, -17.535786430207956], - [-180.7141780847019, -17.543389246564846], - [-180.71202535828328, -17.550931293235003], - [-180.70962504043524, -17.55840511920867], - [-180.70697947221748, -17.565803339949376], - [-180.7040912379232, -17.57311864471562], - [-180.70096316263525, -17.580343803813005], - [-180.69759830953967, -17.587471675769567], - [-180.69399997699867, -17.594495214427056], - [-180.69017169538586, -17.60140747594094], - [-180.68611722368587, -17.608201625682135], - [-180.68184054586254, -17.614870945033402], - [-180.677345866997, -17.621408838073506], - [-180.67263760920144, -17.627808838142315], - [-180.66772040731064, -17.63406461428022], - [-180.66259910435582, -17.640169977535187], - [-180.65727874682545, -17.646118887131024], - [-180.65176457971677, -17.65190545649058], - [-180.64606204138335, -17.657523959107582], - [-180.6401767581835, -17.66296883426119], - [-180.63411453893482, -17.668234692567264], - [-180.62788136917982, -17.673316321360666], - [-180.62148340526892, -17.678208689903027], - [-180.61492696826662, -17.682906954410562], - [-180.60821853768618, -17.68740646289674], - [-180.60136474506032, -17.691702759824736], - [-180.59437236735306, -17.695791590564877], - [-180.5872483202205, -17.699668905652405], - [-180.57999965112688, -17.703330864841078], - [-180.5726335323227, -17.706773840948475], - [-180.56515725369272, -17.709994423488883], - [-180.55757821548085, -17.712989422089997], - [-180.54990392089888, -17.715755869689904], - [-180.54214196862847, -17.718291025510855], - [-180.53430004522136, -17.72059237780693], - [-180.5263859174088, -17.722657646382423], - [-180.51840742432574, -17.724484784878587], - [-180.51037246965944, -17.726071982826085], - [-180.5022890137298, -17.727417667461175], - [-180.49416506551034, -17.728520505303575], - [-180.4860086745978, -17.729379403494452], - [-180.47782792313902, -17.729993510893028], - [-180.4696309177234, -17.730362218930736], - [-180.46142578124994, -17.73048516222196], - [-180.4532206447765, -17.730362218930736], - [-180.4450236393609, -17.729993510893028], - [-180.43684288790212, -17.729379403494452], - [-180.42868649698963, -17.728520505303575], - [-180.4205625487701, -17.727417667461175], - [-180.41247909284047, -17.726071982826085], - [-180.40444413817417, -17.724484784878587], - [-180.39646564509113, -17.722657646382423], - [-180.3885515172786, -17.72059237780693], - [-180.38070959387144, -17.718291025510855], - [-180.37294764160103, -17.715755869689904], - [-180.3652733470191, -17.712989422089997], - [-180.3576943088072, -17.709994423488883], - [-180.35021803017722, -17.706773840948475], - [-180.34285191137303, -17.703330864841078], - [-180.3356032422794, -17.699668905652405], - [-180.32847919514685, -17.695791590564877], - [-180.3214868174396, -17.691702759824736], - [-180.31463302481373, -17.68740646289674], - [-180.3079245942333, -17.682906954410562], - [-180.301368157231, -17.678208689903027], - [-180.2949701933201, -17.673316321360666], - [-180.2887370235651, -17.668234692567264], - [-180.28267480431643, -17.66296883426119], - [-180.27678952111657, -17.657523959107582], - [-180.27108698278315, -17.65190545649058], - [-180.26557281567446, -17.646118887131024], - [-180.2602524581441, -17.640169977535187], - [-180.2551311551893, -17.63406461428022], - [-180.25021395329847, -17.627808838142315], - [-180.2455056955029, -17.621408838073506], - [-180.24101101663737, -17.614870945033402], - [-180.23673433881405, -17.608201625682135], - [-180.23267986711406, -17.60140747594094], - [-180.22885158550125, -17.594495214427056], - [-180.22525325296024, -17.587471675769567], - [-180.22188839986467, -17.580343803813005], - [-180.21876032457672, -17.57311864471562], - [-180.21587209028243, -17.565803339949376], - [-180.21322652206467, -17.55840511920867], - [-180.21082620421663, -17.550931293235003], - [-180.20867347779802, -17.543389246564846], - [-180.2067704384359, -17.535786430207956], - [-180.20511893437205, -17.528130354263503], - [-180.20372056475793, -17.520428580481482], - [-180.20257667819877, -17.512688714776736], - [-180.2016883715477, -17.504918399703175], - [-180.2010564889507, -17.497125306895583], - [-180.2006816211422, -17.489317129486626], - [-180.2005641049923, -17.481501574506538], - [-180.20070402330535, -17.473686355272967], - [-180.2011012048689, -17.465879183778593], - [-180.20175522475355, -17.458087763083963], - [-180.20266540486196, -17.450319779722992], - [-180.20383081472636, -17.442582896128716], - [-180.20525027255354, -17.43488474308656], - [-180.20692234651486, -17.427232912222628], - [-180.20884535628107, -17.419634948534284], - [-180.21101737479808, -17.41209834297028], - [-180.2134362303031, -17.404630525067713], - [-180.2160995085779, -17.397238855652912], - [-180.2190045554365, -17.3899306196133], - [-180.22214847944494, -17.38271301874728], - [-180.22552815486955, -17.37559316469895], - [-180.2291402248507, -17.36857807198459], - [-180.23298110479877, -17.361674651117465], - [-180.23704698600793, -17.354889701837614], - [-180.241333839485, -17.348229906453177], - [-180.24583741998842, -17.341701823299495], - [-180.25055327027303, -17.335311880322312], - [-180.2554767255379, -17.329066368791157], - [-180.2606029180699, -17.322971437148908], - [-180.2659267820811, -17.31703308500338], - [-180.27144305873284, -17.31125715726664], - [-180.27714630134318, -17.305649338447502], - [-180.28303088077135, -17.300215147102815], - [-180.28909099097433, -17.294959930452542], - [-180.29532065473006, -17.28988885916387], - [-180.30171372952182, -17.285006922309204], - [-180.30826391357755, -17.28031892250277], - [-180.31496475205893, -17.27582947122046], - [-180.32180964339358, -17.271542984307253], - [-180.32879184574472, -17.267463677676407], - [-180.3359044836119, -17.263595563204532], - [-180.34314055455673, -17.259942444826336], - [-180.35049293604666, -17.25650791483263], - [-180.35795439241105, -17.253295350375165], - [-180.36551758190245, -17.250307910181498], - [-180.37317506385656, -17.247548531482927], - [-180.38091930594408, -17.24501992715844], - [-180.38874269150784, -17.24272458309719], - [-180.3966375269781, -17.240664755782156], - [-180.4045960493595, -17.238842470096998], - [-180.4126104337817, -17.237259517358385], - [-180.42067280110825, -17.235917453575404], - [-180.42877522559502, -17.234817597937823], - [-180.4369097425921, -17.233961031534516], - [-180.4450683562817, -17.23334859630332], - [-180.45324304744491, -17.232980894213192], - [-180.46142578124994, -17.232858286679544] + [-180.46142578124994, -17.23540624801724], + [-180.46952483237501, -17.235527601676104], + [-180.47761592278025, -17.235891543369434], + [-180.48569109947775, -17.236497715363353], + [-180.4937424249357, -17.23734552182087], + [-180.501761984789, -17.2384341293807], + [-180.50974189552787, -17.239762467966884], + [-180.5176743121582, -17.24132923182841], + [-180.52555143582603, -17.243132880807927], + [-180.53336552139947, -17.245171641838347], + [-180.54110888500074, -17.247443510665885], + [-180.5487739114812, -17.24994625379809], + [-180.55635306183302, -17.252677410674888], + [-180.56383888052986, -17.255634296060737], + [-180.57122400279005, -17.258814002655598], + [-180.57850116175555, -17.262213403922352], + [-180.5856631955797, -17.26582915712797], + [-180.59270305441729, -17.269657706595645], + [-180.59961380731016, -17.273695287164863], + [-180.6063886489621, -17.277937927856094], + [-180.6130209063964, -17.282381455736843], + [-180.6195040454895, -17.287021499985244], + [-180.6258316773753, -17.291853496147592], + [-180.63199756471298, -17.29687269058568], + [-180.63799562781296, -17.30207414510984], + [-180.643819950615, -17.307452741793316], + [-180.64946478651217, -17.313003187963442], + [-180.65492456401577, -17.318720021364975], + [-180.66019389225502, -17.32459761549062], + [-180.66526756630634, -17.330630185073833], + [-180.67014057234698, -17.33681179173859], + [-180.6748080926277, -17.343136349800936], + [-180.6792655102598, -17.349597632216632], + [-180.6835084138112, -17.356189276669404], + [-180.6875326017075, -17.36290479179395], + [-180.69133408643285, -17.36973756352777], + [-180.6949090985269, -17.376680861585793], + [-180.69825409037315, -17.38372784605161], + [-180.70136573977518, -17.390871574079007], + [-180.7042409533163, -17.398105006697364], + [-180.70687686949995, -17.40542101571444], + [-180.70927086166645, -17.412812390709803], + [-180.71142054068346, -17.420271846112332], + [-180.71332375740704, -17.427792028354794], + [-180.71497860491021, -17.435365523098653], + [-180.7163834204768, -17.442984862522177], + [-180.7175367873578, -17.450642532664645], + [-180.71843753628855, -17.458330980819607], + [-180.71908474676403, -17.466042622969958], + [-180.7194777480714, -17.47376985125757], + [-180.71961612007755, -17.481505041480204], + [-180.71949969377098, -17.489240560608305], + [-180.71912855155648, -17.49696877431433], + [-180.71850302730198, -17.504682054507228], + [-180.71762370613754, -17.512372786864574], + [-180.71649142400517, -17.520033378354995], + [-180.7151072669601, -17.527656264743342], + [-180.7134725702237, -17.535233918071285], + [-180.71158891698838, -17.542758854105784], + [-180.70945813697452, -17.550223639748076], + [-180.70708230474182, -17.557620900395776], + [-180.7044637377547, -17.5649433272507], + [-180.70160499420416, -17.57218368456513], + [-180.69850887058766, -17.57933481681919], + [-180.69517839904856, -17.586389655822167], + [-180.69161684447806, -17.593341227730562], + [-180.68782770138117, -17.600182659975832], + [-180.68381469051045, -17.606907188094752], + [-180.67958175526974, -17.613508162455524], + [-180.67513305789134, -17.619979054872765], + [-180.67047297539057, -17.62631346510465], + [-180.6656060953004, -17.632505127225574], + [-180.6605372111913, -17.6385479158678], + [-180.65527131797964, -17.6444358523258], + [-180.64981360702984, -17.650163110516857], + [-180.64416946105413, -17.655724022791997], + [-180.63834444881553, -17.66111308559109], + [-180.63234431963897, -17.666324964936447], + [-180.62617499773577, -17.671354501759104], + [-180.61984257634742, -17.676196717052427], + [-180.61335331171412, -17.680846816847538], + [-180.60671361687426, -17.685300197005542], + [-180.59993005530114, -17.689552447821512], + [-180.59300933438314, -17.693599358435442], + [-180.58595829875406, -17.697436921045572], + [-180.5787839234803, -17.70106133491976], + [-180.57149330711206, -17.704469010200565], + [-180.5640936646056, -17.70765657150024], + [-180.5565923201233, -17.710620861281743], + [-180.54899669972, -17.713358943022268], + [-180.54131432392217, -17.715868104156005], + [-180.53355280020827, -17.718145858792997], + [-180.52571981539754, -17.72018995021126], + [-180.5178231279559, -17.72199835311953], + [-180.50987056022618, -17.72356927568833], + [-180.50186999059147, -17.724901161347052], + [-180.49382934557931, -17.72599269034538], + [-180.4857565919154, -17.726842781077238], + [-180.47765972853483, -17.727450591165923], + [-180.4695467785595, -17.72781551830933], + [-180.46142578124994, -17.727937200884263], + [-180.4533047839404, -17.72781551830933], + [-180.44519183396508, -17.727450591165923], + [-180.43709497058452, -17.726842781077238], + [-180.4290222169206, -17.72599269034538], + [-180.42098157190844, -17.724901161347052], + [-180.41298100227374, -17.72356927568833], + [-180.40502843454402, -17.72199835311953], + [-180.39713174710238, -17.72018995021126], + [-180.38929876229165, -17.718145858793], + [-180.38153723857775, -17.715868104156005], + [-180.37385486277992, -17.713358943022268], + [-180.36625924237663, -17.710620861281743], + [-180.35875789789432, -17.70765657150024], + [-180.35135825538785, -17.704469010200565], + [-180.34406763901964, -17.70106133491976], + [-180.33689326374585, -17.697436921045572], + [-180.32984222811677, -17.693599358435442], + [-180.32292150719877, -17.689552447821512], + [-180.31613794562566, -17.685300197005542], + [-180.3094982507858, -17.680846816847538], + [-180.3030089861525, -17.676196717052427], + [-180.29667656476414, -17.671354501759104], + [-180.29050724286094, -17.666324964936447], + [-180.28450711368438, -17.66111308559109], + [-180.27868210144578, -17.655724022791997], + [-180.27303795547007, -17.650163110516857], + [-180.26758024452027, -17.6444358523258], + [-180.26231435130867, -17.6385479158678], + [-180.2572454671995, -17.632505127225574], + [-180.25237858710935, -17.62631346510465], + [-180.24771850460857, -17.619979054872765], + [-180.24326980723018, -17.613508162455524], + [-180.23903687198947, -17.606907188094752], + [-180.23502386111875, -17.600182659975832], + [-180.23123471802185, -17.593341227730562], + [-180.22767316345136, -17.586389655822167], + [-180.22434269191226, -17.57933481681919], + [-180.22124656829575, -17.57218368456513], + [-180.2183878247452, -17.5649433272507], + [-180.2157692577581, -17.557620900395776], + [-180.2133934255254, -17.550223639748076], + [-180.21126264551154, -17.542758854105784], + [-180.2093789922762, -17.535233918071285], + [-180.2077442955398, -17.527656264743342], + [-180.20636013849474, -17.520033378354995], + [-180.20522785636237, -17.512372786864574], + [-180.20434853519794, -17.504682054507228], + [-180.20372301094343, -17.49696877431433], + [-180.20335186872893, -17.489240560608305], + [-180.20323544242237, -17.481505041480204], + [-180.20337381442852, -17.47376985125757], + [-180.2037668157359, -17.466042622969958], + [-180.20441402621137, -17.458330980819607], + [-180.2053147751421, -17.450642532664645], + [-180.2064681420231, -17.442984862522177], + [-180.2078729575897, -17.435365523098653], + [-180.20952780509288, -17.427792028354794], + [-180.21143102181645, -17.420271846112332], + [-180.21358070083346, -17.412812390709803], + [-180.21597469299996, -17.40542101571444], + [-180.21861060918363, -17.398105006697364], + [-180.22148582272473, -17.390871574079007], + [-180.22459747212676, -17.38372784605161], + [-180.22794246397302, -17.376680861585793], + [-180.23151747606707, -17.36973756352777], + [-180.23531896079243, -17.36290479179395], + [-180.2393431486887, -17.356189276669404], + [-180.24358605224012, -17.349597632216632], + [-180.24804346987221, -17.343136349800936], + [-180.25271099015293, -17.33681179173859], + [-180.25758399619357, -17.330630185073833], + [-180.2626576702449, -17.32459761549062], + [-180.26792699848414, -17.318720021364975], + [-180.27338677598775, -17.313003187963442], + [-180.27903161188493, -17.307452741793316], + [-180.28485593468696, -17.30207414510984], + [-180.29085399778694, -17.29687269058568], + [-180.29701988512463, -17.291853496147592], + [-180.30334751701042, -17.287021499985244], + [-180.30983065610351, -17.282381455736843], + [-180.3164629135378, -17.277937927856094], + [-180.32323775518975, -17.273695287164863], + [-180.33014850808263, -17.269657706595645], + [-180.33718836692023, -17.26582915712797], + [-180.34435040074436, -17.262213403922352], + [-180.3516275597099, -17.258814002655598], + [-180.35901268197006, -17.255634296060737], + [-180.3664985006669, -17.252677410674888], + [-180.37407765101872, -17.24994625379809], + [-180.38174267749918, -17.247443510665885], + [-180.38948604110044, -17.245171641838347], + [-180.39730012667388, -17.243132880807927], + [-180.40517725034172, -17.24132923182841], + [-180.41310966697205, -17.239762467966884], + [-180.42108957771092, -17.2384341293807], + [-180.4291091375642, -17.23734552182087], + [-180.43716046302217, -17.236497715363353], + [-180.44523563971967, -17.235891543369434], + [-180.4533267301249, -17.235527601676104], + [-180.46142578124994, -17.23540624801724] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/segment3.geojson b/packages/turf-point-to-line-distance/test/out/segment3.geojson index b672c57f65..403245630e 100644 --- a/packages/turf-point-to-line-distance/test/out/segment3.geojson +++ b/packages/turf-point-to-line-distance/test/out/segment3.geojson @@ -31,207 +31,207 @@ "type": "Polygon", "coordinates": [ [ - [1, 1.999847691290931], - [0.9685764874430625, 1.9993541264432926], - [0.9371840332951916, 1.997873919879187], - [0.9058536650349519, 1.9954085350477568], + [1, 1.9998476912909309], + [0.9685764874430625, 1.9993541264432921], + [0.9371840332951916, 1.9978739198791862], + [0.9058536650349519, 1.9954085350477562], [0.874616348312366, 1.991960409407136], [0.8435029561157432, 1.9875329519906195], - [0.8125442380357036, 1.9821305400029625], - [0.7817707896585676, 1.9757585144504501], - [0.7512130221211076, 1.9684231748094276], - [0.7209011318584189, 1.9601317727389935], - [0.6908650705763909, 1.9508925048445724], - [0.6611345154799443, 1.9407145045001086], - [0.6317388397878306, 1.9296078327375863], - [0.6027070835643898, 1.9175834682135804], - [0.5740679248982208, 1.9046532962634997], - [0.5458496514572312, 1.8908300970551286], - [0.5180801324490232, 1.8761275328540077], - [0.49078679101500916, 1.8605601344140912], - [0.463996577086073, 1.8441432865080307], - [0.4377359407269737, 1.8268932126122723], - [0.41203080599603503, 1.8088269587630355], - [0.3869065453460029, 1.7899623766000277], - [0.36238795459124085, 1.770318105615576], - [0.33849922846572456, 1.7499135546276183], - [0.3152639367955386, 1.728768882495744], - [0.29270500130883276, 1.7069049781001975], - [0.27084467310540133, 1.6843434396044605], - [0.2497045108072653, 1.6611065530226878], - [0.22930535941082208, 1.6372172701139156], - [0.20966732986031236, 1.612699185625586], - [0.19080977936152832, 1.587576513909505], - [0.17275129245384035, 1.5618740649339116], - [0.15550966285779, 1.535617219715883], - [0.139101876114643, 1.5088319051987862], - [0.12354409303344192, 1.4815445685999669], - [0.10885163396025664, 1.4537821512543279], - [0.09503896388346555, 1.4255720619798602], - [0.08211967838805939, 1.396942149991581], - [0.07010649047109185, 1.3679206773907133], - [0.05901121822957687, 1.3385362912562797], - [0.04884477343125615, 1.308817995366589], - [0.03961715097783889, 1.2787951215783995], - [0.031337419269473525, 1.2484973008917966], - [0.024013711478360483, 1.2179544342290651], - [0.01765321773861088, 1.1871966629560535], - [0.012262178258604726, 1.1562543391747098], - [0.007845877361295363, 1.125157995815647], - [0.00440863845709035, 1.0939383165597265], - [0.00195381995312102, 1.0626261056177748], - [0.00048381210190497076, 1.0312522573976357], - [3.47916135590972e-8, 0.9998477260878444], - [0.0005029362793394656, 0.9684434951872459], - [0.0019919928679793743, 0.937070547009919], - [0.00446570952653457, 0.9057598321947592], - [0.007921621452867735, 0.8745422392490729], - [0.012356296577131056, 0.8434485641554709], - [0.017765339003324776, 0.8125094800713093], - [0.024143393385636473, 0.7817555071498272], - [0.03148415023543767, 0.7512169825120282], - [0.039780352154024826, 0.720924030398219], - [0.04902380098540153, 0.6909065325279682], - [0.059205365882624414, 0.6611940986970768], - [0.07031499228043453, 0.6318160376399443], - [0.08234171176611792, 0.6028013281855016], - [0.09527365283974915, 0.574178590734637], - [0.10909805255417744, 0.5459760590867668], - [0.1238012690243323, 0.5182215526429194], - [0.1393687947946289, 0.490942449012379], - [0.15578527105246504, 0.46416565704960444], - [0.1730345026750093, 0.43791759034776473], - [0.19109947409569192, 0.41222414121485096], - [0.20996236597601953, 0.3871106551579085], - [0.22960457266754283, 0.3626019059005008], - [0.25000672044803063, 0.33872207095804324], - [0.27114868651511476, 0.3154947077951678], - [0.2930096187199024, 0.29294273058875], - [0.31556795602226506, 0.2710883876197179], - [0.3388014496487772, 0.24995323931616348], - [0.36268718493349533, 0.22955813696971455], - [0.38720160382104024, 0.2099232021464999], - [0.41232052801070596, 0.19106780681339688], - [0.4380191827195972, 0.1730105541995929], - [0.4642722210420949, 0.15576926041279945], - [0.4910537488822565, 0.1393609368287404], - [0.518337350435083, 0.12380177327180858], - [0.5460961141919407, 0.1091071220040136], - [0.5743026594447855, 0.09529148253856687], - [0.602929163263236, 0.08236848729364331], - [0.6319473879179615, 0.07035088810103346], - [0.6613287087232728, 0.05925054358355448], - [0.691044142271325, 0.049078407414217005], - [0.7210643750297743, 0.03984451746927034], - [0.751359792274334, 0.031557985886334565], - [0.781900507327191, 0.024226990037923855], - [0.8126563910718726, 0.017858764429716407], - [0.8435971017147775, 0.01245959353199432], - [0.8746921147632691, 0.008034805551705269], - [0.9059107531899299, 0.00458876715163455], - [0.9372222177523374, 0.002124879122190291], - [0.9685956174375103, 0.0006455730103189741], - [0.9999999999999999, 0.0001523087090687537], - [1.03140438256249, 0.0006455730103189741], - [1.0627777822476625, 0.002124879122190291], - [1.0940892468100702, 0.00458876715163455], - [1.1253078852367304, 0.008034805551705269], - [1.1564028982852224, 0.01245959353199432], - [1.1873436089281277, 0.017858764429716407], - [1.2180994926728084, 0.024226990037923658], - [1.2486402077256664, 0.031557985886334565], - [1.2789356249702253, 0.03984451746927014], - [1.3089558577286753, 0.049078407414217005], - [1.338671291276727, 0.05925054358355448], - [1.3680526120820382, 0.07035088810103327], - [1.397070836736764, 0.08236848729364331], - [1.4256973405552142, 0.09529148253856667], - [1.4539038858080588, 0.10910712200401329], - [1.481662649564917, 0.12380177327180848], - [1.508946251117743, 0.13936093682873998], - [1.5357277789579051, 0.15576926041279934], - [1.5619808172804028, 0.17301055419959285], - [1.5876794719892937, 0.19106780681339677], - [1.6127983961789598, 0.20992320214650012], - [1.6373128150665046, 0.22955813696971436], - [1.6611985503512228, 0.24995323931616314], - [1.684432043977735, 0.27108838761971776], - [1.7069903812800977, 0.2929427305887497], - [1.7288513134848846, 0.3154947077951672], - [1.7499932795519695, 0.33872207095804335], - [1.7703954273324574, 0.3626019059005006], - [1.7900376340239803, 0.38711065515790827], - [1.8089005259043083, 0.41222414121485074], - [1.8269654973249905, 0.43791759034776445], - [1.8442147289475346, 0.4641656570496037], - [1.860631205205371, 0.49094244901237877], - [1.8761987309756671, 0.5182215526429184], - [1.8909019474458224, 0.5459760590867667], - [1.9047263471602505, 0.5741785907346367], - [1.917658288233882, 0.6028013281855018], - [1.9296850077195653, 0.6318160376399443], - [1.9407946341173754, 0.6611940986970761], - [1.9509761990145986, 0.6909065325279681], - [1.960219647845975, 0.7209240303982185], - [1.968515849764562, 0.7512169825120277], - [1.9758566066143635, 0.7817555071498264], - [1.9822346609966752, 0.8125094800713084], - [1.987643703422869, 0.8434485641554709], + [0.8125442380357036, 1.982130540002962], + [0.7817707896585678, 1.9757585144504493], + [0.7512130221211079, 1.9684231748094274], + [0.720901131858419, 1.960131772738993], + [0.6908650705763909, 1.9508925048445718], + [0.6611345154799444, 1.9407145045001086], + [0.6317388397878309, 1.9296078327375863], + [0.6027070835643901, 1.9175834682135797], + [0.574067924898221, 1.9046532962634994], + [0.5458496514572314, 1.8908300970551284], + [0.5180801324490233, 1.8761275328540072], + [0.4907867910150093, 1.8605601344140907], + [0.4639965770860733, 1.8441432865080298], + [0.4377359407269739, 1.8268932126122714], + [0.4120308059960352, 1.8088269587630355], + [0.3869065453460031, 1.7899623766000274], + [0.3623879545912411, 1.7703181056155757], + [0.33849922846572483, 1.749913554627618], + [0.31526393679553893, 1.7287688824957437], + [0.29270500130883303, 1.706904978100197], + [0.2708446731054016, 1.6843434396044605], + [0.2497045108072656, 1.6611065530226876], + [0.2293053594108224, 1.6372172701139152], + [0.20966732986031264, 1.612699185625586], + [0.19080977936152865, 1.5875765139095044], + [0.17275129245384074, 1.561874064933911], + [0.1555096628577904, 1.5356172197158828], + [0.1391018761146433, 1.5088319051987862], + [0.12354409303344221, 1.4815445685999664], + [0.10885163396025704, 1.4537821512543276], + [0.09503896388346597, 1.42557206197986], + [0.08211967838805978, 1.3969421499915808], + [0.07010649047109206, 1.3679206773907133], + [0.059011218229577264, 1.3385362912562797], + [0.04884477343125654, 1.3088179953665888], + [0.039617150977839286, 1.2787951215783993], + [0.03133741926947393, 1.2484973008917966], + [0.02401371147836088, 1.217954434229065], + [0.01765321773861128, 1.1871966629560535], + [0.012262178258605124, 1.1562543391747098], + [0.00784587736129576, 1.1251579958156466], + [0.0044086384570907475, 1.0939383165597265], + [0.0019538199531214176, 1.0626261056177748], + [0.00048381210190536834, 1.0312522573976357], + [3.4791613956666536e-8, 0.9998477260878444], + [0.0005029362793398631, 0.9684434951872459], + [0.001991992867979772, 0.937070547009919], + [0.0044657095265349675, 0.9057598321947592], + [0.007921621452868132, 0.8745422392490729], + [0.012356296577131455, 0.8434485641554709], + [0.017765339003325175, 0.8125094800713095], + [0.024143393385636872, 0.7817555071498272], + [0.03148415023543807, 0.7512169825120283], + [0.03978035215402522, 0.7209240303982191], + [0.04902380098540174, 0.6909065325279683], + [0.05920536588262482, 0.6611940986970771], + [0.07031499228043472, 0.6318160376399445], + [0.08234171176611832, 0.6028013281855018], + [0.09527365283974953, 0.5741785907346371], + [0.10909805255417786, 0.545976059086767], + [0.12380126902433272, 0.5182215526429196], + [0.1393687947946292, 0.4909424490123792], + [0.15578527105246542, 0.46416565704960455], + [0.17303450267500964, 0.43791759034776495], + [0.19109947409569225, 0.4122241412148512], + [0.20996236597601992, 0.38711065515790877], + [0.2296045726675431, 0.36260190590050106], + [0.25000672044803096, 0.33872207095804346], + [0.2711486865151151, 0.31549470779516814], + [0.2930096187199026, 0.2929427305887503], + [0.3155679560222654, 0.27108838761971815], + [0.33880144964877745, 0.24995323931616376], + [0.3626871849334956, 0.22955813696971483], + [0.3872016038210406, 0.20992320214650032], + [0.4123205280107062, 0.19106780681339716], + [0.43801918271959744, 0.17301055419959332], + [0.46427222104209515, 0.15576926041279984], + [0.4910537488822567, 0.1393609368287407], + [0.5183373504350832, 0.12380177327180888], + [0.5460961141919409, 0.10910712200401398], + [0.5743026594447858, 0.09529148253856706], + [0.6029291632632362, 0.08236848729364371], + [0.6319473879179616, 0.07035088810103365], + [0.6613287087232729, 0.05925054358355488], + [0.6910441422713254, 0.0490784074142174], + [0.7210643750297743, 0.03984451746927074], + [0.7513597922743341, 0.03155798588633497], + [0.7819005073271911, 0.024226990037924254], + [0.8126563910718728, 0.017858764429716806], + [0.8435971017147775, 0.012459593531994719], + [0.8746921147632691, 0.008034805551705666], + [0.9059107531899301, 0.004588767151634947], + [0.9372222177523374, 0.0021248791221906886], + [0.9685956174375103, 0.0006455730103193716], + [0.9999999999999999, 0.00015230870906915127], + [1.03140438256249, 0.0006455730103193716], + [1.0627777822476625, 0.0021248791221906886], + [1.0940892468100702, 0.004588767151634947], + [1.1253078852367304, 0.008034805551705666], + [1.1564028982852224, 0.012459593531994719], + [1.1873436089281277, 0.017858764429716806], + [1.2180994926728084, 0.024226990037924057], + [1.2486402077256664, 0.03155798588633497], + [1.2789356249702248, 0.039844517469270535], + [1.3089558577286753, 0.0490784074142174], + [1.338671291276727, 0.05925054358355488], + [1.368052612082038, 0.07035088810103365], + [1.3970708367367635, 0.08236848729364371], + [1.4256973405552142, 0.09529148253856706], + [1.4539038858080586, 0.10910712200401368], + [1.4816626495649166, 0.12380177327180877], + [1.5089462511177427, 0.1393609368287404], + [1.5357277789579047, 0.15576926041279973], + [1.5619808172804022, 0.17301055419959313], + [1.5876794719892935, 0.19106780681339705], + [1.6127983961789596, 0.2099232021465004], + [1.6373128150665042, 0.22955813696971475], + [1.6611985503512223, 0.24995323931616348], + [1.6844320439777343, 0.27108838761971804], + [1.706990381280097, 0.29294273058875], + [1.7288513134848846, 0.31549470779516753], + [1.7499932795519693, 0.3387220709580436], + [1.7703954273324567, 0.36260190590050084], + [1.79003763402398, 0.3871106551579085], + [1.8089005259043074, 0.41222414121485096], + [1.8269654973249903, 0.43791759034776473], + [1.8442147289475344, 0.46416565704960394], + [1.8606312052053708, 0.490942449012379], + [1.8761987309756667, 0.5182215526429186], + [1.8909019474458222, 0.5459760590867668], + [1.9047263471602505, 0.574178590734637], + [1.917658288233882, 0.602801328185502], + [1.9296850077195653, 0.6318160376399444], + [1.9407946341173747, 0.6611940986970761], + [1.950976199014598, 0.6909065325279681], + [1.9602196478459746, 0.7209240303982185], + [1.9685158497645618, 0.7512169825120278], + [1.9758566066143628, 0.7817555071498264], + [1.9822346609966746, 0.8125094800713084], + [1.9876437034228687, 0.8434485641554709], [1.992078378547132, 0.8745422392490737], [1.9955342904734654, 0.9057598321947595], - [1.9980080071320208, 0.937070547009918], - [1.9994970637206608, 0.9684434951872459], - [1.9999999652083866, 0.9998477260878441], + [1.9980080071320199, 0.937070547009918], + [1.99949706372066, 0.9684434951872459], + [1.999999965208386, 0.9998477260878441], [1.9995161878980947, 1.0312522573976362], [1.998046180046879, 1.062626105617775], - [1.9955913615429097, 1.0939383165597256], - [1.9921541226387047, 1.125157995815647], + [1.9955913615429095, 1.0939383165597256], + [1.9921541226387043, 1.1251579958156466], [1.9877378217413952, 1.1562543391747095], - [1.9823467822613894, 1.187196662956053], + [1.9823467822613885, 1.187196662956053], [1.9759862885216393, 1.2179544342290656], - [1.968662580730527, 1.2484973008917957], + [1.968662580730526, 1.2484973008917954], [1.9603828490221609, 1.2787951215783993], - [1.9511552265687442, 1.3088179953665888], - [1.940988781770423, 1.3385362912562793], - [1.9298935095289078, 1.3679206773907138], - [1.917880321611941, 1.3969421499915802], + [1.9511552265687435, 1.3088179953665888], + [1.9409887817704228, 1.338536291256279], + [1.9298935095289076, 1.3679206773907135], + [1.9178803216119407, 1.39694214999158], [1.9049610361165343, 1.42557206197986], - [1.8911483660397435, 1.4537821512543276], - [1.8764559069665585, 1.481544568599966], - [1.8608981238853568, 1.5088319051987866], - [1.8444903371422101, 1.5356172197158826], - [1.82724870754616, 1.5618740649339105], - [1.8091902206384718, 1.5875765139095044], - [1.7903326701396878, 1.612699185625586], - [1.770694640589178, 1.6372172701139156], - [1.7502954891927351, 1.6611065530226874], + [1.8911483660397432, 1.4537821512543274], + [1.8764559069665578, 1.481544568599966], + [1.8608981238853566, 1.5088319051987862], + [1.8444903371422101, 1.5356172197158822], + [1.8272487075461599, 1.5618740649339105], + [1.8091902206384716, 1.5875765139095044], + [1.7903326701396876, 1.6126991856255855], + [1.7706946405891775, 1.6372172701139154], + [1.750295489192735, 1.661106553022687], [1.7291553268945992, 1.68434343960446], - [1.7072949986911676, 1.706904978100197], - [1.6847360632044612, 1.7287688824957443], - [1.6615007715342753, 1.7499135546276188], - [1.6376120454087597, 1.7703181056155757], - [1.6130934546539972, 1.7899623766000277], + [1.707294998691167, 1.7069049781001968], + [1.6847360632044608, 1.728768882495744], + [1.661500771534275, 1.7499135546276183], + [1.6376120454087597, 1.770318105615575], + [1.6130934546539972, 1.7899623766000272], [1.587969194003965, 1.8088269587630355], - [1.562264059273026, 1.8268932126122723], - [1.5360034229139274, 1.8441432865080298], - [1.5092132089849917, 1.8605601344140907], - [1.4819198675509768, 1.8761275328540077], - [1.4541503485427691, 1.8908300970551286], - [1.4259320751017797, 1.9046532962634994], - [1.3972929164356107, 1.91758346821358], - [1.3682611602121693, 1.9296078327375863], - [1.3388654845200558, 1.9407145045001086], - [1.3091349294236092, 1.9508925048445724], + [1.5622640592730255, 1.826893212612272], + [1.5360034229139272, 1.8441432865080298], + [1.5092132089849915, 1.8605601344140903], + [1.4819198675509768, 1.8761275328540072], + [1.454150348542769, 1.8908300970551284], + [1.4259320751017792, 1.904653296263499], + [1.3972929164356105, 1.9175834682135797], + [1.368261160212169, 1.9296078327375863], + [1.3388654845200556, 1.9407145045001086], + [1.3091349294236092, 1.9508925048445718], [1.2790988681415816, 1.960131772738993], - [1.248786977878893, 1.9684231748094276], - [1.2182292103414323, 1.9757585144504501], - [1.1874557619642967, 1.9821305400029625], + [1.248786977878893, 1.9684231748094274], + [1.2182292103414323, 1.9757585144504493], + [1.1874557619642963, 1.982130540002962], [1.156497043884257, 1.9875329519906195], [1.1253836516876345, 1.991960409407136], - [1.0941463349650475, 1.9954085350477568], - [1.0628159667048085, 1.997873919879187], - [1.0314235125569375, 1.9993541264432926], - [1, 1.999847691290931] + [1.0941463349650475, 1.9954085350477562], + [1.0628159667048083, 1.9978739198791862], + [1.0314235125569375, 1.9993541264432921], + [1, 1.9998476912909309] ] ] } diff --git a/packages/turf-point-to-line-distance/test/out/segment4.geojson b/packages/turf-point-to-line-distance/test/out/segment4.geojson index effc7434b2..f272b0cea3 100644 --- a/packages/turf-point-to-line-distance/test/out/segment4.geojson +++ b/packages/turf-point-to-line-distance/test/out/segment4.geojson @@ -31,207 +31,207 @@ "type": "Polygon", "coordinates": [ [ - [-48.076171875, 20.271510755848283], - [-48.23730341318302, 20.26907099799104], - [-48.398262019066536, 20.261754362201202], - [-48.55887500317104, 20.249568757940395], - [-48.71897016095242, 20.232527354710772], - [-48.878376013512714, 20.210648562698935], - [-49.03692204621561, 20.183956005766856], - [-49.194438944529786, 20.152478486878216], - [-49.35075882644129, 20.116249946072926], - [-49.50571547079857, 20.075309411125872], - [-49.65914454097993, 20.029700941048162], - [-49.810883803303234, 19.979473562610572], - [-49.96077333963059, 19.924681200088497], - [-50.1086557536575, 19.865382598446423], - [-50.25437637041431, 19.801641240196748], - [-50.39778342854906, 19.733525256183192], - [-50.53872826500405, 19.661107330552635], - [-50.67706549174233, 19.58446460019109], - [-50.81265316422577, 19.503678548909672], - [-50.945352941392684, 19.418834896674717], - [-51.075030236928384, 19.33002348418252], - [-51.20155436166856, 19.237338153084018], - [-51.32479865702009, 19.14087662216751], - [-51.44464061932853, 19.04074035980868], - [-51.56096201516426, 18.93703445299674], - [-51.67364898754062, 18.829867473243265], - [-51.7825921531169, 18.71935133967686], - [-51.887686690475974, 18.60560117962159], - [-51.988832419601714, 18.488735186950944], - [-52.08593387271293, 18.36887447850127], - [-52.178900356640874, 18.24614294882043], - [-52.267646006963304, 18.120667123517414], - [-52.35208983413262, 17.992576011468504], - [-52.432155761855746, 17.862000956124405], - [-52.50777265800161, 17.729075486150997], - [-52.57887435832693, 17.593935165624327], - [-52.6453996833225, 17.4567174439879], - [-52.70729244849164, 17.31756150596764], - [-52.764501468378235, 17.176608121627236], - [-52.81698055466559, 17.033999496733628], - [-52.86468850866808, 16.889879123589917], - [-52.907589108535916, 16.74439163248049], - [-52.9456510914901, 16.597682643861024], - [-52.978848131398095, 16.44989862141434], - [-53.00715881199349, 16.301186726081802], - [-53.030566596032926, 16.151694671169178], - [-53.04905979067294, 16.001570578615848], - [-53.06263150933648, 15.850962836506698], - [-53.07127963032532, 15.700019957897029], - [-53.075006752420244, 15.548890441013082], - [-53.073820147694796, 15.397722630883056], - [-53.06773171175307, 15.246664582447007], - [-53.05675791158487, 15.095863925188281], - [-53.04091973121514, 14.945467729323795], - [-53.02024261530733, 14.79562237358644], - [-52.99475641086397, 14.646473414629169], - [-52.964495307150365, 14.49816545807745], - [-52.92949777395153, 14.350842031254894], - [-52.88980649825616, 14.204645457605237], - [-52.845468319446226, 14.05971673283321], - [-52.796534163055945, 13.916195402786677], - [-52.74305897315017, 13.774219443102936], - [-52.68510164335861, 13.633925140642994], - [-52.62272494659088, 13.495446976739203], - [-52.5559954634453, 13.358917512283567], - [-52.48498350931501, 13.22446727468638], - [-52.409763060185256, 13.092224646737503], - [-52.33041167710814, 12.962315757405703], - [-52.24701042933423, 12.834864374614526], - [-52.159643816074684, 12.709991800036708], - [-52.068399686863025, 12.58781676595263], - [-51.97336916048269, 12.468455334221877], - [-51.87464654242393, 12.352020797420675], - [-51.77232924083284, 12.238623582201495], - [-51.66651768091525, 12.128371154934626], - [-51.55731521775931, 12.021367929694966], - [-51.44482804754304, 11.917715178660286], - [-51.32916511709571, 11.817510944990438], - [-51.21043803178646, 11.720849958259343], - [-51.088760961718116, 11.627823552514283], - [-50.96425054621001, 11.538519587038712], - [-50.837025796559765, 11.453022369896795], - [-50.70720799708133, 11.371412584338719], - [-50.574920604423646, 11.293767218146948], - [-50.44028914518259, 11.220159496003683], - [-50.303441111827205, 11.150658814959764], - [-50.16450585696964, 11.085330683084567], - [-50.02361448601713, 11.024236661375298], - [-49.88089974825339, 10.967434309002483], - [-49.73649592640528, 10.914977131966342], - [-49.590538724759774, 10.866914535236017], - [-49.44316515590474, 10.823291778440607], - [-49.294513426175, 10.784149935177368], - [-49.144722819893964, 10.749525855998362], - [-48.99393358250738, 10.71945213513247], - [-48.84228680271402, 10.693957080994776], - [-48.689924293703655, 10.673064690530152], - [-48.536988473618685, 10.656794627432303], - [-48.383622245361096, 10.645162204273742], - [-48.22996887587009, 10.63817836857604], - [-48.076171875, 10.635849692843383], - [-47.922374874129915, 10.63817836857604], - [-47.768721504638926, 10.645162204273742], - [-47.615355276381315, 10.656794627432303], - [-47.462419456296374, 10.673064690530152], - [-47.31005694728599, 10.693957080994776], - [-47.158410167492626, 10.71945213513247], - [-47.00762093010604, 10.749525855998362], - [-46.857830323825006, 10.784149935177368], - [-46.70917859409528, 10.823291778440607], - [-46.561805025240226, 10.866914535236017], - [-46.41584782359473, 10.914977131966342], - [-46.27144400174662, 10.967434309002483], - [-46.128729263982876, 11.024236661375298], - [-45.987837893030374, 11.085330683084567], - [-45.8489026381728, 11.150658814959762], - [-45.712054604817425, 11.220159496003683], - [-45.577423145576375, 11.293767218146945], - [-45.44513575291868, 11.371412584338719], - [-45.31531795344026, 11.453022369896793], - [-45.188093203790004, 11.538519587038712], - [-45.063582788281884, 11.627823552514283], - [-44.941905718213555, 11.720849958259343], - [-44.8231786329043, 11.817510944990438], - [-44.70751570245698, 11.917715178660286], - [-44.595028532240704, 12.021367929694966], - [-44.485826069084766, 12.128371154934626], - [-44.38001450916717, 12.238623582201495], - [-44.27769720757608, 12.352020797420675], - [-44.178974589517324, 12.468455334221877], - [-44.08394406313699, 12.58781676595263], - [-43.99269993392532, 12.709991800036708], - [-43.905333320665775, 12.834864374614522], - [-43.821932072891876, 12.962315757405703], - [-43.74258068981477, 13.092224646737495], - [-43.667360240685, 13.224467274686377], - [-43.596348286554715, 13.358917512283567], - [-43.529618803409136, 13.495446976739203], - [-43.46724210664141, 13.633925140642994], - [-43.409284776849844, 13.77421944310293], - [-43.35580958694407, 13.916195402786677], - [-43.30687543055379, 14.059716732833209], - [-43.26253725174385, 14.204645457605237], - [-43.22284597604848, 14.350842031254892], - [-43.18784844284965, 14.498165458077445], - [-43.157587339136036, 14.646473414629169], - [-43.132101134692675, 14.795622373586442], - [-43.111424018784874, 14.945467729323795], - [-43.09558583841513, 15.095863925188276], - [-43.084612038246945, 15.246664582447007], - [-43.07852360230522, 15.397722630883056], - [-43.07733699757976, 15.548890441013086], - [-43.08106411967469, 15.70001995789703], - [-43.08971224066354, 15.850962836506696], - [-43.10328395932707, 16.001570578615848], - [-43.12177715396709, 16.151694671169174], - [-43.14518493800652, 16.301186726081802], - [-43.17349561860191, 16.44989862141435], - [-43.206692658509915, 16.59768264386102], - [-43.2447546414641, 16.74439163248049], - [-43.28765524133193, 16.889879123589917], - [-43.33536319533441, 17.033999496733628], - [-43.38784228162178, 17.17660812162724], - [-43.44505130150837, 17.317561505967635], - [-43.506944066677505, 17.4567174439879], - [-43.57346939167308, 17.593935165624327], - [-43.6445710919984, 17.729075486150993], - [-43.72018798814427, 17.862000956124405], - [-43.80025391586738, 17.9925760114685], - [-43.88469774303671, 18.12066712351741], - [-43.97344339335914, 18.24614294882043], - [-44.06640987728708, 18.36887447850127], - [-44.1635113303983, 18.488735186950944], - [-44.26465705952403, 18.60560117962159], - [-44.369751596883106, 18.719351339676855], - [-44.478694762459384, 18.829867473243265], - [-44.59138173483576, 18.937034452996745], - [-44.70770313067148, 19.040740359808684], - [-44.82754509297992, 19.140876622167504], - [-44.95078938833145, 19.237338153084018], - [-45.07731351307162, 19.33002348418252], - [-45.20699080860733, 19.418834896674717], - [-45.339690585774235, 19.503678548909672], - [-45.475278258257674, 19.584464600191087], - [-45.61361548499595, 19.661107330552635], - [-45.75456032145095, 19.733525256183192], - [-45.8979673795857, 19.801641240196744], - [-46.0436879963425, 19.86538259844642], - [-46.19157041036942, 19.924681200088497], - [-46.34145994669678, 19.979473562610572], - [-46.49319920902008, 20.029700941048162], - [-46.646628279201444, 20.075309411125872], - [-46.80158492355872, 20.116249946072926], - [-46.95790480547023, 20.152478486878216], - [-47.1154217037844, 20.183956005766856], - [-47.2739677364873, 20.210648562698935], - [-47.43337358904758, 20.232527354710772], - [-47.59346874682896, 20.249568757940395], - [-47.75408173093347, 20.261754362201202], - [-47.915040336816986, 20.26907099799104], - [-48.076171875, 20.271510755848283] + [-48.076171875, 20.385085986545977], + [-48.24121373148589, 20.382587020538292], + [-48.40607804834933, 20.37509283150062], + [-48.570587537633166, 20.362611542355154], + [-48.734565413965605, 20.34515667787273], + [-48.89783564399486, 20.32274714457111], + [-49.06022319360827, 20.29540720266754], + [-49.221554272220345, 20.263166430179375], + [-49.38165657343407, 20.226059679292508], + [-49.54035951140368, 20.184127025141883], + [-49.69749445225518, 20.137413707172044], + [-49.85289493995344, 20.08597006326818], + [-50.006396916039996, 20.029851456869007], + [-50.157838932704884, 19.96911819729244], + [-50.30706235869757, 19.903835453522767], + [-50.45391157762597, 19.834073161724252], + [-50.598234178238826, 19.759905926760144], + [-50.7398811363339, 19.681412918008824], + [-50.878706987983385, 19.59867775977895], + [-51.014569993816814, 19.511788416634175], + [-51.14733229415096, 19.42083707394453], + [-51.27686005480537, 19.32592001398626], + [-51.40302360349037, 19.227137487914522], + [-51.52569755670127, 19.124593583934423], + [-51.644760937098624, 19.018396091994862], + [-51.76009728139784, 18.908656365327097], + [-51.871594738833444, 18.79548917914584], + [-51.979146160302626, 18.67901258682483], + [-52.08264917832938, 18.559347773852025], + [-52.182006278024836, 18.436618909860883], + [-52.27712485924993, 18.31095299902511], + [-52.367917290214905, 18.182479729093348], + [-52.45430095277478, 18.05133131932943], + [-52.53619827970133, 17.91764236761125], + [-52.61353678423082, 17.78154969692906], + [-52.686249082201364, 17.643192201510605], + [-52.75427290710628, 17.50271069278718], + [-52.81755111839816, 17.360247745401075], + [-52.876031703384676, 17.215947543441043], + [-52.929667773059904, 17.069955727078867], + [-52.97841755221535, 16.922419239766548], + [-53.02224436417229, 16.773486176140295], + [-53.06111661047297, 16.623305630764825], + [-53.095007745860535, 16.472027547838646], + [-53.123896248869045, 16.319802571969404], + [-53.147765588334316, 16.166781900116813], + [-53.16660418612344, 16.01311713478999], + [-53.180405376367474, 15.858960138576114], + [-53.18916736146652, 15.704462890067862], + [-53.19289316512049, 15.54977734124876], + [-53.191590582621906, 15.395055276387788], + [-53.185272128629634, 15.240448172487719], + [-53.17395498262442, 15.086107061325611], + [-53.15766093222929, 14.932182393118635], + [-53.13641631455885, 14.778823901844124], + [-53.11025195574442, 14.62618047223891], + [-53.0792031087627, 14.474400008500474], + [-53.04330938967932, 14.323629304710218], + [-53.0026147124005, 14.17401391699801], + [-52.95716722201038, 14.02569803746643], + [-52.90701922675527, 13.878824369893351], + [-52.85222712872162, 13.733534007232127], + [-52.792851353240366, 13.58996631092996], + [-52.728956277037206, 13.448258792086783], + [-52.660610155136894, 13.308546994479375], + [-52.58788504651843, 13.170964379477992], + [-52.51085673850885, 13.03564221288598], + [-52.429604669894545, 12.902709453736156], + [-52.34421185272233, 12.772292645081343], + [-52.254764792756234, 12.644515806820348], + [-52.16135340855154, 12.519500330604474], + [-52.064070949104014, 12.39736487687383], + [-51.96301391003057, 12.278225274076595], + [-51.85828194823588, 12.162194420128502], + [-51.74997779502045, 12.049382186173595], + [-51.63820716758659, 11.939895322711106], + [-51.52307867890111, 11.833837368156894], + [-51.404703745877576, 11.73130855991104], + [-51.283196495844635, 11.632405748006299], + [-51.15867367127304, 11.5372223114148], + [-51.031254532739595, 11.445848077092466], + [-50.90106076011367, 11.358369241842757], + [-50.76821635195908, 11.274868297082543], + [-50.63284752315266, 11.195423956593997], + [-50.495082600729376, 11.12011108734679], + [-50.35505191797273, 11.04900064347483], + [-50.21288770677894, 10.98215960349123], + [-50.068723988332295, 10.919650910824034], + [-49.92269646213929, 10.861533417753595], + [-49.77494239347846, 10.807861832830378], + [-49.625600499332066, 10.758686671849063], + [-49.47481083287577, 10.714054212451831], + [-49.32271466661053, 10.674006452429799], + [-49.16945437423037, 10.63858107178738], + [-49.015173311327025, 10.607811398629764], + [-48.86001569504066, 10.581726378928492], + [-48.70412648277236, 10.560350550214672], + [-48.54765125008035, 10.543704019243545], + [-48.39073606788764, 10.531802443667875], + [-48.23352737913276, 10.524657017751244], + [-48.076171875, 10.522274462145694], + [-47.91881637086725, 10.524657017751244], + [-47.76160768211238, 10.531802443667875], + [-47.60469249991965, 10.543704019243545], + [-47.448217267227655, 10.560350550214672], + [-47.292328054959356, 10.581726378928492], + [-47.13717043867298, 10.607811398629767], + [-46.982889375769645, 10.63858107178738], + [-46.82962908338948, 10.674006452429799], + [-46.67753291712425, 10.714054212451831], + [-46.526743250667934, 10.758686671849063], + [-46.37740135652155, 10.807861832830378], + [-46.22964728786072, 10.861533417753595], + [-46.08361976166772, 10.919650910824034], + [-45.93945604322107, 10.982159603491228], + [-45.79729183202728, 11.049000643474828], + [-45.65726114927064, 11.12011108734679], + [-45.519496226847345, 11.195423956593995], + [-45.384127398040924, 11.274868297082541], + [-45.25128298988634, 11.358369241842757], + [-45.12108921726042, 11.445848077092466], + [-44.99367007872697, 11.5372223114148], + [-44.869147254155365, 11.632405748006297], + [-44.74764000412244, 11.731308559911039], + [-44.6292650710989, 11.833837368156894], + [-44.51413658241343, 11.939895322711106], + [-44.40236595497955, 12.049382186173593], + [-44.29406180176414, 12.162194420128502], + [-44.189329839969446, 12.278225274076595], + [-44.088272800896, 12.397364876873826], + [-43.99099034144847, 12.51950033060447], + [-43.897578957243766, 12.644515806820348], + [-43.80813189727768, 12.77229264508134], + [-43.72273908010547, 12.902709453736156], + [-43.641487011491165, 13.035642212885977], + [-43.56445870348158, 13.170964379477988], + [-43.49173359486313, 13.308546994479373], + [-43.42338747296281, 13.448258792086783], + [-43.35949239675965, 13.589966310929958], + [-43.30011662127839, 13.733534007232125], + [-43.24532452324475, 13.878824369893351], + [-43.19517652798963, 14.02569803746643], + [-43.1497290375995, 14.17401391699801], + [-43.10903436032069, 14.323629304710217], + [-43.0731406412373, 14.474400008500469], + [-43.0420917942556, 14.62618047223891], + [-43.01592743544116, 14.778823901844126], + [-42.99468281777072, 14.932182393118635], + [-42.97838876737559, 15.086107061325604], + [-42.96707162137038, 15.240448172487719], + [-42.96075316737811, 15.395055276387788], + [-42.95945058487953, 15.549777341248761], + [-42.9631763885335, 15.704462890067862], + [-42.97193837363253, 15.858960138576112], + [-42.98573956387657, 16.01311713478999], + [-43.0045781616657, 16.166781900116813], + [-43.02844750113097, 16.3198025719694], + [-43.05733600413948, 16.472027547838653], + [-43.091227139527035, 16.623305630764822], + [-43.13009938582773, 16.773486176140292], + [-43.17392619778467, 16.92241923976654], + [-43.222675976940096, 17.069955727078867], + [-43.27631204661534, 17.215947543441043], + [-43.33479263160185, 17.36024774540107], + [-43.39807084289373, 17.50271069278718], + [-43.46609466779865, 17.6431922015106], + [-43.5388069657692, 17.78154969692906], + [-43.61614547029868, 17.91764236761125], + [-43.69804279722522, 18.05133131932943], + [-43.784426459785095, 18.182479729093348], + [-43.87521889075008, 18.31095299902511], + [-43.97033747197517, 18.436618909860883], + [-44.06969457167063, 18.559347773852025], + [-44.17319758969739, 18.679012586824825], + [-44.28074901116656, 18.795489179145836], + [-44.392246468602174, 18.908656365327097], + [-44.50758281290139, 19.018396091994862], + [-44.62664619329874, 19.124593583934423], + [-44.749320146509646, 19.22713748791452], + [-44.87548369519464, 19.32592001398626], + [-45.00501145584906, 19.42083707394453], + [-45.1377737561832, 19.511788416634175], + [-45.27363676201663, 19.598677759778948], + [-45.412462613666115, 19.681412918008824], + [-45.55410957176119, 19.759905926760144], + [-45.698432172374034, 19.83407316172425], + [-45.84528139130244, 19.903835453522767], + [-45.994504817295116, 19.96911819729244], + [-46.14594683396001, 20.029851456869007], + [-46.29944881004656, 20.08597006326818], + [-46.454849297744836, 20.137413707172044], + [-46.611984238596335, 20.18412702514188], + [-46.770687176565936, 20.226059679292508], + [-46.93078947777967, 20.263166430179375], + [-47.092120556391734, 20.29540720266754], + [-47.25450810600514, 20.32274714457111], + [-47.41777833603441, 20.34515667787273], + [-47.58175621236685, 20.362611542355154], + [-47.746265701650685, 20.37509283150062], + [-47.91113001851412, 20.382587020538292], + [-48.076171875, 20.385085986545977] ] ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa4529be13..400c053935 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4525,12 +4525,6 @@ importers: packages/turf-nearest-point-on-line: dependencies: - '@turf/bearing': - specifier: workspace:^ - version: link:../turf-bearing - '@turf/destination': - specifier: workspace:^ - version: link:../turf-destination '@turf/distance': specifier: workspace:^ version: link:../turf-distance @@ -4540,9 +4534,6 @@ importers: '@turf/invariant': specifier: workspace:^ version: link:../turf-invariant - '@turf/line-intersect': - specifier: workspace:^ - version: link:../turf-line-intersect '@turf/meta': specifier: workspace:^ version: link:../turf-meta @@ -4827,6 +4818,9 @@ importers: '@turf/meta': specifier: workspace:^ version: link:../turf-meta + '@turf/nearest-point-on-line': + specifier: workspace:^ + version: link:../turf-nearest-point-on-line '@turf/projection': specifier: workspace:^ version: link:../turf-projection