Skip to content

Releases: Turfjs/turf

v7.3.0

17 Nov 10:10

Choose a tag to compare

Thanks everyone who contributed to this release!

What's Changed

Fixes to regressions and significant pain points:

Bug fixes and new functionality:

  • Updated link to Chaikin's algorithm - access forbidden to the old link. by @Armatorix in #2804
  • Improved the quality of generated ellipses especially at higher latitudes by @hadbn in #2739
  • Fix - Documented unit used for Earth's radius by @IvoBiaus in #2842
  • turf-hexgrid: fix issue #2841 by @SimonsUnikaNamn in #2856
  • turf-transform-translate: Add warning about shape distortion #217 by @jtheisen in #2831
  • turf-nearest-point: maintain point properties in result type by @EmilJunker in #2866
  • Changed turf-destination and turf-ellipse to pass through elevation value if present by @prozvora in #2852
  • Fixed simplify to not get stuck in an infinite loop on certain geometries by @smallsaucepan in #2830
  • turf-great-circle: Fix antipodal error message by @macrouch in #2884
  • Updates Documentation from Strings to Units by @conor-f in #2838
  • Added missing layer in map example for @turf/line-split docs by @luc-tielen in #2724
  • Changed lineSplit to use bbox from geojson-rbush rather than buggy turf-square by @hanneshdc in #2460
  • Fix @turf/isobands issue with ring nesting logic by @mfedderly in #2925
  • @turf/isobands and @turf/isolines check pointGrid input is actually gridded already by @mfedderly in #2927
  • Fixed cleanCoords to remove points with appropriate tenacity by @smallsaucepan in #2771
  • Use newer @types/rbush that fixes the need for the reexport shims by @mfedderly in #2924
  • Add Kotlin Multiplatform port information to SEE_ALSO.md by @sargunv in #2936
  • @turf/shortest-path Allow polygon feature as obstacle for shortestPath (#2941) by @ziegler-daniel in #2942
  • Fix issue 2824 on turf-point-to-polygon-distance by @LHBruneton-C2C in #2845
  • @turf/shortest-path improve creation of point matrix for A* algorithm (#2943) by @ziegler-daniel in #2944
  • @turf/nearest-point-on-line TESTS: add test for duplicated points on line string affecting v7.2.0 by @alacret in #2903

Housekeeping and behind the scenes changes:

New Contributors

Full Changelog: v7.2.0...v7.3.0

v7.2.0

30 Dec 01:06

Choose a tag to compare

What's Changed

Fixes to regressions and significant pain points:

  • Reverted self intersection behavior: line-intersect by @pm0u in #2742
  • Reverted self intersection behavior for boolean-disjoint by @pm0u in #2772
  • Reverted self intersection behavior for boolean-intersects by @pm0u in #2773
  • Replaced polygon-clipping with polyclip-ts by @cmurphy23 in #2729

Bug fixes and new functionality:

  • Added new point-to-polygon-distance package by @pachacamac in #2735
  • Added bbox parameter to @turf/interpolate by @lemonig in #2768
  • Handle when start and end are the same point in greatCircle by @rowanwins in #2343
  • Fixed turf-angle to consistently measure angles clockwise by @smallsaucepan in #2714
  • Reversed the order in which random polygon points are generated to satisfy the right hand rule by @smallsaucepan in #2715
  • Fixed multiple modules that were performing scalar instead of spherical calculations by @smallsaucepan in #2717
  • Fixed confusing turf-union documentation by @smallsaucepan in #2732
  • Added a cautionary message to Units about measuring length in radians or degrees. by @smallsaucepan in #2748
  • Added special handling to booleanPointOnLine for zero length lines by @smallsaucepan in #2751

Housekeeping and behind the scenes changes:

New Contributors

Full Changelog: v7.1.0...v7.2.0

v7.1.0

09 Aug 20:45

Choose a tag to compare

What's Changed

  • @turf/distance Simplify unnecessary union type in turfDistance by @isti115 in #2618
  • Upgrade to Lerna 8 by @mfedderly in #2612
  • Deprecate CHANGELOG, improve release action, PR template, Contributing doc by @twelch in #2621
  • @turf/helpers Reduce bundle size of apps that import @turf/helpers by @smallsaucepan in #2623
  • @turf/line-overlap change deep-equals dependency for smaller bundle size by @mfedderly in #2631
  • @turf/mask Converted turf-mask to Typescript and added support for geometry parameters by @smallsaucepan in #2644
  • @turf/midpoint Converted turf-midpoint to Typescript by @smallsaucepan in #2645
  • @turf/planepoint Converted turf-planepoint to Typescript by @smallsaucepan in #2646
  • @turf/square Converted turf-square to Typescript by @smallsaucepan in #2648
  • @turf/standard-deviational-ellipse Converted turf-standard-deviational-ellipse to Typescript by @smallsaucepan in #2649
  • Pin pnpm version using corepack by @RobinVdBroeck in #2602
  • @turf/tesselate Converted turf-tesselate to Typescript by @smallsaucepan in #2650
  • @turf/transform-rotate Converted turf-transform-rotate to Typescript by @smallsaucepan in #2651
  • @turf/transform-scale Converted turf-transform-scale to Typescript by @smallsaucepan in #2652
  • @turf/transform-translate Converted turf-transform-translate to Typescript by @smallsaucepan in #2653
  • @turf/unkink-polygon Converted turf-unkink-polygon to Typescript by @smallsaucepan in #2654
  • @turf/voronoi Converted turf-voronoi to Typescript by @smallsaucepan in #2655
  • @turf/boolean-intersects Fix boolean-intersects docs by @izzybps in #2593
  • Updated documentation.js to resolve critical parse-url vulnerability by @smallsaucepan in #2664
  • @turf/area: bug fix: off-by-one bug in area calculation by @Abdumbo99 in #2665
  • Upgrade dependencies by @mfedderly in #2668
  • @turf/isobands @turf/isolines Remove unused matrix-to-grid dependency by @mfedderly in #2669
  • @turf/random fix randomPolygon generating polygons outside of the given bbox by @nnmrts in #2659
  • @turf/boolean-intersects @turf/booean-disjoint Expose options parameter to ignore self intersections. by @01100100 in #2636
  • @turf/boolean-valid fix checkClosingRing to check for polygon being closed by @superDoss in #2563
  • @turf/helpers Implemented azimuthToBearing by @basvdijk in #2674
  • Added support/6.x branch to CI config by @smallsaucepan in #2673
  • @turf/nearest-point-on-line include index of MultiLineString geometries in nearest-point-on-line by @andrewharvey in #2574
  • @turf/point-to-line-distance Fix two small typos by @mfedderly in #2675
  • Update PR/develop action to cache pnpm files by @mfedderly in #2671
  • Add explicit geojson types dependency by @mfedderly in #2676
  • Rework prettier setup by @mfedderly in #2677
  • Update @types/geojson to 7946.0.10 minimum by @mfedderly in #2688
  • @turf/mask Stop turf-mask mutating by default, make it an option by @farkmarnum in #2635
  • Add test.example.js to .prettierignore by @mfedderly in #2689
  • @turf/mask Fix @turf/mask benchmarks to exclude test fixtures that are not usable by @mfedderly in #2692
  • @turf/kinks Revert @turf/kinks to 6.5.0 version by @mfedderly in #2693
  • @turf/cluster-dbscanUpdate cluster-dbscan docs by @mwenko in #2624
  • @turf/*-grid @turf/area @turf/helpers Clarify behavior of some existing turf modules by @twelch in #2683
  • Upgrade pnpm/action-setup in github actions by @mfedderly in #2696

New Contributors

Full Changelog: v7.0.0...v7.1.0

v7.0.0

07 Jun 13:52
v7.0.0
3d3a791

Choose a tag to compare

See v7 CHANGELOG

The docs website is being updated to support versioning. Please be patient.

v6.5.0

14 Jun 17:33
5375941

Choose a tag to compare

🏅 New Features/Enhancements

🐛 Bug Fixes

📖 Documentation

🔔 Misc

v3.0.11

17 Jun 20:43

Choose a tag to compare

  • Fix line slice by @camilleanne in #417
    • removes vendored point-on-line implementation in favor of a local dependency
    • add test fixture for vertical linestrings passed to turf-line-slice

New Contributors

Full Changelog: v3.0.10...v3.0.11

v3.0.4

13 Jun 16:58

Choose a tag to compare

Full Changelog: v3.0.3...v3.0.4

v3.0.3

17 May 17:35

Choose a tag to compare

This publishes turf-collect, which was previously incorrectly named turf-aggregate

Full Changelog: v3.0.2...v3.0.3

v3.0.1

17 May 17:35

Choose a tag to compare

This is a big change in Turf! 3.0.0 is a release that targets the development
cycle of Turf, letting us work on it more and release more often.

Monorepo

Turf 3.x and forward is a monorepo project. We publish lots of little modules
as usual, but there's one repo - turfjs/turf - that contains all the code
and the issues for the Turf source code. We use lerna
to link these packages together and make sure they work.

Why? We already had internal turf modules, like turf-meta, and development
was harder and harder - we had a bunch of custom scripts to do releases and
tests, and these were just written for Turf. Lerna is from the very popular
and very well-maintained babel project, and it
works really well, and reduces maintainer sadness.

Simplicity

Turf grew a bunch of modules that weren't totally necessary, or were
expressing only a line or two of JavaScript. We want to make things easier,
but these modules didn't make code more expressive and they hid complexity
where it didn't need to be hidden. Turf 3.x focuses on the core
functionalities we need, making sure they're tested and performant.

Removed modules: merge, sum, min, max, average, median, variance, deviation, filter, remove, jenks, quantile.
See the upgrade guide below for replacements.

Upgrading from v2

If you were using turf-merge

turf-merge repeatedly called turf-union on an array of polygons. Here's
how to implement the same thing without the special module

var clone = require('clone');
var union = require('turf-union');
function merge(polygons) {
  var merged = clone(polygons.features[0]), features = polygons.features;
  for (var i = 0, len = features.length; i < len; i++) {
    var poly = features[i];
    if (poly.geometry) merged = union(merged, poly);
  }
  return merged;
}

If you were using turf-sum, min, max, average, median, variance, deviation

The turf-collect method provides the core of these statistical methods
and lets you bring your own statistical library, like simple-statistics,
science.js, or others.

If you were using turf-filter, turf-remove

These modules were thin wrappers around native JavaScript methods: use
Array.filter instead:

var filteredFeatures = features.filter(function(feature) {
  return feature.properties.value > 10;
});

If you were using turf-jenks, turf-quantile

Use Array.map to get values, and then bring your own statistical calculation,
like simple-statistics or science.js.

var values = features.map(function(feature) {
  return feature.properties.value;
});

v2.0.0

24 Feb 23:30

Choose a tag to compare

  • turf-grid renamed turf-point-grid (turf.grid => turf.pointGrid)
  • turf-hex renamed turf-hex-grid (turf.hex => turf.hexGrid)
  • turf-hex-grid now has a required unit parameter
  • remove turf-isobands; use turf-isolines instead
  • added turf-square-grid (turf.squareGrid)
  • added turf-triangle-grid (turf.triangleGrid)
  • constrain turf-point-grid to the bbox