From bad7943b3714d6bd33081f3f127a55594b4d26e5 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:20:22 +1300 Subject: [PATCH] Fix doctest on pygmt.datasets.tile_map.load_tile_map in ci_tests_legacy (#3642) Use rio.crs.to_string() to get the 'EPSG:3857' string representation that should make the test compatible with rasterio 1.4.2 or older. --------- Co-authored-by: Dongdong Tian --- pygmt/datasets/tile_map.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/datasets/tile_map.py b/pygmt/datasets/tile_map.py index 2ca2022bfc6..0c9f1b6271d 100644 --- a/pygmt/datasets/tile_map.py +++ b/pygmt/datasets/tile_map.py @@ -125,8 +125,8 @@ def load_tile_map( spatial_ref int... 0 >>> # CRS is set only if rioxarray is available >>> if hasattr(raster, "rio"): - ... raster.rio.crs - CRS.from_wkt(...) + ... raster.rio.crs.to_string() + 'EPSG:3857' """ if not _HAS_CONTEXTILY: msg = (