tilecover

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2019 License: MIT Imports: 5 Imported by: 0

README

orb/maptile/tilecover Godoc Reference

Package tilecover computes the covering set of tiles for an orb.Geometry. It is a a port of the nodejs library tile-cover which is a port from Google's S2 library. The same set of tests pass.

Usage
poly := orb.Polygon{}
tiles := tilecover.Geometry(poly, zoom)

for t := range tiles {
	// do something with tile
}

// to merge up to as much as possible to a specific zoom
tiles = tilecover.MergeUp(tiles, 0)
Similar libraries in other languages:

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

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

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

func Geometry

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

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

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

Polygon creates a tile cover for the polygon.

func Ring

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

Ring creates a tile cover for the ring.

Types

This section is empty.

Jump to

Keyboard shortcuts

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