Turfjs / Turfjs/turf

Proof of concept: Visvalingam Whyatt Simplification

Open
#1,085 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

@turf/simplify enhancement
Dominant language
TypeScript
Stars
10.5k
Forks
1k
Avg merge
1h 11m
Merged PRs (30d)
4

Description

I know turf.simplify uses simplify-js under the cover, which in turn uses Douglas-Peucker simplification algorithm.

Inspired by the approach taken by Matt Bloch (author of MapShaper) I made a little proof of concept for a simplification approach using Visvalingam Whyatt algorithm (as explained in this Mike Bostock's article)

You can compare the outcome of both simplification algorithms in
https://huasofoundries.github.io/simplify-vw/

I'm using the latests unpkg available package of turf.

I guess both approaches have their own pros and cons. If you guys are interested, I could put a little effort to make this POC work for Polylines and Multigeometries.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with turf.simplify and its simplify-js dependency, then review the Visvalingam Whyatt explanation linked in the issue and compare it with the existing Douglas-Peucker approach. The proof of concept at huasofoundries.github.io/simplify-vw/ shows the proposed comparison; the scope would need to be settled before extending it to Polylines and Multigeometries.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.