Skip to content
Permalink
Browse files

Fix QgsPointXY issues

  • Loading branch information
m-kuhn committed Jun 2, 2017
1 parent 4ba385d commit e2227d99986c274cc16ccbff0e4de8339065e986
@@ -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
@@ -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))
@@ -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))
@@ -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
{
@@ -16,7 +16,7 @@

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

from qgis.testing import start_app, unittest
@@ -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
@@ -14,7 +14,7 @@

import qgis # NOQA

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

from qgis.testing import start_app, unittest

0 comments on commit e2227d9

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