4

我正在尝试使用以下代码将 .tiff 文件重新投影到 EPSG:32638。

我安装的版本:Rasterio 版本 1.1.5 Numpy 版本 1.18.1

这是我正在使用的代码:https ://rasterio.readthedocs.io/en/latest/topics/reproject.html(重新投影 GeoTIFF 数据集)

错误:

---------------------------------------------------------------------------
CPLE_BaseError                            Traceback (most recent call last)
rasterio/_crs.pyx in rasterio._crs._CRS.from_user_input()

rasterio/_err.pyx in rasterio._err.exc_wrap_ogrerr()

CPLE_BaseError: OGR Error code 6

During handling of the above exception, another exception occurred:

CRSError                                  Traceback (most recent call last)
<ipython-input-35-aa94757a1fc2> in <module>
      7 with rasterio.open('/home/DATA/Test.tif') as src:
      8     transform, width, height = calculate_default_transform(
----> 9         src.crs, dst_crs, src.width, src.height, *src.bounds)
     10     kwargs = src.meta.copy()
     11     kwargs.update({

~/anaconda3/envs/elsa/lib/python3.7/site-packages/rasterio/env.py in wrapper(*args, **kwds)
    380     def wrapper(*args, **kwds):
    381         if local._env:
--> 382             return f(*args, **kwds)
    383         else:
    384             with Env.from_defaults():

~/anaconda3/envs/elsa/lib/python3.7/site-packages/rasterio/warp.py in calculate_default_transform(src_crs, dst_crs, width, height, left, bottom, right, top, gcps, resolution, dst_width, dst_height)
    468 
    469     dst_affine, dst_width, dst_height = _calculate_default_transform(
--> 470         src_crs, dst_crs, width, height, left, bottom, right, top, gcps
    471     )
    472 

rasterio/_warp.pyx in rasterio._warp._calculate_default_transform()

rasterio/_base.pyx in rasterio._base._osr_from_crs()

~/anaconda3/envs/elsa/lib/python3.7/site-packages/rasterio/crs.py in from_user_input(cls, value, morph_from_esri_dialect)
    457         elif isinstance(value, string_types):
    458             obj = cls()
--> 459             obj._crs = _CRS.from_user_input(value, morph_from_esri_dialect=morph_from_esri_dialect)
    460             return obj
    461         else:

rasterio/_crs.pyx in rasterio._crs._CRS.from_user_input()

CRSError: The WKT could not be parsed. OGR Error code 6

4

0 回答 0