odc.geo.geobox.GeoBox

class odc.geo.geobox.GeoBox(shape, affine, crs)[source]

Defines the location and resolution of a rectangular grid of data, including it’s CRS.

Parameters
__init__(shape, affine, crs)[source]

Methods

__init__(shape, affine, crs)

boundary([pts_per_side])

Boundary of a GeoBox.

buffered(xbuff[, ybuff])

Produce a tile buffered by xbuff, ybuff (in CRS units).

flipx()

Flip along X axis.

flipy()

Flip along Y axis.

footprint(crs[, buffer, npoints])

Compute footprint in foreign CRS.

from_bbox(bbox[, crs, tight, shape, ...])

Construct GeoBox from a bounding box.

from_geopolygon(geopolygon, resolution[, ...])

Construct GeoBox from a polygon.

grid_lines([step, mode])

Construct pixel edge aligned grid lines.

is_empty()

Check if geobox is "empty".

outline([mode, notch])

Produce Line Geometry around perimeter.

overlap_roi(other[, tol])

Compute overlap as ROI.

pad(padx[, pady])

Pad geobox.

pad_wh([alignx, aligny])

Possibly expand GeoBox by a few pixels.

rotate(deg)

Rotate GeoBox around the center.

svg([scale_factor, mode, notch, grid_stroke])

Produce SVG paths.

translate_pix(tx, ty)

Shift GeoBox in pixel plane.

zoom_out(factor)

Compute GeoBox with changed resolution.

zoom_to(shape)

Change GeoBox shape.

Attributes

affine

Linear mapping from pixel space to CRS.

alignment

Alignment of pixel boundaries in CRS units.

bottom

Same size geobox directly below this one.

boundingbox

GeoBox bounding box in the native CRS.

center_pixel

GeoBox of a center pixel.

coordinates

Query coordinates.

coords

Query coordinates.

crs

Coordinate Reference System of the GeoBox.

dimensions

List of dimension names of the GeoBox.

dims

List of dimension names of the GeoBox.

extent

GeoBox footprint in native CRS.

geographic_extent

GeoBox extent in EPSG:4326.

height

Height in pixels (ny).

left

Same size geobox to the left of this one.

resolution

Resolution, pixel size in CRS units.

right

Same size geobox to the right of this one.

shape

Shape in pixels (height, width).

top

Same size geobox directly above this one.

transform

Linear mapping from pixel space to CRS.

width

Width in pixels (nx).