[英]How to start using Qgis python console
I'm new with python and I'm new with GDAL, so this is a dual problem. 我是python的新手,是GDAL的新手,所以这是一个双重问题。
I would like to start using the QGIS python console, in order to carry out some recurring operation. 我想开始使用QGIS python控制台,以便执行一些重复的操作。 I tried with this easy script
我尝试了这个简单的脚本
import gdal
gdalwarp -ot Float32 -s_srs EPSG:32630 -t_srs EPSG:3035 -r near -of GTiff /home/giacomo/Scrivania/provas/cccp.dat /home/giacomo/Scrivania/provas/cccp_qgs2.tif
But what I get is this syntax error: 但是我得到的是这个语法错误:
File "", line 1
文件“”,第1行
SyntaxError: invalid syntax
SyntaxError:语法无效
Do you have any ideas? 你有什么想法?
Thanks 谢谢
You can try this. 你可以试试看
import os
os.system('gdalwarp -ot Float32 -s_srs EPSG:32630 -t_srs EPSG:3035 -r near -of GTiff /home/giacomo/Scrivania/provas/cccp.dat /home/giacomo/Scrivania/provas/cccp_qgs2.tif')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.