|||
空间数据的格式千变万化,常见的有ENVI Standard、GEOTIFF、Erads Image等等(栅格文件列表,矢量文件列表),以下应用GDAL工具转换文件的格式,省时高效。
举个栗子,ENVI Standard转换为GEOTIFF,参考How to call gdal_translate from Python code? Answered by Max。附上代码和测试数据(Practice.rar)。
NOTE:
os.system(command): Execute the command (a string) in a subshell. This is implemented by calling the Standard C function system(). On Windows, the return value is that returned by the system shell after running command. 实际上,示例是Python调用C+GDAL的代码。
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-23 06:59
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社