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(
126126 >>> # CRS is set only if rioxarray is available
127127 >>> if hasattr(raster, "rio"):
128128 ... raster.rio.crs
129- CRS.from_epsg(3857 )
129+ CRS.from_wkt(... )
130130 """
131131 if not _HAS_CONTEXTILY :
132- raise ImportError (
132+ msg = (
133133 "Package `contextily` is required to be installed to use this function. "
134134 "Please use `python -m pip install contextily` or "
135135 "`mamba install -c conda-forge contextily` to install the package."
136136 )
137+ raise ImportError (msg )
137138
138139 contextily_kwargs = {}
139140 if zoom_adjust is not None :
140141 contextily_kwargs ["zoom_adjust" ] = zoom_adjust
141142 if Version (contextily .__version__ ) < Version ("1.5.0" ):
142- raise TypeError (
143+ msg = (
143144 "The `zoom_adjust` parameter requires `contextily>=1.5.0` to work. "
144145 "Please upgrade contextily, or manually set the `zoom` level instead."
145146 )
147+ raise TypeError (msg )
146148
147149 west , east , south , north = region
148150 image , extent = contextily .bounds2img (
You can’t perform that action at this time.
0 commit comments