mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[processing] fix issues with Create Grid algortihm
This commit is contained in:
parent
8db77fcff7
commit
94a33cd1c9
@ -159,7 +159,7 @@ class Grid(GeoAlgorithm):
|
|||||||
|
|
||||||
ft.setGeometry(QgsGeometry.fromPolyline(polyline))
|
ft.setGeometry(QgsGeometry.fromPolyline(polyline))
|
||||||
ft.setAttributes([originX, y, originX + (col * hSpacing), y])
|
ft.setAttributes([originX, y, originX + (col * hSpacing), y])
|
||||||
writer.addFeature(feature)
|
writer.addFeature(ft)
|
||||||
|
|
||||||
def _rectangleGridPoly(self, writer, width, height, originX, originY,
|
def _rectangleGridPoly(self, writer, width, height, originX, originY,
|
||||||
hSpacing, vSpacing):
|
hSpacing, vSpacing):
|
||||||
@ -230,8 +230,8 @@ class Grid(GeoAlgorithm):
|
|||||||
ft = QgsFeature()
|
ft = QgsFeature()
|
||||||
|
|
||||||
# To preserve symmetry, hspacing is fixed relative to vspacing
|
# To preserve symmetry, hspacing is fixed relative to vspacing
|
||||||
xXertexLo = 0.288675134594813 * vSpacing;
|
xVertexLo = 0.288675134594813 * vSpacing;
|
||||||
xXertexHi = 0.577350269189626 * vSpacing;
|
xVertexHi = 0.577350269189626 * vSpacing;
|
||||||
hSpacing = xVertexLo + xVertexHi
|
hSpacing = xVertexLo + xVertexHi
|
||||||
|
|
||||||
halfVSpacing = vSpacing / 2
|
halfVSpacing = vSpacing / 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user