Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByAreaDec ¶
PolygonHMSliceByAreaDec will allow you to sort a slice of PolygonHM in decending order
type OrderedHM ¶
OrderedHM will iterate through a set of HitMaps looking for the first one to return inside, if none of the hitmaps return inside it will return outside.
func NewOrderedHM ¶
NewOrderdHM will add the provided hitmaps in reverse order so that the last hit map is always tried first.
func (OrderedHM) Area ¶
Area returns the area of the total extent of the hitmaps that are contain in the slice.
type PolygonHM ¶
type PolygonHM struct {
// contains filtered or unexported fields
}
PolygonHM implements a basic hit map that gives the label for a point based on the order of the rings.
func MustNewFromPolygons ¶
MustNewFromPolygons is like NewFromPolygons except on error it will panic.
func NewFromPolygons ¶
NewFromPolygons assumes that the outer ring of each polygon is inside, and each inner ring is inside.
type Ring ¶
func (Ring) ContainsPoint ¶
Contains returns weather the point is contained by the ring, if the point is on the border it is considered not contained.