File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -126,23 +126,25 @@ def load_tile_map(
126
126
>>> # CRS is set only if rioxarray is available
127
127
>>> if hasattr(raster, "rio"):
128
128
... raster.rio.crs
129
- CRS.from_epsg(3857 )
129
+ CRS.from_wkt(... )
130
130
"""
131
131
if not _HAS_CONTEXTILY :
132
- raise ImportError (
132
+ msg = (
133
133
"Package `contextily` is required to be installed to use this function. "
134
134
"Please use `python -m pip install contextily` or "
135
135
"`mamba install -c conda-forge contextily` to install the package."
136
136
)
137
+ raise ImportError (msg )
137
138
138
139
contextily_kwargs = {}
139
140
if zoom_adjust is not None :
140
141
contextily_kwargs ["zoom_adjust" ] = zoom_adjust
141
142
if Version (contextily .__version__ ) < Version ("1.5.0" ):
142
- raise TypeError (
143
+ msg = (
143
144
"The `zoom_adjust` parameter requires `contextily>=1.5.0` to work. "
144
145
"Please upgrade contextily, or manually set the `zoom` level instead."
145
146
)
147
+ raise TypeError (msg )
146
148
147
149
west , east , south , north = region
148
150
image , extent = contextily .bounds2img (
You can’t perform that action at this time.
0 commit comments