odc.geo.xr.add_to
- odc.geo.xr.add_to(xx, map, *, name=None, fmt='png', max_size=4096, transparent_pixel=None, cmap=None, clip=False, vmin=None, vmax=None, **kw)[source]
Add image to a map.
If map is not supplied, image data url and bounds are returned instead.
- Parameters
xx (
Any
) – array to displaymap (
Any
) – Map object,folium
andipyleaflet
are understood, can beNone
.fmt (
str
) – compress image format, defaults to “png”, can be “webp”, “jpeg” as well.max_size (
int
) – If longest dimension is bigger than this, shrink it down before compression, defaults to 4096transparent_pixel (
Optional
[Tuple
[int
,int
,int
]]) – Replace transparent pixels with this value, needed for “jpeg”.cmap (
Optional
[Any
]) – If supplied array is not RGB use this colormap to turn it into oneclip (
bool
) – When converting to RGB clip input values to fitcmap
.
- Raises
ValueError – when map object is not understood
- Returns
ImageLayer that was added to a map
- Return type
- Returns
(url, bounds)
whenmap is None
.
See also