Bug report #11800
documentation error in qgis:creategrid and associated errors it Hex grid from layer script
|Affected QGIS version:||2.6.1||Regression?:||No|
|Operating System:||all||Easy fix?:||No|
|Pull Request or Patch supplied:||Yes||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||20024|
Running the "Hex grid from layer" script gives this error:
Oooops! The following output layers could not be open
The above files could not be opened, which probably indicates that
they were not correctly produced by the executed algorithm
Checking the log information might help you see why those layers were
not created as expected
The log helpfully suggests:
Horizontal spacing is too small for the covered area
Running the "Create Grid" gui with the same values gives this in the log:
#ALGORITHM|Sat Dec 06 2014 18:31:27|processing.runalg("qgis:creategrid",3,7829,10226,200,200,353075,6595874,"EPSG:28351","/home/user/temp.shp")
which is to say
processing.runalg("qgis:creategrid", gridtype, width, height, hspacing, vspacing, centerx, centery, CRStype, savename)
This is different to the documentation
processing.runalg('qgis:creategrid', hspacing, vspacing, width, height, centerx, centery, gridtype, savename)
which the "Hex grid from layer" script follows
processing.runalg('qgis:creategrid', cellsize, cellsize, width, height, centerx, centery, 3, input.crs().authid(), grid)
I'll assume qgis:creategrid alg is correct and the documentation needs an update (if you can point me in the right direction I can do that), and am providing a patch for the "Hex grid from layers" script
#1 Updated by ramon . about 5 years ago
I notice I've not been clear about which docs I'm talking about.
The documentation in the user guide is correct.
It's the in application that needs an update.
The patch for the script adjusts the script to fit the user manual docs and the information from the algorithm in the log.
#2 Updated by ramon . about 5 years ago
I see in this thread http://lists.osgeo.org/pipermail/qgis-community-team/2014-December/004001.html that the documentation in >2.7 will be pointing to the user manual descriptions, and therefore should be correct (or at least more than it is now.
Clearly, I've not been paying enough attention, and am making un-needed noise about the docs bit.
#3 Updated by Giovanni Manghi about 5 years ago
- Resolution set to fixed/implemented
- Status changed from Open to Closed
will be fixed when this PR will be committed
but closing because anyway this script is not part of qgis source code, but belongs to the QGIS-processing scripts repository.