Skip to content
Permalink
Browse files

[processing] fix issues with Create Grid algortihm

  • Loading branch information
alexbruy committed Oct 24, 2014
1 parent 8db77fc commit 94a33cd1c925d9e860a58a5bc165ff3a07e8db93
Showing with 3 additions and 3 deletions.
  1. +3 −3 python/plugins/processing/algs/qgis/Grid.py
@@ -159,7 +159,7 @@ def _rectangleGridLine(self, writer, width, height, originX, originY,

ft.setGeometry(QgsGeometry.fromPolyline(polyline))
ft.setAttributes([originX, y, originX + (col * hSpacing), y])
writer.addFeature(feature)
writer.addFeature(ft)

def _rectangleGridPoly(self, writer, width, height, originX, originY,
hSpacing, vSpacing):
@@ -230,8 +230,8 @@ def _hexagonGrid(self, writer, width, height, originX, originY,
ft = QgsFeature()

# To preserve symmetry, hspacing is fixed relative to vspacing
xXertexLo = 0.288675134594813 * vSpacing;
xXertexHi = 0.577350269189626 * vSpacing;
xVertexLo = 0.288675134594813 * vSpacing;
xVertexHi = 0.577350269189626 * vSpacing;
hSpacing = xVertexLo + xVertexHi

halfVSpacing = vSpacing / 2

0 comments on commit 94a33cd

Please sign in to comment.
You can’t perform that action at this time.