Bug report #13115

Processing qgis:vectorgrid to lines not working

Added by Nicklas Larsson over 8 years ago. Updated over 8 years ago.

Assignee:Victor Olaya
Affected QGIS version:2.8.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21180


Running the following in the console:
raises the following OGR log message:

Feature creation error (OGR error: Attempt to write non-polygon (LINESTRING) geometry to POLYGON type shapefile.)

… and an empty (no geometries) shp file is created.

The gui version Vector>Research Tools>Vector Grid… gives the expected and correct result.

The source code for the two are independent of each other, but the latter's (/python/plugins/fTools/tools/doVectorGrid.py) implementation indicate the problem with the code of the former:

My suggestion (though untested):

   fields, QGis.WKBPolygon, mapCRS)

should change to:
    fields, QGis.WKBLineString, mapCRS)

Associated revisions

Revision 1714e669
Added by Giovanni Manghi over 8 years ago

fix Processing QGIS vector grid as lines

fixes #13115
(cherry-picked from 1dfec33)


#1 Updated by Giovanni Manghi over 8 years ago

  • Status changed from Open to Feedback

Should be fixed with



#2 Updated by Giovanni Manghi over 8 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF