A fork of Turf.js maintained by Confoederatio, Technical Division (CTD). | Used by Naissance GIS.
This fork is a CDN drop-in replacement for Turf.js, based off the clipper2-ts pull request by smallsaucepan, with drastic performance improvements to elementary operations such as difference, intersect, and union. In our own testing, we found improvements for complex layer operations of ~6-10x over real academic datasets.
Unfortunately, this draft has not yet been merged into the main repository due to a slight increase in build size and architectural concerns. We have bypassed those to build the .min.js ourselves.
Performance Improvements:
| Function | Reported Improvement |
|---|---|
| Difference | 20-130x |
| Intersect | 55-60x |
| Union | 10-120x |
| Complex Operations (layer merge of Cliopatria, C-Shapes) |
6-10x |
If you wish to make changes and build the fork yourself, check the Contributing tab.
-
Download turf.min.js from this repository (Right Click > Save As). Place the downloaded file in your root project folder.
-
Link the
.min.jsscript inside your<head>tag:<script type = "text/javascript" src = "turf.min.js"></script>
Alternatively, simply replace the turf.min.js you already have in your project. It should work as a drop-in replacement.

