geometry

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: BSD-3-Clause Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoundingBoxesForFeature

func BoundingBoxesForFeature(f geojson.Feature) (geojson.BoundingBoxes, error)

func FeatureContainsCoord

func FeatureContainsCoord(f geojson.Feature, c geom.Coord) (bool, error)

func GeometryForFeature

func GeometryForFeature(f geojson.Feature) (*geojson.Geometry, error)

func PolygonsContainsCoord

func PolygonsContainsCoord(polys []geojson.Polygon, c geom.Coord) (bool, error)

func PolygonsForFeature

func PolygonsForFeature(f geojson.Feature) ([]geojson.Polygon, error)

func PolygonsForGeometry

func PolygonsForGeometry(g *geojson.Geometry) ([]geojson.Polygon, error)

Types

type Bboxes

type Bboxes struct {
	geojson.BoundingBoxes `json:",omitempty"`
	BBoxesBounds          []*geom.Rect `json:"bounds"`
	BBoxesMBR             geom.Rect    `json:"mbr"`
}

func (Bboxes) Bounds

func (b Bboxes) Bounds() []*geom.Rect

func (Bboxes) MBR

func (b Bboxes) MBR() geom.Rect

type Polygon

type Polygon struct {
	geojson.Polygon `json:",omitempty"`
	Exterior        geom.Polygon   `json:"exterior"`
	Interior        []geom.Polygon `json:"interior"`
}

func (Polygon) ContainsCoord

func (p Polygon) ContainsCoord(c geom.Coord) bool

func (Polygon) ExteriorRing

func (p Polygon) ExteriorRing() geom.Polygon

func (Polygon) InteriorRings

func (p Polygon) InteriorRings() []geom.Polygon

Jump to

Keyboard shortcuts

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