odc.geo.xr.ODCExtensionDa
- class odc.geo.xr.ODCExtensionDa(xx)[source]
ODC extension for
xarray.DataArray.Methods
__init__(xx)add_to(map, *[, name, index, fmt, max_size, ...])Add image to an interactive map.
assign_crs(crs[, crs_coord_name])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.Datasetorxarray.DataArrayto the spatial extent of a geometry.explore([map, bands, vmin, vmax, cmap, ...])Plot xarray data on an interactive
foliumleaflet map for rapid data exploration.map_bounds()mask(poly[, invert, all_touched])Apply a polygon geometry as a mask, setting all
xarray.Datasetorxarray.DataArraypixels outside the rasterized polygon toNaN.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.
to_cog([blocksize, ovr_blocksize, ...])Compress
xarray.DataArrayinto Cloud Optimized GeoTiff bytes in memory.write_cog(fname, *[, overwrite, blocksize, ...])Save
xarray.DataArrayto a file in Cloud Optimized GeoTiff format.Attributes
affineaspectcrsQuery
CRS.crs_coordReturn CRS coordinate DataArray.
geoboxQuery
GeoBoxorGCPGeoBox.grid_mappingReturn name of the grid mapping coordinate.
Extract
nodata/_FillValueattribute if set.spatial_dimsReturn names of spatial dimensions, or
None.transformuncachedxIndex of the X dimension.
yIndex of the Y dimension.
z