hitmap

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2017 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllwaysInside allwaysInside

Functions

This section is empty.

Types

type Interface

type Interface interface {
	LabelFor(pt maths.Pt) maths.Label
}

type M

type M struct {
	DoClip bool
	Clip   maths.Rectangle
	// contains filtered or unexported fields
}

func NewFromGeometry

func NewFromGeometry(g tegola.Geometry) (hm M)

func NewFromLines

func NewFromLines(ln [][]maths.Line) (hm M)

NewFromLines creates a new hitmap where the first ring (made up of lines) is considered inside. The others if there are any are considered outside.

func NewFromMultiPolygon

func NewFromMultiPolygon(mp tegola.MultiPolygon) (hm M)

func NewFromPolygon

func NewFromPolygon(p tegola.Polygon) (hm M)

func (*M) AppendSegment

func (hm *M) AppendSegment(seg ...Segment) *M

func (*M) LabelFor

func (hm *M) LabelFor(pt maths.Pt) maths.Label

type Segment

type Segment struct {
	// contains filtered or unexported fields
}

func NewSegment

func NewSegment(label maths.Label, linestring tegola.LineString) (seg Segment)

func NewSegmentFromLines

func NewSegmentFromLines(label maths.Label, lines []maths.Line) (seg Segment)

func NewSegmentFromRing

func NewSegmentFromRing(label maths.Label, ring []maths.Pt) (seg Segment)

func (Segment) Contains

func (seg Segment) Contains(pt maths.Pt) bool

Jump to

Keyboard shortcuts

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