I am trying to use gdal:contour script in Qgis console and then script. Here is code which I tried write to console.
raster = QgsRasterLayer('C:/Users/Bulva.user/Desktop/test_raster.asc', "DEM") QgsMapLayerRegistry.instance().addMapLayers([raster]) processing.runalg("gdalogr:contour", raster, 1.0, "ELEV", None, "C:/Users/Bulva.user/Desktop/contour.shp")
the output of console is:
but there is no shapefile as output. I tried processing.runandload and there is a problem with loading layer, because shapefile wasn't generated.
I tried it few days ago and I swear it worked but today I have no idea why it is not working.
This my log in Log Messages Panel > Processing:
2016-05-11T11:45:35 2 Problem with OTB installation: OTB was not found or is not correctly installed 2016-05-11T11:47:25 0 GDAL execution console output Usage: gdal_contour [-b <band>] [-a <attribute_name>] [-3d] [-inodata] [-snodata n] [-f <formatname>] [-i <interval>] [-f <formatname>] [[-dsco NAME=VALUE] ...] [[-lco NAME=VALUE] ...] [-off <offset>] [-fl <level> <level>...] [-nln <outlayername>] [-q] <src_filename> <dst_filename> FAILURE: Too many command options.
and in OGR:
2016-05-11T11:47:25 1 Data source is invalid () 2016-05-11T11:47:25 1 Data source is invalid ()