I have a geotiff that loads just fine in QGIS, and works when reprojected using Rasterio, but bombs with Holoviz
import xarray as xr
import hvplot.xarray
import fsspec
fs = fsspec.filesystem('s3', anon=True, endpoint_url='https://usgs.osn.mghpcc.org')
ds = xr.open_dataset(fs.open('esip/rsignell/testing/1646955_2487285.tiff'), engine='rasterio').squeeze('band', drop=True)
rasterio_crs = ds['band_data'].rio.crs
type(rasterio_crs)
rasterio.crs.CRS
ds['band_data'].hvplot(rasterize=True, crs=rasterio_crs)
--------------------------------------------------------------------------- Exception Traceback (most recent call last) Exception: (CRSError('Invalid projection: EPSG:PROJCS["Projection=Albers Conical Equal Area",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]] type=crs: (Internal Proj Error: proj_create: crs not found: EPSG:PROJCS["Projection=Albers Conical Equal Area",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]] type=crs)'), NotImplementedError('Unknown projection aea'), CRSError('Invalid projection: EPSG:PROJCS["PROJECTION=ALBERS CONICAL EQUAL AREA",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["GREENWICH",0],UNIT["DEGREE",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["ALBERS_CONIC_EQUAL_AREA"],PARAMETER["LATITUDE_OF_CENTER",23],PARAMETER["LONGITUDE_OF_CENTER",-96],PARAMETER["STANDARD_PARALLEL_1",29.5],PARAMETER["STANDARD_PARALLEL_2",45.5],PARAMETER["FALSE_EASTING",0],PARAMETER["FALSE_NORTHING",0],UNIT["METRE",1,AUTHORITY["EPSG","9001"]],AXIS["EASTING",EAST],AXIS["NORTHING",NORTH]] type=crs: (Internal Proj Error: proj_create: crs not found: EPSG:PROJCS["PROJECTION=ALBERS CONICAL EQUAL AREA",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["GREENWICH",0],UNIT["DEGREE",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["ALBERS_CONIC_EQUAL_AREA"],PARAMETER["LATITUDE_OF_CENTER",23],PARAMETER["LONGITUDE_OF_CENTER",-96],PARAMETER["STANDARD_PARALLEL_1",29.5],PARAMETER["STANDARD_PARALLEL_2",45.5],PARAMETER["FALSE_EASTING",0],PARAMETER["FALSE_NORTHING",0],UNIT["METRE",1,AUTHORITY["EPSG","9001"]],AXIS["EASTING",EAST],AXIS["NORTHING",NORTH]] type=crs)')) The above exception was the direct cause of the following exception: ValueError Traceback (most recent call last) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/converter.py:996, in HoloViewsConverter._process_crs(self, data, crs) 995 try: --> 996 return process_crs(_crs) 997 except ValueError as e: 998 # only raise error if crs was specified in kwargs File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/util.py:325, in process_crs(crs) 323 errors.append(e) --> 325 raise ValueError( 326 'Projection must be defined as a EPSG code, proj4 string, ' 327 'WKT string, cartopy CRS instance, cartopy CRS class name string, ' 328 'pyproj.Proj, or pyproj.CRS.' 329 ) from Exception(*errors) ValueError: Projection must be defined as a EPSG code, proj4 string, WKT string, cartopy CRS instance, cartopy CRS class name string, pyproj.Proj, or pyproj.CRS. During handling of the above exception, another exception occurred: ValueError Traceback (most recent call last) Cell In[6], line 1 ----> 1 ds['band_data'].hvplot(rasterize=True, crs=rasterio_crs) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/plotting/core.py:95, in hvPlotBase.__call__(self, x, y, kind, **kwds) 92 plot = self._get_converter(x, y, kind, **kwds)(kind, x, y) 93 return pn.panel(plot, **panel_dict) ---> 95 return self._get_converter(x, y, kind, **kwds)(kind, x, y) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/plotting/core.py:102, in hvPlotBase._get_converter(self, x, y, kind, **kwds) 100 y = y or params.pop('y', None) 101 kind = kind or params.pop('kind', None) --> 102 return HoloViewsConverter(self._data, x, y, kind=kind, **params) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/converter.py:655, in HoloViewsConverter.__init__(self, data, x, y, kind, by, use_index, group_label, value_label, backlog, persist, use_dask, crs, fields, groupby, dynamic, grid, legend, rot, title, xlim, ylim, clim, robust, symmetric, logx, logy, loglog, hover, hover_cols, hover_formatters, hover_tooltips, subplots, label, invert, stacked, colorbar, cticks, datashade, rasterize, downsample, resample_when, row, col, debug, framewise, aggregator, projection, global_extent, geo, precompute, flip_xaxis, flip_yaxis, dynspread, x_sampling, y_sampling, pixel_ratio, project, tools, attr_labels, coastline, tiles, tiles_opts, sort_date, check_symmetric_max, transforms, stream, cnorm, features, rescale_discrete_levels, autorange, subcoordinate_y, **kwds) 652 if self.geo or self.datatype == 'geopandas': 653 import_geoviews() --> 655 self.crs = self._process_crs(data, crs) if self.geo else None 656 self.output_projection = self.crs 657 self.project = project File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/converter.py:1000, in HoloViewsConverter._process_crs(self, data, crs) 997 except ValueError as e: 998 # only raise error if crs was specified in kwargs 999 if crs: -> 1000 raise ValueError( 1001 f"'{crs}' must be either a valid crs or an reference to " 1002 f'a `data.attr` containing a valid crs: {e}' 1003 ) ValueError: 'PROJCS["Projection = Albers Conical Equal Area",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' must be either a valid crs or an reference to a `data.attr` containing a valid crs: Projection must be defined as a EPSG code, proj4 string, WKT string, cartopy CRS instance, cartopy CRS class name string, pyproj.Proj, or pyproj.CRS.
from pyproj.crs import CRS as PyprojCRS
# Convert rasterio_crs to pyproj_crs
pyproj_crs = PyprojCRS.from_user_input(rasterio_crs)
type(pyproj_crs)
pyproj.crs.crs.CRS
ds['band_data'].hvplot(rasterize=True, crs=pyproj_crs)
--------------------------------------------------------------------------- Exception Traceback (most recent call last) Exception: (CRSError('Invalid projection: EPSG:PROJCS["Projection=Albers Conical Equal Area",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]] type=crs: (Internal Proj Error: proj_create: crs not found: EPSG:PROJCS["Projection=Albers Conical Equal Area",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]] type=crs)'), NotImplementedError('Unknown projection aea'), CRSError('Invalid projection: EPSG:PROJCS["PROJECTION=ALBERS CONICAL EQUAL AREA",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["GREENWICH",0],UNIT["DEGREE",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["ALBERS_CONIC_EQUAL_AREA"],PARAMETER["LATITUDE_OF_CENTER",23],PARAMETER["LONGITUDE_OF_CENTER",-96],PARAMETER["STANDARD_PARALLEL_1",29.5],PARAMETER["STANDARD_PARALLEL_2",45.5],PARAMETER["FALSE_EASTING",0],PARAMETER["FALSE_NORTHING",0],UNIT["METRE",1,AUTHORITY["EPSG","9001"]],AXIS["EASTING",EAST],AXIS["NORTHING",NORTH]] type=crs: (Internal Proj Error: proj_create: crs not found: EPSG:PROJCS["PROJECTION=ALBERS CONICAL EQUAL AREA",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["GREENWICH",0],UNIT["DEGREE",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["ALBERS_CONIC_EQUAL_AREA"],PARAMETER["LATITUDE_OF_CENTER",23],PARAMETER["LONGITUDE_OF_CENTER",-96],PARAMETER["STANDARD_PARALLEL_1",29.5],PARAMETER["STANDARD_PARALLEL_2",45.5],PARAMETER["FALSE_EASTING",0],PARAMETER["FALSE_NORTHING",0],UNIT["METRE",1,AUTHORITY["EPSG","9001"]],AXIS["EASTING",EAST],AXIS["NORTHING",NORTH]] type=crs)')) The above exception was the direct cause of the following exception: ValueError Traceback (most recent call last) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/converter.py:996, in HoloViewsConverter._process_crs(self, data, crs) 995 try: --> 996 return process_crs(_crs) 997 except ValueError as e: 998 # only raise error if crs was specified in kwargs File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/util.py:325, in process_crs(crs) 323 errors.append(e) --> 325 raise ValueError( 326 'Projection must be defined as a EPSG code, proj4 string, ' 327 'WKT string, cartopy CRS instance, cartopy CRS class name string, ' 328 'pyproj.Proj, or pyproj.CRS.' 329 ) from Exception(*errors) ValueError: Projection must be defined as a EPSG code, proj4 string, WKT string, cartopy CRS instance, cartopy CRS class name string, pyproj.Proj, or pyproj.CRS. During handling of the above exception, another exception occurred: ValueError Traceback (most recent call last) Cell In[10], line 1 ----> 1 ds['band_data'].hvplot(rasterize=True, crs=pyproj_crs) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/plotting/core.py:95, in hvPlotBase.__call__(self, x, y, kind, **kwds) 92 plot = self._get_converter(x, y, kind, **kwds)(kind, x, y) 93 return pn.panel(plot, **panel_dict) ---> 95 return self._get_converter(x, y, kind, **kwds)(kind, x, y) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/plotting/core.py:102, in hvPlotBase._get_converter(self, x, y, kind, **kwds) 100 y = y or params.pop('y', None) 101 kind = kind or params.pop('kind', None) --> 102 return HoloViewsConverter(self._data, x, y, kind=kind, **params) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/converter.py:655, in HoloViewsConverter.__init__(self, data, x, y, kind, by, use_index, group_label, value_label, backlog, persist, use_dask, crs, fields, groupby, dynamic, grid, legend, rot, title, xlim, ylim, clim, robust, symmetric, logx, logy, loglog, hover, hover_cols, hover_formatters, hover_tooltips, subplots, label, invert, stacked, colorbar, cticks, datashade, rasterize, downsample, resample_when, row, col, debug, framewise, aggregator, projection, global_extent, geo, precompute, flip_xaxis, flip_yaxis, dynspread, x_sampling, y_sampling, pixel_ratio, project, tools, attr_labels, coastline, tiles, tiles_opts, sort_date, check_symmetric_max, transforms, stream, cnorm, features, rescale_discrete_levels, autorange, subcoordinate_y, **kwds) 652 if self.geo or self.datatype == 'geopandas': 653 import_geoviews() --> 655 self.crs = self._process_crs(data, crs) if self.geo else None 656 self.output_projection = self.crs 657 self.project = project File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/converter.py:1000, in HoloViewsConverter._process_crs(self, data, crs) 997 except ValueError as e: 998 # only raise error if crs was specified in kwargs 999 if crs: -> 1000 raise ValueError( 1001 f"'{crs}' must be either a valid crs or an reference to " 1002 f'a `data.attr` containing a valid crs: {e}' 1003 ) ValueError: 'PROJCS["Projection = Albers Conical Equal Area",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' must be either a valid crs or an reference to a `data.attr` containing a valid crs: Projection must be defined as a EPSG code, proj4 string, WKT string, cartopy CRS instance, cartopy CRS class name string, pyproj.Proj, or pyproj.CRS.
# Convert pyproj_crs to a Cartopy CRS object
# You can use the WKT string for robust conversion to Cartopy
import cartopy.crs as ccrs
cartopy_crs = ccrs.CRS(pyproj_crs.to_wkt())
type(cartopy_crs)
cartopy.crs.CRS
ds['band_data'].hvplot(rasterize=True, crs=cartopy_crs)
--------------------------------------------------------------------------- Exception Traceback (most recent call last) Exception: (CRSError('Invalid projection: EPSG:PROJCS["Projection=Albers Conical Equal Area",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]] type=crs: (Internal Proj Error: proj_create: crs not found: EPSG:PROJCS["Projection=Albers Conical Equal Area",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]] type=crs)'), NotImplementedError('Unknown projection aea'), CRSError('Invalid projection: EPSG:PROJCS["PROJECTION=ALBERS CONICAL EQUAL AREA",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["GREENWICH",0],UNIT["DEGREE",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["ALBERS_CONIC_EQUAL_AREA"],PARAMETER["LATITUDE_OF_CENTER",23],PARAMETER["LONGITUDE_OF_CENTER",-96],PARAMETER["STANDARD_PARALLEL_1",29.5],PARAMETER["STANDARD_PARALLEL_2",45.5],PARAMETER["FALSE_EASTING",0],PARAMETER["FALSE_NORTHING",0],UNIT["METRE",1,AUTHORITY["EPSG","9001"]],AXIS["EASTING",EAST],AXIS["NORTHING",NORTH]] type=crs: (Internal Proj Error: proj_create: crs not found: EPSG:PROJCS["PROJECTION=ALBERS CONICAL EQUAL AREA",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["GREENWICH",0],UNIT["DEGREE",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["ALBERS_CONIC_EQUAL_AREA"],PARAMETER["LATITUDE_OF_CENTER",23],PARAMETER["LONGITUDE_OF_CENTER",-96],PARAMETER["STANDARD_PARALLEL_1",29.5],PARAMETER["STANDARD_PARALLEL_2",45.5],PARAMETER["FALSE_EASTING",0],PARAMETER["FALSE_NORTHING",0],UNIT["METRE",1,AUTHORITY["EPSG","9001"]],AXIS["EASTING",EAST],AXIS["NORTHING",NORTH]] type=crs)')) The above exception was the direct cause of the following exception: ValueError Traceback (most recent call last) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/converter.py:996, in HoloViewsConverter._process_crs(self, data, crs) 995 try: --> 996 return process_crs(_crs) 997 except ValueError as e: 998 # only raise error if crs was specified in kwargs File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/util.py:325, in process_crs(crs) 323 errors.append(e) --> 325 raise ValueError( 326 'Projection must be defined as a EPSG code, proj4 string, ' 327 'WKT string, cartopy CRS instance, cartopy CRS class name string, ' 328 'pyproj.Proj, or pyproj.CRS.' 329 ) from Exception(*errors) ValueError: Projection must be defined as a EPSG code, proj4 string, WKT string, cartopy CRS instance, cartopy CRS class name string, pyproj.Proj, or pyproj.CRS. During handling of the above exception, another exception occurred: ValueError Traceback (most recent call last) Cell In[13], line 1 ----> 1 ds['band_data'].hvplot(rasterize=True, crs=cartopy_crs) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/plotting/core.py:95, in hvPlotBase.__call__(self, x, y, kind, **kwds) 92 plot = self._get_converter(x, y, kind, **kwds)(kind, x, y) 93 return pn.panel(plot, **panel_dict) ---> 95 return self._get_converter(x, y, kind, **kwds)(kind, x, y) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/plotting/core.py:102, in hvPlotBase._get_converter(self, x, y, kind, **kwds) 100 y = y or params.pop('y', None) 101 kind = kind or params.pop('kind', None) --> 102 return HoloViewsConverter(self._data, x, y, kind=kind, **params) File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/converter.py:655, in HoloViewsConverter.__init__(self, data, x, y, kind, by, use_index, group_label, value_label, backlog, persist, use_dask, crs, fields, groupby, dynamic, grid, legend, rot, title, xlim, ylim, clim, robust, symmetric, logx, logy, loglog, hover, hover_cols, hover_formatters, hover_tooltips, subplots, label, invert, stacked, colorbar, cticks, datashade, rasterize, downsample, resample_when, row, col, debug, framewise, aggregator, projection, global_extent, geo, precompute, flip_xaxis, flip_yaxis, dynspread, x_sampling, y_sampling, pixel_ratio, project, tools, attr_labels, coastline, tiles, tiles_opts, sort_date, check_symmetric_max, transforms, stream, cnorm, features, rescale_discrete_levels, autorange, subcoordinate_y, **kwds) 652 if self.geo or self.datatype == 'geopandas': 653 import_geoviews() --> 655 self.crs = self._process_crs(data, crs) if self.geo else None 656 self.output_projection = self.crs 657 self.project = project File ~/miniforge3/envs/pangeo/lib/python3.12/site-packages/hvplot/converter.py:1000, in HoloViewsConverter._process_crs(self, data, crs) 997 except ValueError as e: 998 # only raise error if crs was specified in kwargs 999 if crs: -> 1000 raise ValueError( 1001 f"'{crs}' must be either a valid crs or an reference to " 1002 f'a `data.attr` containing a valid crs: {e}' 1003 ) ValueError: 'PROJCRS["Projection = Albers Conical Equal Area",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["unnamed",METHOD["Albers Equal Area",ID["EPSG",9822]],PARAMETER["Latitude of false origin",23,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",-96,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",29.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",45.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",0,LENGTHUNIT["metre",1],ID["EPSG",8826]],PARAMETER["Northing at false origin",0,LENGTHUNIT["metre",1],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["northing",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]' must be either a valid crs or an reference to a `data.attr` containing a valid crs: Projection must be defined as a EPSG code, proj4 string, WKT string, cartopy CRS instance, cartopy CRS class name string, pyproj.Proj, or pyproj.CRS.
da = ds['band_data'].rio.reproject('EPSG:3857')
da.hvplot(rasterize=True, tiles='OSM', alpha=0.6, geo=True)