[QGIS-Developer] Feedback on introducing a new (abstract) class: QgsSimpleCurve
Nyall Dawson
nyall.dawson at gmail.com
Wed May 27 15:59:38 PDT 2026
On Thu, 28 May 2026 at 02:27, Germán Carrillo via QGIS-Developer <
qgis-developer at lists.osgeo.org> wrote:
>
> This new class would inherit from QgsCurve and would be the base class
for QgsLineString and QgsCircularString. Namely, importing/exporting
QgsCircularString geometries would largely benefit from the existing
import/export code for QgsLineString, so we'd be reusing as much code as
possible.
Makes sense to me 👍
>
> Moreover, other projects like GDAL/OGR [1] and GEOS itself [2], already
have SimpleCurve classes to ease implementation, even if a SimpleCurve
class is not part of the SQL/MM standard.
If GDAL does this, then that's a good enough proof that it's not a bad move
to me.
Nyall
>
>
> An alternative would be to keep using QgsCurve as the base class, and add
some methods to it that would be ONLY used by
QgsLineString/QgsCircularString, ensuring that QgsCompoundCurve returns
exceptions when those methods are called.
> Other alternatives are also welcome for the discussion, just let us know.
>
>
> Since this decision is one of the building blocks for improving Circular
Arcs support in QGIS (e.g., for integrating a brand new Geometry Splitter
from GEOS, expected for the 3.15 release), we'd like to kindly ask for your
feedback before proceeding with a PR, so that we can assess early whether
the community estimates this move as risky or as a natural step for the
QGIS project.
>
> Also, let us know if a QEP would be needed here, or if we could go on
with this discussion and then with a well isolated PR.
> Thank you in advance.
>
>
> Regards,
>
> Germán
> -----------
> [1] https://gdal.org/en/stable/doxygen/classOGRSimpleCurve.html
> [2]
https://github.com/libgeos/geos/blob/main/include/geos/geom/SimpleCurve.h
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20260528/a74b9673/attachment.htm>
More information about the QGIS-Developer
mailing list