Skip to content
Tom MacWright edited this page Jul 6, 2016 · 2 revisions

Change related questions

Between turf 2 and turf 3, we changed to a monorepo approach. That means that all the module code is in one repository. We still publish modules containing each module individually, as well as the turf module - in terms of how you can split up and use just one part of Turf, everything is the same. But we organize all the code in one repository now.

What is the turf-junkyard repo?

turf-junkyard is where the old repos went. the repos that are part of turf core are now in the Turfjs/turf repo, under the packages/directory

Why did we unify packages?

We wanted to make it easier to coordinate Turf releases and management, making sure that modules don't "straggle" on earlier versions and making it easy to test potential cross-module regressions. We use Lerna for these kind of operations now.

Why do modules start with @turf/ now?

Because we're using an npm organization to manage permissions and scoping of modules.

How to

Reduce unnecessary coordinate precision that results from calculations

var meta = require('turf-meta');

meta.coordEach(geojson, function (p) {
    p[0] = Math.round(p[0] * 1e6) / 1e6;
    p[1] = Math.round(p[1] * 1e6) / 1e6;
});