我有一些MODIS hdf文件,尝试使用Python.Here中的GDAL模块将投影从正弦更改为朗伯特共形圆锥是我的python代码,它返回错误信息:
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.
我该怎么修呢?谢谢!
发布于 2013-01-25 15:45:56
os.sys是一个模块名称。如果你需要运行一个系统命令行,你需要使用os.system(' command ')
https://stackoverflow.com/questions/14517143
复制相似问题