Hi All,
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. 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. 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. 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. 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 [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
