Skip to content

ConfoederatioVF/Turf.performant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turf.performant


Join our community!

A fork of Turf.js maintained by Confoederatio, Technical Division (CTD). | Used by Naissance GIS.

Abstract

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.

Usage.

  1. Download turf.min.js from this repository (Right Click > Save As). Place the downloaded file in your root project folder.

  2. Link the .min.js script 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.

About

Performant fork of Turf.js with a bundled .min.js build system.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors