0
我有一些MODIS HDF文件,並試圖將投影從正弦使用GDAL模塊Python.Here改變等角圓錐投影是我的Python代碼並返回錯誤信息:如何在Python中使用GDAL改變MODIS hdf文件的投影?
import os,sys
import gdal
import numpy
os.sys('gdalwarp test.hdf outfile.hdf -t_srs "+proj=lcc"')
File "projection_cmd.py", line 5, in ?
os.sys('gdalwarp test.hdf outfile.hdf -t_srs "+proj=lcc"')
TypeError: 'module' object is not callable
當我使用命令行運行:
gdalwarp test.hdf outfile.hdf -t_srs "+proj=lcc"
ERROR 1: Unable to compute a transformation between pixel/line
and georeferenced coordinates for test.hdf.
There is no affine transformation and no GCPs.
我該如何解決它?謝謝!
GIS.se dupe:http://gis.stackexchange.com/questions/6669/converting-projected-geotiff-to -wgs84-with-gdal-and-python –