github Turfjs/turf v7.4.0

5 hours ago

What's Changed

⚠️ Due to correctness fixes, behavior across the boolean-* methods has changed. If you depended on the invalid behavior of these methods take extra care when upgrading.

@turf/bearing

  • Fix final bearing returning values outside [-180, 180] by @JSap0914 in #3077

@turf/bezier

@turf/boolean-contains

  • Allow boundary points in MultiPoint containment checks by @rexxars in #3024
  • Treat an equal two-vertex line as contained by @spokodev in #3080
  • Add MultiPolygon support for non-polygon types by @rexxars in #3010
  • Speed up point, line, and MultiPolygon hot paths by @rexxars in #3099
  • Reject inner polygon whose edge crosses a concave outer polygon by @aloktomarr in #3104

@turf/boolean-crosses

  • Make MultiPoint/LineString crossing order-independent by @spokodev in #3079
  • Return false if a line/line intersection is on an endpoint by @mfedderly in #3070

@turf/boolean-disjoint

  • Overlapping collinear lines should return false by @cycsmail in #3097
  • Test for explicit line/line touch on a boundary point by @mfedderly in #3100
  • Performance: Delegate flattening to booleanDisjoint by @rexxars in #3103

@turf/boolean-point-in-polygon

  • Perf improvement & Fix issue with multiple polygons when the point is on the boundary of a polygon by @Pitouli in #2821

@turf/boolean-valid

  • Add support for GeometryCollection geometries by @ltkum in #2916
  • Allow MultiLineStrings with only a single LineString by @sharmaB01 in #2846

@turf/boolean-within

Internally this has been rewritten to use @turf/boolean-contains. This increases correctness, but the additional checks may have regressed performance slightly depending on inputs (it is actually faster for some inputs).

  • Require an interior point in MultiPoint-in-Polygon check by @mahirhir in #3085
  • Add MultiPolygon support, de-duplicate logic by @rexxars in #3011

@turf/clusters-dbscan

@turf/combine

@turf/convex

  • Correctly include properties in the final result by @blchelle in #2972

@turf/helpers

  • Add short forms for Units and AreaUnits by @Johse in #3063

@turf/line-arc

@turf/line-overlap

@turf/polygonize

  • Fix behavior when there are duplicate coordinates in the input by @Traksewt in #3045
  • Performance: Migrate to Map/Set by @mfedderly in #3074
  • Performance: Migrate edge storage from Array to Map for performance by @mfedderly in #3081

@turf/projection

  • Docs: Use official EPSG:3857 code instead of deprecated EPSG:900913 by @cycsmail in #3101

@turf/transform-scale, @turf/transform-translate, @turf/transform-rotate

Internal:

New Contributors

Full Changelog: v7.3.5...v7.4.0

Don't miss a new turf release

NewReleases is sending notifications on new releases.