File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020#include " qgsmaptopixelgeometrysimplifier.h"
2121#include < ogr_api.h>
2222
23- // Enable OGR-simplification on provider side when OGRGeometry class is available
23+ /* TODO:
24+ * Disable OGR-simplification on provider side because of OGRGeometry class
25+ * (GDAL C++ API) is not available in current QGIS builds.
26+ * This simplification is ~5-10% faster than simplification on QGIS side
27+ * (for very complex polygons up to ~20%).
28+ *
29+ * While GDAL C API has not published the needed method 'OGR_G_SetPoints()'
30+ * to rewrite the geometry of a LineString/LinearRing in one single call,
31+ * we can not enable the OGR-simplification to change the current disabled
32+ * references of OGRGeometry* (GDAL C++ API) to OGRGeometryH (GDAL C API).
33+ *
34+ * Search in 'qgsogrgeometrysimplifier.cpp' : lineString->setPoints(...);
35+ * We can not use 'OGR_G_SetPoint(...)' because of each call reallocs the
36+ * point array of the geometry and it is very-very slow.
37+ *
2438#if defined(__cplusplus)
2539 #define HAVE_OGR_GEOMETRY_CLASS 1
2640 class OGRGeometry;
2741 class OGRRawPoint;
2842#endif
43+ */
2944
3045/* *
3146 * Abstract base class for simplify OGR-geometries using a specific algorithm
You can’t perform that action at this time.
0 commit comments