Skip to main content
Edited formatting
Source Link
Joseph
  • 76.3k
  • 7
  • 172
  • 286

Using Qgis 2.14.12 and PyQGIS, I get an error message when executing the following:

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896, 51.0205), 0.005, -1, 0.001, "e://out.tif")

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896,  51.0205), 0.005, -1, 0.001, "e://out.tif")

The output from

layer.isValid()

is True, but I get this error (warning) in the Python Console :

C:\PROGRA~1\QGIS2~1.14\bin>g.region n= 51.020500 s= 50.896000 e= 1.813000 w=1.635000 res=0.005
                   
   Sorry, <51.020500> isn't a valid option
                   
   Sorry, <50.896000> isn't a valid option
                   
   Sorry, <1.813000> isn't a valid option

This results in a 1 km raster at lat/lon 0/0.
However

However, when I launch the function from the QGIS toolbox, the output is fine.

I've tried both with GRASS 6 & 7.

Any ideas?

Using Qgis 2.14.12 and PyQGIS, I get an error message when executing the following:

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896, 51.0205), 0.005, -1, 0.001, "e://out.tif")

The output from

layer.isValid()

is True, but I get this error (warning) in the Python Console :

C:\PROGRA~1\QGIS2~1.14\bin>g.region n= 51.020500 s= 50.896000 e= 1.813000 w=1.635000 res=0.005
                 
   Sorry, <51.020500> isn't a valid option
                 
   Sorry, <50.896000> isn't a valid option
                 
   Sorry, <1.813000> isn't a valid option

This results in a 1 km raster at lat/lon 0/0.
However, when I launch the function from the QGIS toolbox, the output is fine.

I've tried both with GRASS 6 & 7

Any ideas?

Using Qgis 2.14.12 and PyQGIS, I get an error message when executing the following:

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896,  51.0205), 0.005, -1, 0.001, "e://out.tif")

The output from

layer.isValid()

is True, but I get this error (warning) in the Python Console :

C:\PROGRA~1\QGIS2~1.14\bin>g.region n= 51.020500 s= 50.896000 e= 1.813000 w=1.635000 res=0.005                  
   Sorry, <51.020500> isn't a valid option                  
   Sorry, <50.896000> isn't a valid option                  
   Sorry, <1.813000> isn't a valid option

This results in a 1 km raster at lat/lon 0/0.

However, when I launch the function from the QGIS toolbox, the output is fine.

I've tried both with GRASS 6 & 7.

Any ideas?

deleted 133 characters in body
Source Link
julsbreakdown
  • 1.5k
  • 10
  • 21

Using Qgis 2.14.12 and PyQGIS, I get an error message when executing the following:

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896, 51.0205), 0.005, -1, 0.001, "e://out.tif")

The output from

layer.isValid()

is True, but I get this error (warning) in the Python Console :

C:\PROGRA~1\QGIS2~1.14\bin>g.region n= 51.020500 s= 50.896000 e= 1.813000 w=1.635000 res=0.005
                
   Sorry, <51.020500> isn't a valid option
                
   Sorry, <50.896000> isn't a valid option
                
   Sorry, <1.813000> isn't a valid option

This results in a 1 km raster at lat/lon 0/0.
However, when I launch the function from the QGIS toolbox, the output is fine.

I've tried both with GRASS 6 & 7

Any ideas?

SOLUTION:

try giving the direct path to the input file instead of the layer object in the mapRegistry. ->
Thanks to mgri

Using Qgis 2.14.12 and PyQGIS, I get an error message when executing the following:

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896, 51.0205), 0.005, -1, 0.001, "e://out.tif")

The output from

layer.isValid()

is True, but I get this error (warning) in the Python Console :

C:\PROGRA~1\QGIS2~1.14\bin>g.region n= 51.020500 s= 50.896000 e= 1.813000 w=1.635000 res=0.005
                
   Sorry, <51.020500> isn't a valid option
                
   Sorry, <50.896000> isn't a valid option
                
   Sorry, <1.813000> isn't a valid option

