Python 正在使用光栅重新投影.tiff文件:crs错误:无法分析WKT。OGR错误代码6

Python 正在使用光栅重新投影.tiff文件:crs错误:无法分析WKT。OGR错误代码6,python,rasterio,reprojection-error,Python,Rasterio,Reprojection Error,我正在尝试使用以下代码将.tiff文件重新投影到EPSG:32638 我已安装的版本: Rasterio版本1.1.5 Numpy版本1.18.1 这是我正在使用的代码: (重新投影GeoTIFF数据集) 错误: --------------------------------------------------------------------------- CPLE_BaseError Traceback (most recent ca

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

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

这是我正在使用的代码: (重新投影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

---------------------------------------------------------------------------
CPLE_BaseError回溯(最后一次最近调用)
rasterio/_crs.pyx在rasterio中。_crs._crs.来自用户输入()
rasterio/_err.pyx在rasterio中。_err.exc_wrap_ogrer()
CPLE_BaseError:OGR错误代码6
在处理上述异常期间,发生了另一个异常:
CRSRERROR回溯(最近一次呼叫最后一次)
在里面
7将rasterio.open('/home/DATA/Test.tif')作为src:
8变换、宽度、高度=计算\u默认值\u变换(
---->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(*args,**kwds)
380 def包装(*参数,**kwds):
381如果是本地环境:
-->382返回f(*参数,**科威特第纳尔)
383其他:
384带有环境自_默认值():
计算默认值转换中的~/anaconda3/envs/elsa/lib/python3.7/site-packages/rasterio/warp.py(src_crs,dst_crs,width,height,left,bottom,right,top,gcps,resolution,dst_width,dst_height)
468
469 dst_仿射、dst_宽度、dst_高度=_计算_默认_变换(
-->470 src_crs、dst_crs、宽度、高度、左侧、底部、右侧、顶部、GCP
471     )
472
rasterio/_warp.pyx在rasterio中。\u warp.\u计算\u默认值\u变换()
rasterio/_base.pyx在rasterio中。_base._osr_来自于_crs()
来自用户输入的~/anaconda3/envs/elsa/lib/python3.7/site-packages/rasterio/crs.py(来自esri方言的cls、值、变形)
457 elif isinstance(值、字符串类型):
458 obj=cls()
-->459对象=来自用户的输入(值,来自esri方言的变形=来自esri方言的变形)
460返回obj
461其他:
rasterio/_crs.pyx在rasterio中。_crs._crs.来自用户输入()
CRSError:无法分析WKT。OGR错误代码6

我遇到了同样的错误…你解决了吗?即使我创建了一个新环境并重新安装了所有的软件包,我还是一次又一次地遇到同样的错误。你能提供
gdalinfo Test.tif的输出吗
?在Conda环境中,我在
rasterio 1.1.5
上遇到了这个错误。这可能与此有关(并应在
光栅1.2.0
中固定):