Skip to content

Instantly share code, notes, and snippets.

Avatar

Barnabas Kendall barnabas-avalara

View GitHub Profile
@barnabas-avalara
barnabas-avalara / kink-functions.js
Last active Nov 11, 2020
TurfJS kink functions
View kink-functions.js
import difference from '@turf/difference'
import { feature, multiPolygon, polygon, featureCollection, multiPoint } from '@turf/helpers'
import { getGeom } from '@turf/invariant'
import { flattenEach, featureEach } from '@turf/meta'
import simplepolygon from 'simplepolygon'
import gpsi from 'geojson-polygon-self-intersections'
export function unkinkPolygon (geojson) {
const features = []
You can’t perform that action at this time.