Skip to content

Commit 0c99423

Browse files
committed
#9360R: disable ogr simplification while OGR_G_SetPoints does not exist
1 parent 6c14b50 commit 0c99423

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/providers/ogr/qgsogrgeometrysimplifier.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,27 @@
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

0 commit comments

Comments
 (0)