File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1616 TileProvider = None
1717 _HAS_CONTEXTILY = False
1818
19+ try :
20+ import rioxarray # rioxarray is needed to register the rio accessor # noqa: F401
21+
22+ _HAS_RIOXARRAY = True
23+ except ImportError :
24+ _HAS_RIOXARRAY = False
25+
1926import numpy as np
2027import xarray as xr
2128
@@ -117,6 +124,11 @@ def load_tile_map(
117124 * y (y) float64 ... -7.081e-10 -7.858e+04 ... -1.996e+07 -2.004e+07
118125 * x (x) float64 ... -2.004e+07 -1.996e+07 ... 1.996e+07 2.004e+07
119126 spatial_ref int64 ... 0
127+ >>> # CRS is set only if rioxarray is available
128+ >>> import importlib
129+ >>> if importlib.util.find_spec("rioxarray"):
130+ ... raster.rio.crs
131+ CRS.from_epsg(3857)
120132 """
121133 if not _HAS_CONTEXTILY :
122134 raise ImportError (
You can’t perform that action at this time.
0 commit comments