def load_tiff(filename, crs=None, apply_transform=False, nan_nodata=False, **kwargs):
try:<EOL><INDENT>import xarray as xr<EOL><DEDENT>except:<EOL><INDENT>raise ImportError('<STR_LIT>')<EOL><DEDENT>with warnings.catch_warnings():<EOL><INDENT>warnings.filterwarnings('<STR_LIT:ignore>')<EOL>da = xr.open_rasterio(filename)<EOL><DEDENT>return from_xarray(da, crs, apply_transform, nan_nodata, **kwargs)<EOL>
Returns an RGB or Image element loaded from a geotiff file.

The data is loaded using xarray and rasterio. If a crs attribute
is present on the loaded data it will attempt to decode it into
a cartopy projection otherwise it will default to a non-geographic
HoloViews element.

Parameters
----------
filename: string
  Filename pointing to geotiff file to load
crs: Cartopy CRS or EPSG string (optional)
  Overrides CRS inferred from the data
apply_transform: boolean
  Whether to apply affine transform if defined on the data
nan_nodata: boolean
  If data contains nodata values convert them to NaNs
**kwargs:
  Keyword arguments passed to the HoloViews/GeoViews element

Returns
-------
element: Image/RGB/QuadMesh element