Skip to content

Commit

Permalink
Fix QgsPointXY issues
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 2, 2017
1 parent 4ba385d commit e2227d9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion python/core/geometry/qgspointv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class QgsPoint: QgsAbstractGeometry
{
%Docstring
Point geometry type, with support for z-dimension and m-values.
.. versionadded:: 2.10
.. versionadded:: 3.0
%End

%TypeHeaderCode
Expand Down
8 changes: 4 additions & 4 deletions python/plugins/processing/algs/qgis/GridLine.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ def processAlgorithm(self, context, feedback):
count_update = count_max * 0.10
y = bbox.yMaximum()
while y >= bbox.yMinimum():
pt1 = QgsPointXY(bbox.xMinimum(), y)
pt2 = QgsPointXY(bbox.xMaximum(), y)
pt1 = QgsPoint(bbox.xMinimum(), y)
pt2 = QgsPoint(bbox.xMaximum(), y)
line = QgsLineString()
line.setPoints([pt1, pt2])
feat.setGeometry(QgsGeometry(line))
Expand All @@ -177,8 +177,8 @@ def processAlgorithm(self, context, feedback):
count_update = count_max * 0.10
x = bbox.xMinimum()
while x <= bbox.xMaximum():
pt1 = QgsPointXY(x, bbox.yMaximum())
pt2 = QgsPointXY(x, bbox.yMinimum())
pt1 = QgsPoint(x, bbox.yMaximum())
pt2 = QgsPoint(x, bbox.yMinimum())
line = QgsLineString()
line.setPoints([pt1, pt2])
feat.setGeometry(QgsGeometry(line))
Expand Down
3 changes: 1 addition & 2 deletions src/core/geometry/qgspointv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
****************************************************************************/

/** \ingroup core
* \class QgsPointV2
* \brief Point geometry type, with support for z-dimension and m-values.
* \since QGIS 2.10
* \since QGIS 3.0, (previously QgsPointv2 since QGIS 2.10)
*/
class CORE_EXPORT QgsPoint: public QgsAbstractGeometry
{
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsbearingutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from qgis.core import (QgsBearingUtils,
QgsCoordinateReferenceSystem,
QgsPoint
QgsPointXY
)

from qgis.testing import start_app, unittest
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsmaprenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
QgsFeature,
QgsGeometry,
QgsMapSettings,
QgsPoint)
QgsPointXY)
from qgis.testing import start_app, unittest
from qgis.PyQt.QtCore import QSize, QThreadPool
from qgis.PyQt.QtGui import QPainter, QImage
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgspoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import qgis # NOQA

from qgis.core import QgsPoint
from qgis.core import QgsPointXY

from qgis.testing import start_app, unittest

Expand Down

0 comments on commit e2227d9

Please sign in to comment.