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".
Query bounds in folium/ipyleaflet style.
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.
to_crs
(crs, *[, resolution, tight])Compute GeoBox covering the same region in a different projection.
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
Alignment of pixel boundaries in CRS units.
Aspect ratio (X/Y in pixel space).
axis_aligned
Check if Geobox is axis-aligned (not rotated).
Same size geobox directly below this one.
GeoBox bounding box in the native CRS.
center_pixel
GeoBox of a center pixel.
compat
Convert to
datacube.utils.geometry.GeoBox
Query coordinates.
coords
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).
Same size geobox to the left of this one.
Resolution, pixel size in CRS units.
Same size geobox to the right of this one.
Shape in pixels
(height, width)
.Same size geobox directly above this one.
Linear mapping from pixel space to CRS.
Width in pixels (nx).