All Projects → urschrei → rdp

urschrei / rdp

Licence: MIT license
A library providing FFI access to fast Ramer–Douglas–Peucker and Visvalingam-Whyatt line simplification algorithms

Programming Languages

rust
11053 projects
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to rdp

Simplification
Very fast LineString simplification using RDP or Visvalingam-Whyatt and a Rust binary
Stars: ✭ 78 (+290%)
Mutual labels:  geo, geospatial, computational-geometry, rdp
lonlat bng
A multithreaded Rust library with FFI for converting WGS84 longitude and latitude coordinates into BNG (OSGB36) Eastings and Northings and vice versa (using OSTN15)
Stars: ✭ 20 (+0%)
Mutual labels:  geospatial, ffi, rust-library
Geopython
Notebooks and libraries for spatial/geo Python explorations
Stars: ✭ 268 (+1240%)
Mutual labels:  geo, geospatial, computational-geometry
NetCDF.jl
NetCDF support for the julia programming language
Stars: ✭ 102 (+410%)
Mutual labels:  geo, geospatial
Proj4.jl
Julia wrapper for the PROJ cartographic projections library
Stars: ✭ 23 (+15%)
Mutual labels:  geo, geospatial
Shapefile.jl
Parsing .shp files in Julia
Stars: ✭ 40 (+100%)
Mutual labels:  geo, geospatial
Solaris
CosmiQ Works Geospatial Machine Learning Analysis Toolkit
Stars: ✭ 290 (+1350%)
Mutual labels:  geo, geospatial
Editor
An open source visual editor for the 'Mapbox Style Specification'
Stars: ✭ 1,167 (+5735%)
Mutual labels:  geo, geospatial
Geo On Fire
A library to create high performance geolocation queries for Firebase. Checkout the demos: https://run.plnkr.co/plunks/AYaN8ABEDcMntgbJyLVW/ and https://run.plnkr.co/plunks/xJgstAvXYcp0w7MbOOjm/
Stars: ✭ 54 (+170%)
Mutual labels:  geo, geospatial
Examples
Self-contained examples for the legacy Maps API for JavaScript.
Stars: ✭ 78 (+290%)
Mutual labels:  geo, geospatial
Openrailwaymap
An OpenStreetMap-based project for creating a map of the world's railway infrastructure.
Stars: ✭ 150 (+650%)
Mutual labels:  geo, geospatial
Go Geom
Package geom implements efficient geometry types for geospatial applications.
Stars: ✭ 456 (+2180%)
Mutual labels:  geo, geospatial
Mapsui
Mapsui is a .NET Map component for WPF, Xamarin.Forms, Xamarin.Android, Xamarin.iOS and UWP
Stars: ✭ 447 (+2135%)
Mutual labels:  geo, geospatial
topo
A Geometry library for Elixir that calculates spatial relationships between two geometries
Stars: ✭ 125 (+525%)
Mutual labels:  geospatial, computational-geometry
Orb
Types and utilities for working with 2d geometry in Golang
Stars: ✭ 378 (+1790%)
Mutual labels:  geo, geospatial
Maps Api For Javascript Examples
Self-contained examples for Maps API for JavaScript v3.
Stars: ✭ 130 (+550%)
Mutual labels:  geo, geospatial
Awesome Gis
😎Awesome GIS is a collection of geospatial related sources, including cartographic tools, geoanalysis tools, developer tools, data, conference & communities, news, massive open online course, some amazing map sites, and more.
Stars: ✭ 2,582 (+12810%)
Mutual labels:  geo, geospatial
convertbng
Fast, accurate WGS84 longitude and latitude ⬅️➡️ OSGB36 (OSTN15) conversion, using Python and Rust
Stars: ✭ 32 (+60%)
Mutual labels:  geo, geospatial
Election Geodata
Precinct shapes (and vote results) for US elections past, present, and future
Stars: ✭ 289 (+1345%)
Mutual labels:  geo, geospatial
Geoswift
The Swift Geometry Engine.
Stars: ✭ 1,267 (+6235%)
Mutual labels:  geo, geospatial

Test and Build Coverage Status

RDP

A Rust implementation of the Ramer–Douglas-Peucker and Visvalingam-Whyatt line simplification algorithms.

The algorithms underlying this crate have now migrated to rust-geo as the Simplify and SimplifyVW traits.

FFI

The shared library exposes a(n) FFI: https://docs.rs/rdp/latest/rdp/#functions.
Some examples are available in this Jupyter notebook.
Simplification, a Python package which uses this shared library, is available from PyPi.

Example Implementation

A Python 2.7 / 3.5 / 3.6 implementation can be found at ffi.py
Run cargo build --release, then python ffi.py to test. It's also importable, exposing simplify_linestring() – call it with a coordinate list and a precision parameter. Allocated memory is dropped on exit.

Performance & Complexity

On an 841-point LineString, RDP runs around 3.5x faster than VW. However, RDP's worst-case time complexity is O(n2) – This implementation doesn't use the Convex Hull Speedup, see Hershberger & Snoeyink, 1992 – whereas the VW implementation uses a min-heap, and thus has worst-case time-complexity of O(n log(n)), which may make it a better choice for larger LineStrings under certain conditions; RDP has an average time complexity of O(n log(n)), but LineStrings such as the one seen here will slow it down significantly. You can verify these times for yourself by running cargo bench.

License

MIT

References

Douglas, D.H., Peucker, T.K., 1973. Algorithms for the reduction of the number of points required to represent a digitized line or its caricature. Cartographica: The International Journal for Geographic Information and Geovisualization 10, 112–122. DOI

Ramer, U., 1972. An iterative procedure for the polygonal approximation of plane curves. Computer Graphics and Image Processing 1, 244–256. DOI

Visvalingam, M., Whyatt, J.D., 1993. Line generalisation by repeated elimination of points. The Cartographic Journal 30, 46–51. DOI

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].