<div dir="ltr">Just a quick question.<div>Is QgsGeometry::asPolyline() and  QgsGeometry::asPoint() also going to change to return QgsPoint?</div><div><br></div><div>Regards</div><div>Theuns Heydenrych</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 26 Oct 2017 at 00:06 Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 26 October 2017 at 05:30, C Hamilton <<a href="mailto:adenaculture@gmail.com" target="_blank">adenaculture@gmail.com</a>> wrote:<br>
> I just found that an API changed made a break with Lat Lon Tools which  is<br>
> OK because I understand it is in flux.<br>
><br>
> A while back a change was made to use QgsPointXY with QgsVertexMarker and<br>
> QgsRubberBand through QgsGeometry.fromPolyline(). In looking at the<br>
> documentation there is now a fromPolylineXY(), but from the API breaks<br>
> documentation it seems like the use of fromPolyline is preferred.<br>
><br>
<br>
This is a perfectly valid use of fromPolylineXY - since the created<br>
geometry is only for display and presence of Z/M will have no effect.<br>
<br>
I think most of the purely-gui classes are now working with QgsPointXY<br>
(unless they've explicitly added overrides for QgsPoint objects). If<br>
you find a GUI/canvas class which *only* works with QgsPoint I'd say<br>
that's a bug and should be fixed in the API.<br>
<br>
Basically the rationale here is that we needed a really lightweight 2d<br>
point class (since QgsPoint is a QgsAbstractGeometry and comes with<br>
the associated overhead + complex api). Ideally we'd just use QPointF,<br>
but unfortunately QPointF uses qreal which is float on some platforms<br>
(and we need to be guaranteed a double for some use cases).<br>
<br>
Nyall<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>