gdal 的安装可能已损坏:gdalUtils

问题描述 投票:0回答:1

我正在尝试使用

gdal_translate
,我使用
gdal_setInstallation()
定向了gdal路径,因为我的机器上有几个Gdal。昨天这有效,今天不行,我不知道为什么。任何帮助将不胜感激。

#When I go to set the installation I get this
gdalUtils:: gdal_setInstallation(search_path =  "C:\\Users\\user\\Gdal\\gdalwin32-1.6\\bin\\", rescan = T)
Probably broken install of gdal at 'C:/Users/user/Gdal/GDALWI~1.6/bin/'

#And when I run this next line of code I get a response I do not understand 
sid2tif <- gdal_translate(src_dataset = "C:\\Users\\user\\Desktop\\S2L Project\\GIS ProjectClipping\\Orthos\\2013 Orthos\\0_3.sid", dst_dataset = "0_3.tif", of ="GTiff", output_Raster = T)
Error in current_match & driver_match : 
  operations are possible only for numeric, logical or complex types


#My Environment Variables/System Variable matches = "C:\\Users\\user\\Gdal\\gdalwin32-1.6\\bin\\"

在继续使用batch_gdal_translate之前,我试图弄清楚gdal_translate()。

谢谢!!

r raster r-sf rgdal proj
1个回答
1
投票

万一有人遇到这个问题,我设法弄清楚,也许它会有所帮助。

我有 5 个版本的 gdal,其中 3/5 没有我需要转换 .sid 文件的 MrSID 插件。我通过使用cmd提示符

gdalinfo --format MrSID
找到了哪些版本有这个插件。使用具有 MrSID 插件的版本,我能够通过
gdal_setInstallation()
将其定向到正确的路径,从而允许
gdal_translate()
工作。我将此路径添加到我的系统变量路径中。

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.