<div dir="ltr"><div>Hi All,</div><div><br></div><div><br></div><div>In the context of the crowdfunded project to improve Circular Arcs support in GEOS/QGIS, between Opengis.ch and Dan Baston from iSciences, we'd like to ask you for technical feedback at an early stage of the QGIS implementation.</div><div><br></div><div><br></div><div>We've come to the conclusion that in order to avoid code duplication in the QgsGeos class, when importing/exporting LineString or CircularString geometries from/to GEOS (used, e.g., in QgsGeos::fromGeos() and QgsGeos::asGeos() methods), we would need to introduce a new abstract class called QgsSimpleCurve.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>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.</div><div>Other alternatives are also welcome for the discussion, just let us know.</div><div><br></div><div><br></div><div>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.</div><div><br></div><div>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.</div><div>Thank you in advance.</div><div><br></div><div><br></div><div>Regards,</div><div><br></div><div>Germán</div><div>-----------</div><div>[1] <a href="https://gdal.org/en/stable/doxygen/classOGRSimpleCurve.html">https://gdal.org/en/stable/doxygen/classOGRSimpleCurve.html</a></div><div>[2] <a href="https://github.com/libgeos/geos/blob/main/include/geos/geom/SimpleCurve.h">https://github.com/libgeos/geos/blob/main/include/geos/geom/SimpleCurve.h</a></div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div></div></div></div></div></div></div></div></div>