diff --git a/packages/turf-nearest-point-to-line/package.json b/packages/turf-nearest-point-to-line/package.json index 23b4b8f1e8..13fa3a7dde 100644 --- a/packages/turf-nearest-point-to-line/package.json +++ b/packages/turf-nearest-point-to-line/package.json @@ -35,6 +35,7 @@ "devDependencies": { "@turf/circle": "^4.7.3", "@turf/helpers": "4.7.1", + "@turf/truncate": "^4.7.3", "benchmark": "^2.1.4", "load-json-file": "^2.0.0", "tape": "^4.6.3", diff --git a/packages/turf-nearest-point-to-line/test.js b/packages/turf-nearest-point-to-line/test.js index a00b99f5e7..1b0674ce48 100644 --- a/packages/turf-nearest-point-to-line/test.js +++ b/packages/turf-nearest-point-to-line/test.js @@ -4,6 +4,7 @@ const path = require('path'); const load = require('load-json-file'); const write = require('write-json-file'); const circle = require('@turf/circle'); +const truncate = require('@turf/truncate'); const {geometryCollection, featureCollection, point, lineString, round} = require('@turf/helpers'); const nearestPointToLine = require('./'); @@ -32,7 +33,7 @@ test('turf-nearest-point-to-line', t => { 'marker-size': 'large', 'marker-symbol': 'star' }); - const distanceCircle = circle(nearest, distance || 1, null, units, {fill: '#F00'}); + const distanceCircle = truncate(circle(nearest, distance || 1, null, units, {fill: '#F00'})); const results = featureCollection([points, nearest, line, distanceCircle]); if (process.env.REGEN) write.sync(directories.out + filename, results); 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 0964c957c2..89e8b87e01 100644 --- a/packages/turf-nearest-point-to-line/test/out/fiji.geojson +++ b/packages/turf-nearest-point-to-line/test/out/fiji.geojson @@ -103,264 +103,264 @@ "coordinates": [ [ [ - 180.25817871093747, - -16.92283728273034 + 180.258179, + -16.922837 ], [ - 180.26140745517685, - -16.922989006748615 + 180.261407, + -16.922989 ], [ - 180.2646051203381, - -16.923442718347573 + 180.264605, + -16.923443 ], [ - 180.26774092605737, - -16.924194050196636 + 180.267741, + -16.924194 ], [ - 180.27078468654537, - -16.925235770067523 + 180.270785, + -16.925236 ], [ - 180.27370710076607, - -16.926557850350097 + 180.273707, + -16.926558 ], [ - 180.27648003415976, - -16.928147564442767 + 180.27648, + -16.928148 ], [ - 180.27907678921423, - -16.929989609096015 + 180.279077, + -16.92999 ], [ - 180.28147236229424, - -16.932066251539226 + 180.281472, + -16.932066 ], [ - 180.28364368426517, - -16.934357499983644 + 180.283644, + -16.934357 ], [ - 180.28556984260155, - -16.93684129586978 + 180.28557, + -16.936841 ], [ - 180.28723228284287, - -16.93949372601873 + 180.287232, + -16.939494 ], [ - 180.2886149874553, - -16.942289252655215 + 180.288615, + -16.942289 ], [ - 180.28970463036944, - -16.945200959097615 + 180.289705, + -16.945201 ], [ - 180.29049070569587, - -16.948200808758514 + 180.290491, + -16.948201 ], [ - 180.2909656293636, - -16.951259914970034 + 180.290966, + -16.95126 ], [ - 180.2911248126863, - -16.954348819042398 + 180.291125, + -16.954349 ], [ - 180.29096670712613, - -16.957437773883147 + 180.290967, + -16.957438 ], [ - 180.29049281980318, - -16.960497030448806 + 180.290493, + -16.960497 ], [ - 180.2897076995777, - -16.963497124271584 + 180.289708, + -16.963497 ], [ - 180.28861889381645, - -16.966409159300607 + 180.288619, + -16.966409 ], [ - 180.28723687623776, - -16.969205086321065 + 180.287237, + -16.969205 ], [ - 180.28557494650863, - -16.97185797326481 + 180.285575, + -16.971858 ], [ - 180.28364910254425, - -16.974342264802207 + 180.283649, + -16.974342 ], [ - 180.28147788672385, - -16.97663402870676 + 180.281478, + -16.976634 ], [ - 180.27908220749367, - -16.978711186610127 + 180.279082, + -16.978711 ], [ - 180.27648513806756, - -16.980553726914707 + 180.276485, + -16.980554 ], [ - 180.2737116941619, - -16.982143897802292 + 180.273712, + -16.982144 ], [ - 180.27078859290754, - -16.98346637846897 + 180.270789, + -16.983466 ], [ - 180.2677439952665, - -16.984508426926606 + 180.267744, + -16.984508 ], [ - 180.26460723444615, - -16.98526000293766 + 180.264607, + -16.98526 ], [ - 180.2614085329398, - -16.985713864890837 + 180.261409, + -16.985714 ], [ - 180.25817871093747, - -16.98586563967752 + 180.258179, + -16.985866 ], [ - 180.25494888893516, - -16.985713864890837 + 180.254949, + -16.985714 ], [ - 180.25175018742883, - -16.98526000293766 + 180.25175, + -16.98526 ], [ - 180.24861342660847, - -16.984508426926606 + 180.248613, + -16.984508 ], [ - 180.24556882896744, - -16.98346637846897 + 180.245569, + -16.983466 ], [ - 180.24264572771307, - -16.982143897802292 + 180.242646, + -16.982144 ], [ - 180.23987228380741, - -16.980553726914707 + 180.239872, + -16.980554 ], [ - 180.2372752143813, - -16.978711186610127 + 180.237275, + -16.978711 ], [ - 180.23487953515112, - -16.97663402870676 + 180.23488, + -16.976634 ], [ - 180.23270831933073, - -16.974342264802207 + 180.232708, + -16.974342 ], [ - 180.23078247536634, - -16.97185797326481 + 180.230782, + -16.971858 ], [ - 180.2291205456372, - -16.969205086321065 + 180.229121, + -16.969205 ], [ - 180.2277385280585, - -16.966409159300607 + 180.227739, + -16.966409 ], [ - 180.22664972229728, - -16.963497124271584 + 180.22665, + -16.963497 ], [ - 180.2258646020718, - -16.960497030448806 + 180.225865, + -16.960497 ], [ - 180.22539071474884, - -16.957437773883147 + 180.225391, + -16.957438 ], [ - 180.22523260918868, - -16.954348819042398 + 180.225233, + -16.954349 ], [ - 180.22539179251137, - -16.951259914970034 + 180.225392, + -16.95126 ], [ - 180.2258667161791, - -16.948200808758514 + 180.225867, + -16.948201 ], [ - 180.2266527915055, - -16.945200959097615 + 180.226653, + -16.945201 ], [ - 180.22774243441967, - -16.942289252655215 + 180.227742, + -16.942289 ], [ - 180.2291251390321, - -16.93949372601873 + 180.229125, + -16.939494 ], [ - 180.23078757927343, - -16.93684129586978 + 180.230788, + -16.936841 ], [ - 180.2327137376098, - -16.934357499983644 + 180.232714, + -16.934357 ], [ - 180.23488505958073, - -16.932066251539226 + 180.234885, + -16.932066 ], [ - 180.23728063266074, - -16.929989609096015 + 180.237281, + -16.92999 ], [ - 180.2398773877152, - -16.928147564442767 + 180.239877, + -16.928148 ], [ - 180.24265032110887, - -16.926557850350097 + 180.24265, + -16.926558 ], [ - 180.2455727353296, - -16.925235770067523 + 180.245573, + -16.925236 ], [ - 180.2486164958176, - -16.924194050196636 + 180.248616, + -16.924194 ], [ - 180.25175230153687, - -16.923442718347573 + 180.251752, + -16.923443 ], [ - 180.2549499666981, - -16.922989006748615 + 180.25495, + -16.922989 ], [ - 180.25817871093747, - -16.92283728273034 + 180.258179, + -16.922837 ] ] ] diff --git a/packages/turf-nearest-point-to-line/test/out/on-line.geojson b/packages/turf-nearest-point-to-line/test/out/on-line.geojson index c7a7bddd67..a55cfbb74c 100644 --- a/packages/turf-nearest-point-to-line/test/out/on-line.geojson +++ b/packages/turf-nearest-point-to-line/test/out/on-line.geojson @@ -136,264 +136,264 @@ "coordinates": [ [ [ - -22.818603515625, - 15.324966328041096 + -22.818604, + 15.324966 ], [ - -22.817689814037777, - 15.324923034981438 + -22.81769, + 15.324923 ], [ - -22.816784913022158, - 15.32479357279178 + -22.816785, + 15.324794 ], [ - -22.815897528352142, - 15.324579188422172 + -22.815898, + 15.324579 ], [ - -22.81503620702483, - 15.324281946768512 + -22.815036, + 15.324282 ], [ - -22.8142092449098, - 15.323904710776553 + -22.814209, + 15.323905 ], [ - -22.813424606821755, - 15.323451113856875 + -22.813425, + 15.323451 ], [ - -22.812689849787404, - 15.322925524876926 + -22.81269, + 15.322926 ], [ - -22.812012050246686, - 15.32233300606795 + -22.812012, + 15.322333 ], [ - -22.81139773589021, - 15.321679264252845 + -22.811398, + 15.321679 ], [ - -22.810852822789766, - 15.320970595865477 + -22.810853, + 15.320971 ], [ - -22.810382558427623, - 15.320213826291695 + -22.810383, + 15.320214 ], [ - -22.809991471173092, - 15.319416244117111 + -22.809991, + 15.319416 ], [ - -22.80968332669234, - 15.318585530915522 + -22.809683, + 15.318586 ], [ - -22.809461091710627, - 15.317729687254959 + -22.809461, + 15.31773 ], [ - -22.80932690547472, - 15.31685695563459 + -22.809327, + 15.316857 ], [ - -22.809282059189137, - 15.315975741095059 + -22.809282, + 15.315976 ], [ - -22.809326983622757, - 15.3150945302673 + -22.809327, + 15.315095 ], [ - -22.809461245003522, - 15.314221809639605 + -22.809461, + 15.314222 ], [ - -22.80968354923913, - 15.313365983830181 + -22.809684, + 15.313366 ], [ - -22.80999175442142, - 15.31253529465218 + -22.809992, + 15.312535 ], [ - -22.810382891492427, - 15.311737741750424 + -22.810383, + 15.311738 ], [ - -22.810853192871548, - 15.310981005573773 + -22.810853, + 15.310981 ], [ - -22.81139812876694, - 15.310272373424402 + -22.811398, + 15.310272 ], [ - -22.812012450820323, - 15.309618669295554 + -22.812012, + 15.309619 ], [ - -22.81269024266413, - 15.309026188172842 + -22.81269, + 15.309026 ], [ - -22.813424976903544, - 15.308500635430889 + -22.813425, + 15.308501 ], [ - -22.81420957797461, - 15.308047071908343 + -22.81421, + 15.308047 ], [ - -22.81503649027317, - 15.30766986518921 + -22.815036, + 15.30767 ], [ - -22.815897750898937, - 15.307372647559141 + -22.815898, + 15.307373 ], [ - -22.816785066315056, - 15.307158281040671 + -22.816785, + 15.307158 ], [ - -22.817689892185818, - 15.30702882984369 + -22.81769, + 15.307029 ], [ - -22.818603515625, - 15.306985540495802 + -22.818604, + 15.306986 ], [ - -22.819517139064185, - 15.30702882984369 + -22.819517, + 15.307029 ], [ - -22.820421964934948, - 15.307158281040671 + -22.820422, + 15.307158 ], [ - -22.821309280351066, - 15.307372647559141 + -22.821309, + 15.307373 ], [ - -22.822170540976835, - 15.30766986518921 + -22.822171, + 15.30767 ], [ - -22.822997453275395, - 15.308047071908343 + -22.822997, + 15.308047 ], [ - -22.82378205434646, - 15.308500635430889 + -22.823782, + 15.308501 ], [ - -22.824516788585875, - 15.309026188172842 + -22.824517, + 15.309026 ], [ - -22.82519458042968, - 15.309618669295554 + -22.825195, + 15.309619 ], [ - -22.825808902483065, - 15.310272373424402 + -22.825809, + 15.310272 ], [ - -22.826353838378456, - 15.310981005573773 + -22.826354, + 15.310981 ], [ - -22.826824139757573, - 15.311737741750424 + -22.826824, + 15.311738 ], [ - -22.827215276828582, - 15.31253529465218 + -22.827215, + 15.312535 ], [ - -22.827523482010875, - 15.313365983830181 + -22.827523, + 15.313366 ], [ - -22.82774578624648, - 15.314221809639605 + -22.827746, + 15.314222 ], [ - -22.827880047627243, - 15.3150945302673 + -22.82788, + 15.315095 ], [ - -22.827924972060867, - 15.315975741095059 + -22.827925, + 15.315976 ], [ - -22.827880125775284, - 15.31685695563459 + -22.82788, + 15.316857 ], [ - -22.827745939539373, - 15.317729687254959 + -22.827746, + 15.31773 ], [ - -22.827523704557663, - 15.318585530915522 + -22.827524, + 15.318586 ], [ - -22.82721556007691, - 15.319416244117111 + -22.827216, + 15.319416 ], [ - -22.82682447282238, - 15.320213826291695 + -22.826824, + 15.320214 ], [ - -22.826354208460238, - 15.320970595865477 + -22.826354, + 15.320971 ], [ - -22.82580929535979, - 15.321679264252845 + -22.825809, + 15.321679 ], [ - -22.825194981003317, - 15.32233300606795 + -22.825195, + 15.322333 ], [ - -22.8245171814626, - 15.322925524876926 + -22.824517, + 15.322926 ], [ - -22.82378242442825, - 15.323451113856875 + -22.823782, + 15.323451 ], [ - -22.822997786340203, - 15.323904710776553 + -22.822998, + 15.323905 ], [ - -22.822170824225175, - 15.324281946768512 + -22.822171, + 15.324282 ], [ - -22.821309502897858, - 15.324579188422172 + -22.82131, + 15.324579 ], [ - -22.820422118227846, - 15.32479357279178 + -22.820422, + 15.324794 ], [ - -22.819517217212226, - 15.324923034981438 + -22.819517, + 15.324923 ], [ - -22.818603515625, - 15.324966328041096 + -22.818604, + 15.324966 ] ] ] 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 170e3a79db..45f1604eb8 100644 --- a/packages/turf-nearest-point-to-line/test/out/one.geojson +++ b/packages/turf-nearest-point-to-line/test/out/one.geojson @@ -82,264 +82,264 @@ "coordinates": [ [ [ - 29.7509765625, - 18.020369523707792 + 29.750977, + 18.02037 ], [ - 29.798401827482373, - 18.0181482267381 + 29.798402, + 18.018148 ], [ - 29.845366834454154, - 18.011505895238997 + 29.845367, + 18.011506 ], [ - 29.89141589739495, - 18.000506993132046 + 29.891416, + 18.000507 ], [ - 29.936102424532006, - 17.98525824826815 + 29.936102, + 17.985258 ], [ - 29.97899334186073, - 17.965907592565877 + 29.978993, + 17.965908 ], [ - 30.01967337036126, - 17.94264269441037 + 30.019673, + 17.942643 ], [ - 30.05774911145306, - 17.91568909922797 + 30.057749, + 17.915689 ], [ - 30.092852897954906, - 17.88530799829273 + 30.092853, + 17.885308 ], [ - 30.124646371091774, - 17.851793649673876 + 30.124646, + 17.851794 ], [ - 30.152823747832677, - 17.81547047874912 + 30.152824, + 17.81547 ], [ - 30.17711474696761, - 17.776689888849123 + 30.177115, + 17.77669 ], [ - 30.19728714674601, - 17.735826815332185 + 30.197287, + 17.735827 ], [ - 30.21314895151163, - 17.69327605869468 + 30.213149, + 17.693276 ], [ - 30.22455014949058, - 17.649448434189697 + 30.22455, + 17.649448 ], [ - 30.231384048636933, - 17.604766776848717 + 30.231384, + 17.604767 ], [ - 30.23358818213892, - 17.55966184178362 + 30.233588, + 17.559662 ], [ - 30.231144779771462, - 17.51456814019756 + 30.231145, + 17.514568 ], [ - 30.224080805694253, - 17.469919751668844 + 30.224081, + 17.46992 ], [ - 30.212467567493327, - 17.426146153011082 + 30.212468, + 17.426146 ], [ - 30.19641990521581, - 17.383668103377314 + 30.19642, + 17.383668 ], [ - 30.176094972829894, - 17.342893624290557 + 30.176095, + 17.342894 ], [ - 30.151690627939942, - 17.30421411197222 + 30.151691, + 17.304214 ], [ - 30.123443448695813, - 17.26800061773043 + 30.123443, + 17.268001 ], [ - 30.091626399654885, - 17.23460033028599 + 30.091626, + 17.2346 ], [ - 30.056546170890677, - 17.204333291781133 + 30.056546, + 17.204333 ], [ - 30.018540216901354, - 17.17748937685841 + 30.01854, + 17.177489 ], [ - 29.977973523865394, - 17.15432556163748 + 29.977974, + 17.154326 ], [ - 29.935235135530665, - 17.135063506679593 + 29.935235, + 17.135064 ], [ - 29.89073446951902, - 17.119887475133638 + 29.890734, + 17.119887 ], [ - 29.84489745709067, - 17.108942604226822 + 29.844897, + 17.108943 ], [ - 29.798162540450477, - 17.102333545116693 + 29.798163, + 17.102334 ], [ - 29.7509765625, - 17.100123482882008 + 29.750977, + 17.100123 ], [ - 29.703790584549523, - 17.102333545116693 + 29.703791, + 17.102334 ], [ - 29.65705566790933, - 17.108942604226822 + 29.657056, + 17.108943 ], [ - 29.611218655480975, - 17.119887475133638 + 29.611219, + 17.119887 ], [ - 29.566717989469335, - 17.135063506679593 + 29.566718, + 17.135064 ], [ - 29.523979601134602, - 17.15432556163748 + 29.52398, + 17.154326 ], [ - 29.483412908098643, - 17.17748937685841 + 29.483413, + 17.177489 ], [ - 29.445406954109323, - 17.204333291781133 + 29.445407, + 17.204333 ], [ - 29.41032672534511, - 17.23460033028599 + 29.410327, + 17.2346 ], [ - 29.378509676304184, - 17.26800061773043 + 29.37851, + 17.268001 ], [ - 29.350262497060054, - 17.30421411197222 + 29.350262, + 17.304214 ], [ - 29.325858152170106, - 17.342893624290557 + 29.325858, + 17.342894 ], [ - 29.305533219784188, - 17.383668103377314 + 29.305533, + 17.383668 ], [ - 29.289485557506673, - 17.426146153011082 + 29.289486, + 17.426146 ], [ - 29.277872319305743, - 17.469919751668844 + 29.277872, + 17.46992 ], [ - 29.270808345228538, - 17.51456814019756 + 29.270808, + 17.514568 ], [ - 29.268364942861076, - 17.55966184178362 + 29.268365, + 17.559662 ], [ - 29.270569076363067, - 17.604766776848717 + 29.270569, + 17.604767 ], [ - 29.27740297550942, - 17.649448434189697 + 29.277403, + 17.649448 ], [ - 29.28880417348837, - 17.69327605869468 + 29.288804, + 17.693276 ], [ - 29.304665978253986, - 17.735826815332185 + 29.304666, + 17.735827 ], [ - 29.324838378032386, - 17.776689888849123 + 29.324838, + 17.77669 ], [ - 29.349129377167323, - 17.81547047874912 + 29.349129, + 17.81547 ], [ - 29.377306753908226, - 17.851793649673876 + 29.377307, + 17.851794 ], [ - 29.40910022704509, - 17.88530799829273 + 29.4091, + 17.885308 ], [ - 29.444204013546937, - 17.91568909922797 + 29.444204, + 17.915689 ], [ - 29.482279754638736, - 17.94264269441037 + 29.48228, + 17.942643 ], [ - 29.522959783139267, - 17.965907592565877 + 29.52296, + 17.965908 ], [ - 29.565850700467994, - 17.98525824826815 + 29.565851, + 17.985258 ], [ - 29.61053722760505, - 18.000506993132046 + 29.610537, + 18.000507 ], [ - 29.656586290545846, - 18.011505895238997 + 29.656586, + 18.011506 ], [ - 29.703551297517627, - 18.0181482267381 + 29.703551, + 18.018148 ], [ - 29.7509765625, - 18.020369523707792 + 29.750977, + 18.02037 ] ] ] diff --git a/packages/turf-nearest-point-to-line/test/out/resolute.geojson b/packages/turf-nearest-point-to-line/test/out/resolute.geojson index 58a94f7299..b4fa34d8d7 100644 --- a/packages/turf-nearest-point-to-line/test/out/resolute.geojson +++ b/packages/turf-nearest-point-to-line/test/out/resolute.geojson @@ -89,264 +89,264 @@ "coordinates": [ [ [ - -87.2314453125, - 75.74515005991336 + -87.231445, + 75.74515 ], [ - -87.13711546640516, - 75.74399036006236 + -87.137115, + 75.74399 ], [ - -87.04373852535383, - 75.74052298011723 + -87.043739, + 75.740523 ], [ - -86.95225641538097, - 75.7347829435378 + -86.952256, + 75.734783 ], [ - -86.86358928800111, - 75.72682817383318 + -86.863589, + 75.726828 ], [ - -86.77862508612732, - 75.71673882911684 + -86.778625, + 75.716739 ], [ - -86.69820963851318, - 75.70461638611047 + -86.69821, + 75.704616 ], [ - -86.62313743422634, - 75.69058248864654 + -86.623137, + 75.690582 ], [ - -86.5541432091043, - 75.67477757922566 + -86.554143, + 75.674778 ], [ - -86.49189445353588, - 75.6573593351559 + -86.491894, + 75.657359 ], [ - -86.43698492629511, - 75.63850093317049 + -86.436985, + 75.638501 ], [ - -86.38992923359613, - 75.61838916815753 + -86.389929, + 75.618389 ], [ - -86.35115850708308, - 75.59722245272981 + -86.351159, + 75.597222 ], [ - -86.32101719007805, - 75.57520872483734 + -86.321017, + 75.575209 ], [ - -86.29976091890596, - 75.55256329051855 + -86.299761, + 75.552563 ], [ - -86.28755546616019, - 75.52950662825931 + -86.287555, + 75.529507 ], [ - -86.28447669584223, - 75.5062621803556 + -86.284477, + 75.506262 ], [ - -86.29051146669086, - 75.48305415523733 + -86.290511, + 75.483054 ], [ - -86.30555940981604, - 75.46010536299346 + -86.305559, + 75.460105 ], [ - -86.32943549991796, - 75.43763510442683 + -86.329435, + 75.437635 ], [ - -86.3618733357048, - 75.4158571319414 + -86.361873, + 75.415857 ], [ - -86.40252904432666, - 75.3949776984985 + -86.402529, + 75.394978 ], [ - -86.45098572633513, - 75.37519370883514 + -86.450986, + 75.375194 ], [ - -86.50675836143384, - 75.3566909851694 + -86.506758, + 75.356691 ], [ - -86.56929910065334, - 75.33964265776739 + -86.569299, + 75.339643 ], [ - -86.63800287711936, - 75.32420768904333 + -86.638003, + 75.324208 ], [ - -86.71221327485428, - 75.310529538328 + -86.712213, + 75.31053 ], [ - -86.79122860266388, - 75.2987349730824 + -86.791229, + 75.298735 ], [ - -86.87430812775848, - 75.2889330311531 + -86.874308, + 75.288933 ], [ - -86.9606784310271, - 75.28121413765774 + -86.960678, + 75.281214 ], [ - -87.04953985256526, - 75.27564937924163 + -87.04954, + 75.275649 ], [ - -87.1400730019311, - 75.27228993774082 + -87.140073, + 75.27229 ], [ - -87.2314453125, - 75.27116668470433 + -87.231445, + 75.271167 ], [ - -87.3228176230689, - 75.27228993774082 + -87.322818, + 75.27229 ], [ - -87.41335077243474, - 75.27564937924163 + -87.413351, + 75.275649 ], [ - -87.5022121939729, - 75.28121413765774 + -87.502212, + 75.281214 ], [ - -87.58858249724152, - 75.2889330311531 + -87.588582, + 75.288933 ], [ - -87.67166202233614, - 75.2987349730824 + -87.671662, + 75.298735 ], [ - -87.75067735014574, - 75.310529538328 + -87.750677, + 75.31053 ], [ - -87.82488774788064, - 75.32420768904333 + -87.824888, + 75.324208 ], [ - -87.89359152434668, - 75.33964265776739 + -87.893592, + 75.339643 ], [ - -87.95613226356616, - 75.3566909851694 + -87.956132, + 75.356691 ], [ - -88.01190489866487, - 75.37519370883514 + -88.011905, + 75.375194 ], [ - -88.06036158067334, - 75.3949776984985 + -88.060362, + 75.394978 ], [ - -88.1010172892952, - 75.4158571319414 + -88.101017, + 75.415857 ], [ - -88.13345512508204, - 75.43763510442683 + -88.133455, + 75.437635 ], [ - -88.15733121518396, - 75.46010536299346 + -88.157331, + 75.460105 ], [ - -88.17237915830916, - 75.48305415523733 + -88.172379, + 75.483054 ], [ - -88.17841392915777, - 75.5062621803556 + -88.178414, + 75.506262 ], [ - -88.17533515883981, - 75.52950662825931 + -88.175335, + 75.529507 ], [ - -88.16312970609404, - 75.55256329051855 + -88.16313, + 75.552563 ], [ - -88.14187343492195, - 75.57520872483734 + -88.141873, + 75.575209 ], [ - -88.11173211791692, - 75.59722245272981 + -88.111732, + 75.597222 ], [ - -88.07296139140387, - 75.61838916815753 + -88.072961, + 75.618389 ], [ - -88.02590569870489, - 75.63850093317049 + -88.025906, + 75.638501 ], [ - -87.97099617146412, - 75.6573593351559 + -87.970996, + 75.657359 ], [ - -87.9087474158957, - 75.67477757922566 + -87.908747, + 75.674778 ], [ - -87.83975319077366, - 75.69058248864654 + -87.839753, + 75.690582 ], [ - -87.76468098648682, - 75.70461638611047 + -87.764681, + 75.704616 ], [ - -87.68426553887268, - 75.71673882911684 + -87.684266, + 75.716739 ], [ - -87.59930133699889, - 75.72682817383318 + -87.599301, + 75.726828 ], [ - -87.51063420961903, - 75.7347829435378 + -87.510634, + 75.734783 ], [ - -87.41915209964617, - 75.74052298011723 + -87.419152, + 75.740523 ], [ - -87.32577515859484, - 75.74399036006236 + -87.325775, + 75.74399 ], [ - -87.2314453125, - 75.74515005991336 + -87.231445, + 75.74515 ] ] ] diff --git a/packages/turf-nearest-point-to-line/test/out/segment.geojson b/packages/turf-nearest-point-to-line/test/out/segment.geojson index e46f3a930a..ce518adee3 100644 --- a/packages/turf-nearest-point-to-line/test/out/segment.geojson +++ b/packages/turf-nearest-point-to-line/test/out/segment.geojson @@ -74,264 +74,264 @@ "coordinates": [ [ [ - 27.268066406250004, - 15.046566556329937 + 27.268066, + 15.046567 ], [ - 27.34961301171175, - 15.04268354039556 + 27.349613, + 15.042684 ], [ - 27.43036560509869, - 15.031072310022385 + 27.430366, + 15.031072 ], [ - 27.509538173049005, - 15.01184593581434 + 27.509538, + 15.011846 ], [ - 27.5863606074305, - 14.985191600951385 + 27.586361, + 14.985192 ], [ - 27.660086429082174, - 14.951368714975777 + 27.660086, + 14.951369 ], [ - 27.730000241379773, - 14.910706303849164 + 27.73, + 14.910706 ], [ - 27.795424830851758, - 14.863599706357817 + 27.795425, + 14.8636 ], [ - 27.85572783799104, - 14.81050661459659 + 27.855728, + 14.810507 ], [ - 27.91032792842231, - 14.751942503259729 + 27.910328, + 14.751943 ], [ - 27.95870040247301, - 14.688475498713954 + 27.9587, + 14.688475 ], [ - 28.000382189720955, - 14.620720744257305 + 28.000382, + 14.620721 ], [ - 28.034976184014795, - 14.549334322532511 + 28.034976, + 14.549334 ], [ - 28.06215488355595, - 14.475006799748384 + 28.062155, + 14.475007 ], [ - 28.081663309682863, - 14.398456459170907 + 28.081663, + 14.398456 ], [ - 28.09332118682831, - 14.32042229330184 + 28.093321, + 14.320422 ], [ - 28.097024374579817, - 14.241656825306483 + 28.097024, + 14.241657 ], [ - 28.09274555074808, - 14.162918830634434 + 28.092746, + 14.162919 ], [ - 28.080534151762517, - 14.084966029456634 + 28.080534, + 14.084966 ], [ - 28.060515583523284, - 14.008547819579189 + 28.060516, + 14.008548 ], [ - 28.032889722032387, - 13.934398117950755 + 28.03289, + 13.934398 ], [ - 27.997928728714665, - 13.863228376812856 + 27.997929, + 13.863228 ], [ - 27.95597421035276, - 13.795720838003911 + 27.955974, + 13.795721 ], [ - 27.907433758040774, - 13.732522085964083 + 27.907434, + 13.732522 ], [ - 27.852776903557245, - 13.674236956639005 + 27.852777, + 13.674237 ], [ - 27.79253053511818, - 13.621422855779503 + 27.792531, + 13.621423 ], [ - 27.727273817639144, - 13.574584536110509 + 27.727274, + 13.574585 ], [ - 27.65763266544927, - 13.534169378520284 + 27.657633, + 13.534169 ], [ - 27.584273817887407, - 13.500563217824318 + 27.584274, + 13.500563 ], [ - 27.50789857038972, - 13.474086748809798 + 27.507899, + 13.474087 ], [ - 27.42923621555796, - 13.45499254319047 + 27.429236, + 13.454993 ], [ - 27.349037250279473, - 13.443462702824968 + 27.349037, + 13.443463 ], [ - 27.268066406250004, - 13.439607169103843 + 27.268066, + 13.439607 ], [ - 27.18709556222053, - 13.443462702824968 + 27.187096, + 13.443463 ], [ - 27.106896596942043, - 13.45499254319047 + 27.106897, + 13.454993 ], [ - 27.028234242110283, - 13.474086748809798 + 27.028234, + 13.474087 ], [ - 26.9518589946126, - 13.500563217824318 + 26.951859, + 13.500563 ], [ - 26.878500147050733, - 13.534169378520284 + 26.8785, + 13.534169 ], [ - 26.80885899486086, - 13.574584536110509 + 26.808859, + 13.574585 ], [ - 26.743602277381825, - 13.621422855779503 + 26.743602, + 13.621423 ], [ - 26.683355908942758, - 13.674236956639005 + 26.683356, + 13.674237 ], [ - 26.62869905445923, - 13.732522085964083 + 26.628699, + 13.732522 ], [ - 26.580158602147243, - 13.795720838003911 + 26.580159, + 13.795721 ], [ - 26.53820408378534, - 13.863228376812856 + 26.538204, + 13.863228 ], [ - 26.503243090467617, - 13.934398117950755 + 26.503243, + 13.934398 ], [ - 26.47561722897672, - 14.008547819579189 + 26.475617, + 14.008548 ], [ - 26.455598660737486, - 14.084966029456634 + 26.455599, + 14.084966 ], [ - 26.443387261751923, - 14.162918830634434 + 26.443387, + 14.162919 ], [ - 26.439108437920186, - 14.241656825306483 + 26.439108, + 14.241657 ], [ - 26.442811625671695, - 14.32042229330184 + 26.442812, + 14.320422 ], [ - 26.45446950281714, - 14.398456459170907 + 26.45447, + 14.398456 ], [ - 26.473977928944052, - 14.475006799748384 + 26.473978, + 14.475007 ], [ - 26.50115662848521, - 14.549334322532511 + 26.501157, + 14.549334 ], [ - 26.535750622779048, - 14.620720744257305 + 26.535751, + 14.620721 ], [ - 26.577432410026994, - 14.688475498713954 + 26.577432, + 14.688475 ], [ - 26.625804884077695, - 14.751942503259729 + 26.625805, + 14.751943 ], [ - 26.680404974508964, - 14.810506614596587 + 26.680405, + 14.810507 ], [ - 26.740707981648246, - 14.863599706357817 + 26.740708, + 14.8636 ], [ - 26.80613257112023, - 14.910706303849164 + 26.806133, + 14.910706 ], [ - 26.87604638341783, - 14.951368714975777 + 26.876046, + 14.951369 ], [ - 26.949772205069504, - 14.985191600951385 + 26.949772, + 14.985192 ], [ - 27.026594639450998, - 15.01184593581434 + 27.026595, + 15.011846 ], [ - 27.10576720740131, - 15.031072310022385 + 27.105767, + 15.031072 ], [ - 27.186519800788254, - 15.04268354039556 + 27.18652, + 15.042684 ], [ - 27.268066406250004, - 15.046566556329937 + 27.268066, + 15.046567 ] ] ] 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 7299626af9..1d7947f296 100644 --- a/packages/turf-nearest-point-to-line/test/out/two.geojson +++ b/packages/turf-nearest-point-to-line/test/out/two.geojson @@ -93,264 +93,264 @@ "coordinates": [ [ [ - -38.0126953125, - 26.89706388840599 + -38.012695, + 26.897064 ], [ - -37.93552441172803, - 26.893662035598062 + -37.935524, + 26.893662 ], [ - -37.85911039862827, - 26.883489849979018 + -37.85911, + 26.88349 ], [ - -37.784202324290746, - 26.866647103835728 + -37.784202, + 26.866647 ], [ - -37.71153366503345, - 26.84329893494962 + -37.711534, + 26.843299 ], [ - -37.641814778996846, - 26.81367413783948 + -37.641815, + 26.813674 ], [ - -37.57572564999091, - 26.7780628017451 + -37.575726, + 26.778063 ], [ - -37.513909005361654, - 26.736813324835175 + -37.513909, + 26.736813 ], [ - -37.456963887376354, - 26.69032884149463 + -37.456964, + 26.690329 ], [ - -37.40543974905283, - 26.63906310618754 + -37.40544, + 26.639063 ], [ - -37.35983113577391, - 26.583515883199183 + -37.359831, + 26.583516 ], [ - -37.32057300375018, - 26.52422789646192 + -37.320573, + 26.524228 ], [ - -37.288036715741825, - 26.461775397622354 + -37.288037, + 26.461775 ], [ - -37.262526743730376, - 26.396764413500016 + -37.262527, + 26.396764 ], [ - -37.244278097726884, - 26.32982473613523 + -37.244278, + 26.329825 ], [ - -37.23345448986008, - 26.261603719765624 + -37.233454, + 26.261604 ], [ - -37.23014723350783, - 26.192759949365364 + -37.230147, + 26.19276 ], [ - -37.23437486867239, - 26.123956844902548 + -37.234375, + 26.123957 ], [ - -37.2460834971584, - 26.05585626430064 + -37.246083, + 26.055856 ], [ - -37.26514780444807, - 25.98911216631813 + -37.265148, + 25.989112 ], [ - -37.29137273949325, - 25.924364392274782 + -37.291373, + 25.924364 ], [ - -37.32449581893367, - 25.862232622838107 + -37.324496, + 25.862233 ], [ - -37.36419001844701, - 25.80331056301978 + -37.36419, + 25.803311 ], [ - -37.41006721096029, - 25.74816040518909 + -37.410067, + 25.74816 ], [ - -37.46168210920786, - 25.697307616351463 + -37.461682, + 25.697308 ], [ - -37.5185366685034, - 25.651236092216436 + -37.518537, + 25.651236 ], [ - -37.5800849044965, - 25.610383716733395 + -37.580085, + 25.610384 ], [ - -37.6457380800029, - 25.57513836183868 + -37.645738, + 25.575138 ], [ - -37.71487021463542, - 25.545834358159915 + -37.71487, + 25.545834 ], [ - -37.786823870831, - 25.522749463381285 + -37.786824, + 25.522749 ], [ - -37.86091616989228, - 25.506102350900992 + -37.860916, + 25.506102 ], [ - -37.93644499177463, - 25.496050637318874 + -37.936445, + 25.496051 ], [ - -38.0126953125, - 25.492689463184444 + -38.012695, + 25.492689 ], [ - -38.08894563322538, - 25.496050637318874 + -38.088946, + 25.496051 ], [ - -38.16447445510772, - 25.506102350900992 + -38.164474, + 25.506102 ], [ - -38.238566754169, - 25.522749463381285 + -38.238567, + 25.522749 ], [ - -38.31052041036459, - 25.545834358159915 + -38.31052, + 25.545834 ], [ - -38.37965254499711, - 25.57513836183868 + -38.379653, + 25.575138 ], [ - -38.445305720503505, - 25.610383716733395 + -38.445306, + 25.610384 ], [ - -38.506853956496606, - 25.651236092216436 + -38.506854, + 25.651236 ], [ - -38.56370851579215, - 25.697307616351463 + -38.563709, + 25.697308 ], [ - -38.61532341403971, - 25.74816040518909 + -38.615323, + 25.74816 ], [ - -38.66120060655299, - 25.80331056301978 + -38.661201, + 25.803311 ], [ - -38.70089480606633, - 25.862232622838107 + -38.700895, + 25.862233 ], [ - -38.73401788550676, - 25.924364392274782 + -38.734018, + 25.924364 ], [ - -38.76024282055194, - 25.98911216631813 + -38.760243, + 25.989112 ], [ - -38.7793071278416, - 26.05585626430064 + -38.779307, + 26.055856 ], [ - -38.79101575632762, - 26.123956844902548 + -38.791016, + 26.123957 ], [ - -38.79524339149218, - 26.192759949365364 + -38.795243, + 26.19276 ], [ - -38.79193613513993, - 26.261603719765624 + -38.791936, + 26.261604 ], [ - -38.78111252727312, - 26.32982473613523 + -38.781113, + 26.329825 ], [ - -38.76286388126963, - 26.396764413500016 + -38.762864, + 26.396764 ], [ - -38.73735390925818, - 26.461775397622354 + -38.737354, + 26.461775 ], [ - -38.70481762124983, - 26.52422789646192 + -38.704818, + 26.524228 ], [ - -38.6655594892261, - 26.583515883199183 + -38.665559, + 26.583516 ], [ - -38.61995087594717, - 26.63906310618754 + -38.619951, + 26.639063 ], [ - -38.56842673762365, - 26.69032884149463 + -38.568427, + 26.690329 ], [ - -38.51148161963835, - 26.736813324835175 + -38.511482, + 26.736813 ], [ - -38.44966497500909, - 26.7780628017451 + -38.449665, + 26.778063 ], [ - -38.38357584600316, - 26.81367413783948 + -38.383576, + 26.813674 ], [ - -38.31385695996656, - 26.84329893494962 + -38.313857, + 26.843299 ], [ - -38.24118830070926, - 26.866647103835728 + -38.241188, + 26.866647 ], [ - -38.16628022637174, - 26.883489849979018 + -38.16628, + 26.88349 ], [ - -38.089866213271975, - 26.893662035598062 + -38.089866, + 26.893662 ], [ - -38.0126953125, - 26.89706388840599 + -38.012695, + 26.897064 ] ] ] diff --git a/packages/turf-nearest-point-to-line/yarn.lock b/packages/turf-nearest-point-to-line/yarn.lock index da3a09ba45..c8c241ac59 100644 --- a/packages/turf-nearest-point-to-line/yarn.lock +++ b/packages/turf-nearest-point-to-line/yarn.lock @@ -72,6 +72,12 @@ "@turf/invariant" "^4.7.3" geodesy "1.1.2" +"@turf/truncate@^4.7.3": + version "4.7.3" + resolved "https://registry.yarnpkg.com/@turf/truncate/-/truncate-4.7.3.tgz#827a8df8ff0c9fff9dcf1a4b3145cbdef80fb993" + dependencies: + "@turf/meta" "^4.7.3" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"