mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Take into account z dimension from center points
This commit is contained in:
parent
12392f75b3
commit
d91bd45749
@ -183,7 +183,7 @@ QgsCircle QgsCircle::fromCenterPoint( const QgsPoint ¢er, const QgsPoint &pt
|
||||
double azimuth = QgsGeometryUtils::lineAngle( center.x(), center.y(), pt1.x(), pt1.y() ) * 180.0 / M_PI;
|
||||
|
||||
QgsPoint centerPt( center );
|
||||
QgsGeometryUtils::setZValueFromPoints( QgsPointSequence() << pt1, centerPt );
|
||||
QgsGeometryUtils::setZValueFromPoints( QgsPointSequence() << center << pt1, centerPt );
|
||||
|
||||
return QgsCircle( centerPt, centerPt.distance( pt1 ), azimuth );
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ QgsEllipse QgsEllipse::fromCenterPoint( const QgsPoint ¢er, const QgsPoint &
|
||||
double azimuth = 90.0;
|
||||
|
||||
QgsPoint centerPt( center );
|
||||
QgsGeometryUtils::setZValueFromPoints( QgsPointSequence() << pt1, centerPt );
|
||||
QgsGeometryUtils::setZValueFromPoints( QgsPointSequence() << center << pt1, centerPt );
|
||||
|
||||
return QgsEllipse( centerPt, axis_a, axis_b, azimuth );
|
||||
}
|
||||
@ -96,7 +96,7 @@ QgsEllipse QgsEllipse::fromCenter2Points( const QgsPoint ¢er, const QgsPoint
|
||||
double axis_b = center.distance( pp );
|
||||
|
||||
QgsPoint centerPt( center );
|
||||
QgsGeometryUtils::setZValueFromPoints( QgsPointSequence() << pt1 << pt2, centerPt );
|
||||
QgsGeometryUtils::setZValueFromPoints( QgsPointSequence() << center << pt1 << pt2, centerPt );
|
||||
|
||||
return QgsEllipse( centerPt, axis_a, axis_b, azimuth );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user