odc.geo.xr.ODCExtensionDa

class odc.geo.xr.ODCExtensionDa(xx)[source]

ODC extension for xarray.DataArray.

__init__(xx)[source]

Methods

__init__(xx)

add_to(map, *[, name, index, fmt, max_size, ...])

Add image to an interactive map.

assign_crs(crs[, crs_coord_name])

See odc.geo.xr.assign_crs().

bits_to_bool([bits, bitflags, invert])

Convert integer array into boolean array using bitmasks.

colorize([cmap, attrs, clip, vmin, vmax, robust])

Apply colormap to data.

compress(*args[, as_data_url, transparent])

Save image to RAM in jpeg/png/webp format.

crop(poly[, apply_mask, all_touched])

Crops and optionally mask an xarray.Dataset or xarray.DataArray to the spatial extent of a geometry.

enum_to_bool(values[, invert])

Convert array into boolean array using a list of invalid values.

explore([map, bands, vmin, vmax, cmap, ...])

Plot xarray data on an interactive folium leaflet map for rapid data exploration.

map_bounds()

See odc.geo.geobox.GeoBox.map_bounds().

mask(poly[, invert, all_touched])

Apply a polygon geometry as a mask, setting all xarray.Dataset or xarray.DataArray pixels outside the rasterized polygon to NaN.

mask_invalid_data([nodata, skip_bands])

Mask out invalid data values.

output_geobox(crs, **kw)

Compute geobox of this data in other projection.

reload()

Reload geospatial state info in-place.

reproject(how, *[, resampling, dst_nodata, ...])

Reproject raster to different projection/resolution.

scale_and_offset([scale, offset, clip])

Apply scale and offset to the DataArray.

to_cog([blocksize, ovr_blocksize, ...])

Compress xarray.DataArray into Cloud Optimized GeoTiff bytes in memory.

write_cog(fname, *[, overwrite, blocksize, ...])

Save xarray.DataArray to a file in Cloud Optimized GeoTiff format.

Attributes

affine

aspect

crs

Query CRS.

crs_coord

Return CRS coordinate DataArray.

geobox

Query GeoBox or GCPGeoBox.

grid_mapping

Return name of the grid mapping coordinate.

nodata

Extract nodata/_FillValue attribute if set.

spatial_dims

Return names of spatial dimensions, or None.

transform

uncached

xdim

Index of the X dimension.

ydim

Index of the Y dimension.