我正在使用Rasterio在Python中读取一个jpg图像及其相关的world文件,代码如下:
import rasterio
with rasterio.open('/path/to/file.jpg') as src:
print(src.width, src.height)
print(src.crs)
print(src.indexes)
图像文件及其相关的世界文件已被正确读取,然而CRS未定义(我猜这是因为世界文件不包含CRS)。以下是输出结果:
5000 5000
None
(1, 2, 3)
如何在Rasterio中手动设置CRS?