PackageTrack

npm

@turf/boolean-valid

7.4.0Turfjs/turf

Checks if the geometry is a valid according to the OGC Simple Feature Specification.

Release timeline

28 releases since 2020
20202026

Releases

  1. 7.4.03 Aug 2026
    Release notes

    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

    Open source →
  2. 7.3.519 Apr 2026
    Release notes

    What's Changed

    Main goal of this release was to revert a build breaking performance improvement introduced in v7.3.2 that was affecting CommonJS environments.

    • Reverted performance related improvement to clusters-dbscan that broke builds by @smallsaucepan in #3049

    Other bug fixes and new functionality:

    Housekeeping and behind the scenes changes:

    Full Changelog: v7.3.4...v7.3.5

    Open source →
  3. 7.3.48 Feb 2026
    Release notes

    Fixed a couple of backwards steps, one that was causing build breaks for users and a bug fix that wasn't backwards compatible.

    What's Changed

    Full Changelog: v7.3.3...v7.3.4

    Open source →
  4. 7.3.328 Jan 2026
    Release notes

    Patch release to fix an unintended change to the return type of lineOffset that was causing compilation issues for Turf users.

    What's Changed

    Full Changelog: v7.3.2...v7.3.3

    Open source →
  5. 7.3.214 Jan 2026
    Release notes

    Patch release with several bug fixes.

    What's Changed

    Bug fixes and new functionality:

    • Fixed a bug in nearestPointOnLine causing duplicate points to be returned from lineSlice by @smallsaucepan in #2951
    • turf-boolean-contains + turf-boolean-within: Fix line in polygon by @samuelarbibe in #2848
    • @turf/boolean-contains - support for multipolygon inside polygon by @MartinP-C in #2357
    • Refactor and extend properties of returned nearest point in @turf/nearest-point-on-line by @EmilJunker in #2867
    • Changed booleanCrosses with two input lines to recognise if crossing point is between vertices by @smallsaucepan in #2968
    • Improve type inference in @turf/helpers' geometry and geometryCollection by @mfedderly in #2971
    • turf-tessellate: Pass original coordinate elevations through the tessellate function. by @prozvora in #2855
    • Significantly improved performance of clustersDbscan by @smallsaucepan in #2885

    Housekeeping and behind the scenes changes:

    New Contributors

    Full Changelog: v7.3.1...v7.3.2

    Open source →
  6. 7.3.127 Nov 2025
    Release notes

    Point release soon after 7.3.0 to address an issue in the revamped isobands implementation, plus some security related version bumps of third party packages.

    What's Changed

    Bug fixes and new functionality:

    Housekeeping and behind the scenes changes:

    Full Changelog: v7.3.0...v7.3.1

    Open source →
  7. 7.3.017 Nov 2025
    Release notes

    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

    Open source →
  8. 7.2.029 Dec 2024
    Release notes

    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

    Open source →
  9. 7.1.09 Aug 2024
    Release notes

    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

    Open source →
  10. 7.1.0-alpha.709 Aug 2024pre-release

    Nothing published for this version

  11. 7.1.0-alpha.725 Jun 2024pre-release

    Nothing published for this version

  12. 7.0.07 Jun 2024
    Release notes

    See v7 CHANGELOG

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

    Open source →
    Additional notes2 sources agree

    ⚠️ Breaking

    • Move to @types/geojson package instead of declaring our own. Typescript consumers of Turf will need to import from @types/geojson. (#2158)
    • Move distribution JS to target ES2017 (#2237)
    • Please change to using named exports instead of default exports from the various packages
    • @turf/helpers Correct the conversion factor for degrees (#2177)
    • @turf/helpers polygon() will now throw if the first and last coordinates are not the same (#2173)
    • @turf/helpers Separate AreaUnits into its own type (#2393)
    • @turf/area Fix earth radius to use WGS84 median earth radius (#2166)
    • @turf/turf Remove re-exports for turf 4.x compatability (#2183)
    • @turf/rectangle-grid Fix correctness for large areas (#2106)
    • `@turf/square-grid Fix correctness for large areas (#2106)
    • @turf/union Accept FeatureCollection for multiple inputs (#2247)
    • @turf/difference Accept FeatureCollection for multiple inputs (#2247)
    • @turf/intersect Accept FeatureCollection for multiple inputs (#2247)
    • @turf/buffer Add undefined return for when the geometry is invalid (#2613)

    🏅 New Features/Enhancements

    🐛 Bug Fixes

    📖 Documentation

    🔔 Misc

    • `@turf/turf Add booleanIntersects typescript export (#2157)
    • `@turf/turf Add booleanTouches export (#2170)
    • `@turf/turf Add booleanConcave export (#2265)
    • @turf/simplify Clean up internals for less object churn (#2561)
    • `@turf/helpers Make isObject a little more accurate (#2176)
    • Migrate from geojsonhint to @placemark/check-geojson (#2571)
    • Add custom types entry point to exports, required by Typescript for node16, nodenext and bundler module resolution strategies (#2400, #2452)
    • types.ts tests are now run in strict mode (#2363)
    • Uses tslib now for smaller bundles (#2165)
    • Remove object-assign dependency from all packages (#2241)
    • Lots of dependencies have been upgraded
    Open source →
  13. 7.0.0-alpha.1167 May 2024pre-release

    Nothing published for this version

  14. 7.0.0-alpha.11523 Apr 2024pre-release

    Nothing published for this version

  15. 7.0.0-alpha.11411 Mar 2024pre-release

    Nothing published for this version

  16. 7.0.0-alpha.1133 Feb 2024pre-release

    Nothing published for this version

  17. 7.0.0-alpha.11117 Jan 2024pre-release

    Nothing published for this version

  18. 7.0.0-alpha.11030 Dec 2023pre-release

    Nothing published for this version

  19. 7.0.0-alpha.22 Oct 2023pre-release

    Nothing published for this version

  20. 7.0.0-alpha.118 Sept 2023pre-release

    Nothing published for this version

  21. 7.0.0-alpha.09 Nov 2022pre-release

    Nothing published for this version

  22. 6.5.010 Jul 2021
    Release notes2 sources agree

    🏅 New Features/Enhancements

    🐛 Bug Fixes

    • @turf/dissolve Complete rewrite of the dissolve module to resolve many bugs (PR https://github.com/Turfjs/turf/pull/2110 - Author @rowanwins)

    • @turf/mask Complete rewrite of the mask module to resolve many bugs (PR https://github.com/Turfjs/turf/pull/2130 - Author @rowanwins)

    • @turf/boolean-valid Add missing dependency to (PR https://github.com/Turfjs/turf/pull/2094 - Author @rycgar)

    📖 Documentation

    • @turf/boolean-overlap Improve clarity (PR https://github.com/Turfjs/turf/pull/2133 - Author @patrickbrett)

    🔔 Misc

    • Enable TS Strict Mode (PR https://github.com/Turfjs/turf/pull/2126 - Author @mfedderly)
    Open source →
  23. 6.4.017 Jun 2021
    Release notes2 sources agree

    🏅 New Features/Enhancements

    • @turf/boolean-point-on-line Added an epislon option to help in floating point comparison. (PR https://github.com/Turfjs/turf/pull/2051 - Author @okcoker)

    🐛 Bug Fixes

    • @turf/line-slice-along Fixed a bug where the offset distance equal to the length of the line (PR https://github.com/Turfjs/turf/pull/2030 - Author @EricPKerr)

    • @turf/helpers Fixed the conversion ratio for converting meters to yards and vice-versa (PR https://github.com/Turfjs/turf/pull/2046 - Author @anotherhale)

    • @turf/center-median Fixed a missing TS type import (PR https://github.com/Turfjs/turf/pull/2044 - Author @Seairth)

    • `@turf/bezier-spline Fix a bug ensuring the spline result reaches the end of the input (PR https://github.com/Turfjs/turf/pull/2090 - Author @the-nemz)

    📖 Documentation

    • @turf/transform-rotate and @turf/ellipse) Improve documentation for angle parameter (PR https://github.com/Turfjs/turf/pull/2016 - Author @pasieronen)

    • @turf/line-chunk Fix an invalid anchor (PR https://github.com/Turfjs/turf/pull/2071 - Author @GraxMonzo)

    • @turf/distance Enhance distance doco so supported inputs are clearer (PR https://github.com/Turfjs/turf/pull/2032 - Author @rowanwins)

    🔔 Misc

    • @turf/concave Replace deprecated topojson dependency (PR https://github.com/Turfjs/turf/pull/2037 - Author @elliots)

    • Work towards enabling TS Strict Mode (PR https://github.com/Turfjs/turf/pull/2053 - Author @mfedderly)

    Open source →
  24. 6.3.020 Jan 2021
    Release notes2 sources agree

    Fix issues importing Turf for react-native, webpack 5, and other bundlers

    (PR https://github.com/Turfjs/turf/pull/2004 - Author r0b0t3d) (PR https://github.com/Turfjs/turf/pull/2011 - Author mfedderly)

    [@turf/turf][turf] expose @turf/boolean-intersect

    (PR https://github.com/Turfjs/turf/pull/2007 - Author rowanwins)

    Open source →
  25. 6.2.012 Jan 2021
    Release notes2 sources agree

    After a bit of hiatus, TurfJS is resuming releases.

    ⭐️ Major Updates

    • ES Modules available for all packages
    • Tree shaking should significantly reduce import size of @turf/turf
    • Better support for ESM modules (PR https://github.com/Turfjs/turf/pull/1942 - Author @diachedelic)
    • Clean-up of test and benchmark running to make publishing easier
    • Enforce styling using Prettier
    • Enable ESLint and get rid of unused variables
    • Upgrade rollup for more correct javascript module builds
    • Only include ES5 code

    🚀 New Modules

    [@turf/boolean-touches][boolean-touches]

    Determines if two features touch but do not intersect

    [@turf/boolean-valid][boolean-valid]

    Checks if the geometry is a valid according to the OGC Simple Feature Specification

    [@turf/quadrat-analysis][quadrat-analysis]

    Performs a quadrat analysis on a set of points

    [@turf/rectangle-grid][rectangle-grid]

    Creates a grid of rectangles from a bounding box

    [@turf/voroni][voronoi]

    Typescript types for the options parameter have been fixed (PR https://github.com/Turfjs/turf/pull/1424 - Author @stevage)

    [@turf/points-within-polygon][points-within-polygon]

    Typescript types around the Feature's Properties will now be preserved. (PR https://github.com/Turfjs/turf/pull/1761 - Author @rugheid)

    [@turf/rewind][rewind]

    Typescript types for the 'reverse' option are now correct. Previously it was misnamed as 'reversed'. (PR https://github.com/Turfjs/turf/pull/1786 - Author @jonnycornwell)

    [@turf/difference][difference]

    No longer publishes an .mjs file.

    [@turf/meta][meta]

    No longer publishes an .mjs file.

    [@turf/tag][tag]

    Add MultiPolygon support. (PR https://github.com/Turfjs/turf/pull/1996 - Author bryceroney)

    🐛 Bug Fixes

    • @turf/centroid Don't visit first point twice when calculating centroid (PR https://github.com/Turfjs/turf/pull/1894 - Author @rowanwins)

    • @turf/transform-translate Better handling of negative distances (PR https://github.com/Turfjs/turf/pull/1895 - Author @rowanwins)

    • @turf/union, @turf/difference, @turf/intersect Use polygon-clipping library to fix correctness issues (PR https://github.com/Turfjs/turf/pull/1916 - Authors @mbullington, @ngottlieb)

    • @turf/buffer Change default number of steps to 8, and actually support the steps option (PR https://github.com/Turfjs/turf/pull/1931 - Author stevenchanin)

    • @turf/buffer Fix projection issues that produce undersized buffers at non-equatorial latitudes (PR https://github.com/Turfjs/turf/pull/1956 - Author dyakovlev)

    • @turf/helpers Add runtime checks to point() method, fixing an API break (PR https://github.com/Turfjs/turf/pull/1964)

    🏅 New Features/Enhancements

    • @turf/boolean-overlap Better performance for MultiPoint geometries (PR https://github.com/Turfjs/turf/pull/1910 - Author @mfedderly)

    • @turf/helpers Add hectares to convertArea (PR https://github.com/Turfjs/turf/pull/1943 - Author @DanielJDufour)

    • @turf/great-circle Update Typescript types to support MultiLineString input (PR https://github.com/Turfjs/turf/pull/1928 - Author kronick)

    📖 Documentation

    • @turf/square-grid Clarify inputs (PR https://github.com/Turfjs/turf/pull/1885 - Author @raphael-leger)

    • @turf/greater-circle Clarify properties option example (PR https://github.com/Turfjs/turf/pull/1888 - Author @chris-catignani)

    ⚠️ Breaking Change

    • @turf/line-to-polygon no longer modifies its input unless the mutate option is true (PR https://github.com/Turfjs/turf/pull/1879 - Author @MortenBirk)

    • @turf/unkink-polygon remove Number.prototype.modulo override (PR https://github.com/Turfjs/turf/pull/1978)

    Open source →
  26. 6.2.0-alpha.310 Dec 2020pre-release

    Nothing published for this version

  27. 6.2.0-alpha.213 Jul 2020pre-release

    Nothing published for this version

  28. 6.2.0-alpha.127 Mar 2020pre-release

    Nothing published for this version