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
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
Linear mapping from pixel space to CRS.
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.
Query coordinates.
Query coordinates.
Coordinate Reference System of the GeoBox.
List of dimension names of the GeoBox.
List of dimension names of the GeoBox.
GeoBox footprint in native CRS.
GeoBox extent in EPSG:4326.
Height in pixels (ny).
left
Same size geobox to the left of this one.
Resolution, pixel size in CRS units.
right
Same size geobox to the right of this one.
Shape in pixels
(height, width)
.top
Same size geobox directly above this one.
Linear mapping from pixel space to CRS.
Width in pixels (nx).