Tile Grid Systems

TileGrid

TileGrid(ul, crs, res, size[, limits, name])

A tile grid specification for gridding data

load_grids([filename])

Retrieve tile grid specifications from a YAML file

Attributes

TileGrid.ul

TileGrid.crs

TileGrid.res

TileGrid.size

TileGrid.limits

TileGrid.name

TileGrid.rows

the vertical/row numbers for all tiles

TileGrid.cols

the horizontal/column numbers for all tiles

TileGrid.nrow

the number of rows in the TileGrid

TileGrid.ncol

the number of columns in the TileGrid

TileGrid.transform

the affine transform for this TileGrid

Geometry Tools

Methods for finding Tiles that intersect with your geospatial data.

TileGrid.point_to_tile(self, point)

Return a Tile containing a given point (x, y)

TileGrid.bounds_to_tiles(self, bounds)

Yield Tile objects for this grid within a given bounds

TileGrid.roi_to_tiles(self, roi)

Yield tiles within a Region of Interest (ROI) shapely geometry

Export

TileGrid.to_dict(self)

Return this TileGrid as a dictionary (e.g., to serialize)

TileGrid.from_dict(d)

Return a TileGrid from a dictionary

TileGrid.geojson(self[, crs, rows, cols, …])

Returns this grid of tiles as GeoJSON

Dictionary Interface

You can grab Tile from the TileGrid by indexing the row and column (or vertical, horizontal) as you would a dict.

TileGrid.__getitem__(self, index)

Return a Tile for the grid row/column specified by index

TileGrid.__len__(self)

TileGrid.__iter__(self)

Tile

Attributes

Tile.index

Tile.crs

Tile.bounds

Tile.res

Tile.size

Tile.bbox

This tile’s bounding box geometry

Tile.vertical

The horizontal index of this tile in its tile specification

Tile.horizontal

The horizontal index of this tile in its tile specification

Tile.width

The number of columns in this Tile

Tile.height

The number of columns in this Tile

Tile.transform

The Affine transform for the tile

Methods

Tile.coords(self[, center])

Return y/x pixel coordinates

Tile.geojson(self[, crs])

Return this Tile’s geometry as GeoJSON