mapSimplify

package module
v0.0.0-...-daa40e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2018 License: ISC Imports: 5 Imported by: 0

README

go-map-simplify

A go library for reducing vertices on a map with conjoined polygons.

Build Status Go Report Card Documentation Coverage Status GitHub issues license Release

About

This library is intended to simplify adjacent polygons on a map, such that shared edges are simplified identically.

Usage

TODO

Documentation

See GoDoc.org for complete documentation.

Author

Written by Ryan Clancey

License

go-map-simplify is licensed under the ISC license, described in the LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	Polygons map[int]*Polygon
	// contains filtered or unexported fields
}

func NewMap

func NewMap() *Map

func (*Map) AddPolygon

func (m *Map) AddPolygon(id int, points []Point) (*Polygon, error)

func (*Map) Segments

func (m *Map) Segments() ([]*Segment, error)

func (*Map) Simplify

func (m *Map) Simplify(threshold float64) ([]*Polygon, error)

type Point

type Point [2]float64

func (Point) String

func (pt Point) String() string

type Polygon

type Polygon struct {
	Id     int
	Points []Point
	// contains filtered or unexported fields
}

func NewPolygon

func NewPolygon(id int, points []Point) (*Polygon, error)

func (*Polygon) Simplify

func (p *Polygon) Simplify(m *Map, threshold float64) (*Polygon, error)

type Segment

type Segment struct {
	Points []Point
	// contains filtered or unexported fields
}

func (*Segment) LeftId

func (s *Segment) LeftId() int

func (*Segment) RightId

func (s *Segment) RightId() int

func (*Segment) String

func (s *Segment) String() string

type SegmentId

type SegmentId [2]int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL