Skip to content

Commit

Permalink
GeoTIFF: use official projection parameters from EPSG
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodsf committed Jan 27, 2025
1 parent f0b3d5a commit 170fc05
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sourcespec/ssp_plot_stations.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ def _read_geotiff(tif_file, grayscale=False):
# reduce log level for rasterio to avoid DEBUG messages
logging.getLogger('rasterio').setLevel(logging.WARNING)
from rasterio.warp import transform_bounds
# use official projection parameters from EPSG
# (overriding the ones from GeoTIFF keys)
os.environ['GTIFF_SRS_SOURCE'] = 'EPSG'
with rasterio.open(tif_file) as src:
# Get the bounding box in the raster's CRS
bounds = src.bounds
Expand Down

0 comments on commit 170fc05

Please sign in to comment.