package
0.11.1
Repository: https://github.com/paulmach/orb.git
Documentation: pkg.go.dev

# 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, err := tilecover.Geometry(poly, zoom)
if err != nil {
	// indicates a non-closed ring
}

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:

# Functions

Bound creates a tile cover for the bound.
Collection returns the covering set of tiles for the geometry collection.
Geometry returns the covering set of tiles for the given geometry.
LineString creates a tile cover for the line string.
MergeUp will merge up the tiles in a given set up to the the give min zoom.
MergeUpPartial will merge up the tiles in a given set up to the the give min zoom.
MultiLineString creates a tile cover for the line strings.
MultiPoint creates a tile cover for the set of points,.
MultiPolygon creates a tile cover for the multi-polygon.
Point creates a tile cover for the point, i.e.
Polygon creates a tile cover for the polygon.
Ring creates a tile cover for the ring.

# Variables

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