This results in a 1 km raster at lat/lon 0/0.
However, when I launch the function from the QGIS toolbox, the output is fine.

I've tried both with GRASS 6 & 7

Any ideas?

SOLUTION:

try giving the direct path to the input file instead of the layer object in the mapRegistry. ->
Thanks to mgri

Using Qgis 2.14.12 and PyQGIS, I get an error message when executing the following:

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896, 51.0205), 0.005, -1, 0.001, "e://out.tif")

The output from

layer.isValid()

is True, but I get this error (warning) in the Python Console :

C:\PROGRA~1\QGIS2~1.14\bin>g.region n= 51.020500 s= 50.896000 e= 1.813000 w=1.635000 res=0.005
                
   Sorry, <51.020500> isn't a valid option
                
   Sorry, <50.896000> isn't a valid option
                
   Sorry, <1.813000> isn't a valid option

This results in a 1 km raster at lat/lon 0/0.
However, when I launch the function from the QGIS toolbox, the output is fine.

I've tried both with GRASS 6 & 7

Any ideas?

added 123 characters in body
Source Link
julsbreakdown
  • 1.5k
  • 10
  • 21

Using Qgis 2.14.12 and PyQGIS, I get an error message when executing the following:

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896, 51.0205), 0.005, -1, 0.001, "e://out.tif")

The output from

layer.isValid()

is True, but I get this error (warning) in the Python Console :

C:\PROGRA~1\QGIS2~1.14\bin>g.region n= 51.020500 s= 50.896000 e= 1.813000 w=1.635000 res=0.005
                
   Sorry, <51.020500> isn't a valid option
                
   Sorry, <50.896000> isn't a valid option
                
   Sorry, <1.813000> isn't a valid option

This results in a 1 km raster at lat/lon 0/0.
However, when I launch the function from the QGIS toolbox, the output is fine.

I've tried both with GRASS 6 & 7

Any ideas?

SOLUTION:

try giving the direct path to the input file instead of the layer object in the mapRegistry. ->
Thanks to mgri

Using Qgis 2.14.12 and PyQGIS, I get an error message when executing the following:

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896, 51.0205), 0.005, -1, 0.001, "e://out.tif")

The output from

layer.isValid()

is True, but I get this error (warning) in the Python Console :

C:\PROGRA~1\QGIS2~1.14\bin>g.region n= 51.020500 s= 50.896000 e= 1.813000 w=1.635000 res=0.005
                
   Sorry, <51.020500> isn't a valid option
                
   Sorry, <50.896000> isn't a valid option
                
   Sorry, <1.813000> isn't a valid option

This results in a 1 km raster at lat/lon 0/0.
However, when I launch the function from the QGIS toolbox, the output is fine.

I've tried both with GRASS 6 & 7

Any ideas?

Using Qgis 2.14.12 and PyQGIS, I get an error message when executing the following:

processing.runalg('grass7:v.surf.idw', layer, 18, 2.0, 'p', True, "%f, %f, %f ,%f"%(1.635, 1.813, 50.896, 51.0205), 0.005, -1, 0.001, "e://out.tif")

The output from

layer.isValid()

is True, but I get this error (warning) in the Python Console :

C:\PROGRA~1\QGIS2~1.14\bin>g.region n= 51.020500 s= 50.896000 e= 1.813000 w=1.635000 res=0.005
                
   Sorry, <51.020500> isn't a valid option
                
   Sorry, <50.896000> isn't a valid option
                
   Sorry, <1.813000> isn't a valid option

This results in a 1 km raster at lat/lon 0/0.
However, when I launch the function from the QGIS toolbox, the output is fine.

I've tried both with GRASS 6 & 7

Any ideas?

SOLUTION:

try giving the direct path to the input file instead of the layer object in the mapRegistry. ->
Thanks to mgri

added 62 characters in body; edited tags; edited title
Source Link
mgri
  • 16.3k
  • 6
  • 48
  • 80
Loading
Source Link
julsbreakdown
  • 1.5k
  • 10
  • 21
Loading