hitmap

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 5 Imported by: 3

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