Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.26 KB

README.md

File metadata and controls

30 lines (21 loc) · 1.26 KB

Carto

GitHub Workflow Status Go Reference CodeCov Go Report Card

This project hosts the implementation of various Cartography algorithms in Go.

Import

go get github.com/muktihari/carto

List of algorithms:

  • Ramer–Douglas–Peucker [github.com/muktihari/carto/rdp]: Simplifies a curve by reducing the number of points in a curve composed of line segments, resulting in a similar curve with fewer points. It's a zero-alloc implementation that performs efficiently by reslicing the input points.

    rdp

    Benchmark (n = 1000 points):

    goos: linux; goarch: amd64; pkg: github.com/muktihari/carto/rdp
    cpu: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    BenchmarkSimplify-4   6428   161746 ns/op   0 B/op   0 allocs/op
    PASS
    ok      github.com/muktihari/carto/rdp  1.065s