我正在使用GDAL将.tif转换为.shp文件。
gdal_polygonize.py input.tif -f “ESRI Shapefile” out.shp但是,这不起作用,并导致:
Traceback (most recent call last):
File "/usr/local/bin/gdal_polygonize.py", line 166, in <module>
drv = ogr.GetDriverByName(format)
File "/Library/Frameworks/GDAL.framework/Versions/1.11/Python/2.7/site-packages/osgeo/ogr.py", line 5255, in GetDriverByName
return _ogr.GetDriverByName(*args)
TypeError: in method 'GetDriverByName', argument 1 of type 'char const *'我不认为.tif文件或命令有任何错误
发布于 2016-09-13 21:15:57
尝试将"ESRI Shapefile“替换为”ESRI Shapefile“或”ESRI Shapefile“。我尝试了一个随机栅格,我没有得到任何错误。
gdal_polygonize.py input.tif -f "ESRI Shapefile" out.shphttps://stackoverflow.com/questions/37181865
复制相似问题