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