Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A port of simplify.js (https://github.com/mourner/simplify-js)
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md Fix typo
simplify.py Updated readme; code cleanup (pep8)

README.md

simplify.py

simplify.py is a simple port of simplify.js by Vladimir Agafonkin (https://github.com/mourner/simplify-js)

Usage

import simplify
simplify(points, tolerance, highQuality)

points: An array of dictionaries, containing x, y coordinates: {'x': int/float, 'y': int/float}

tolerance (optional, 0.1 by default): Affects the amount of simplification that occurs (the smaller, the less simplification).

highestQuality (optional, True by default): Flag to exclude the distance pre-processing. Produces higher quality results, but runs slower.

Something went wrong with that request. Please try again.