package tilecover

import "github.com/paulmach/orb/maptile/tilecover"

Package tilecover computes the covering set of tiles for an orb.Geometry.

Index

Variables

var ErrUnevenIntersections = errors.New("tilecover: uneven intersections, ring not closed?")

ErrUnevenIntersections can be returned when clipping polygons and there are issues with the geometries, like the rings are not closed.

Functions

func Bound

func Bound(b orb.Bound, z maptile.Zoom) maptile.Set

Bound creates a tile cover for the bound. i.e. all the tiles that intersect the bound.

func Collection

func Collection(c orb.Collection, z maptile.Zoom) (maptile.Set, error)

Collection returns the covering set of tiles for the geometry collection.

func Geometry

func Geometry(g orb.Geometry, z maptile.Zoom) (maptile.Set, error)

Geometry returns the covering set of tiles for the given geometry.

func LineString

func LineString(ls orb.LineString, z maptile.Zoom) maptile.Set

LineString creates a tile cover for the line string.

func MergeUp

func MergeUp(set maptile.Set, min maptile.Zoom) maptile.Set

MergeUp will merge up the tiles in a given set up to the the give min zoom. Tiles will be merged up only if all 4 siblings are in the set. The tiles in the input set are expected to all be of the same zoom, e.g. outputs of the Geometry function.

func MergeUpPartial

func MergeUpPartial(set maptile.Set, min maptile.Zoom, count int) maptile.Set

MergeUpPartial will merge up the tiles in a given set up to the the give min zoom. Tiles will be merged up if `count` siblings are in the set. The tiles in the input set are expected to all be of the same zoom, e.g. outputs of the Geometry function.

func MultiLineString

func MultiLineString(mls orb.MultiLineString, z maptile.Zoom) maptile.Set

MultiLineString creates a tile cover for the line strings.

func MultiPoint

func MultiPoint(mp orb.MultiPoint, z maptile.Zoom) maptile.Set

MultiPoint creates a tile cover for the set of points,

func MultiPolygon

func MultiPolygon(mp orb.MultiPolygon, z maptile.Zoom) (maptile.Set, error)

MultiPolygon creates a tile cover for the multi-polygon.

func Point

func Point(ll orb.Point, z maptile.Zoom) maptile.Set

Point creates a tile cover for the point, i.e. just the tile containing the point.

func Polygon

func Polygon(p orb.Polygon, z maptile.Zoom) (maptile.Set, error)

Polygon creates a tile cover for the polygon.

func Ring

func Ring(r orb.Ring, z maptile.Zoom) (maptile.Set, error)

Ring creates a tile cover for the ring.

Source Files

helpers.go line_string.go merge.go polygon.go

Version
v0.11.1 (latest)
Published
Jan 29, 2024
Platform
linux/amd64
Imports
6 packages
Last checked
8 hours ago

Tools for package owners.