Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Fast linestring simplification

Project Description

# Simplification Simplify a LineString using the Ramer–Douglas–Peucker algorithm

Installation

pip install simplification Please use a recent (>= 8.1.2) version of pip.

Supported Python Versions

  • Python 2.7
  • Python 3.5

Supported Platforms

  • Linux (manylinux1-compatible)
  • OS X
  • Windows 32-bit / 64-bit

Usage

from simplification.cutil import simplify_coords

coords = [ [0.0, 0.0], [5.0, 4.0], [11.0, 5.5], [17.3, 3.2], [27.8,
0.1] ]

# Try an epsilon of 1.0 to start with. Other sensible values include 0.01, 0.001
simplified = simplify\_coords(coords, 1.0)

# simplified is [[0.0, 0.0], [5.0, 4.0], [11.0, 5.5], [27.8, 0.1]]

How it Works

FFI and a Rust binary

Is It Fast

I should think so.

License

MIT

Release History

Release History

This version
History Node

0.1.1

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting