Skip to content


#9360R: disable ogr simplification while OGR_G_SetPoints does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuarte47 committed Jan 20, 2014
1 parent 6c14b50 commit 0c99423
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/providers/ogr/qgsogrgeometrysimplifier.h
Expand Up @@ -20,12 +20,27 @@
#include "qgsmaptopixelgeometrysimplifier.h"
#include <ogr_api.h>

// Enable OGR-simplification on provider side when OGRGeometry class is available
/* TODO:
* Disable OGR-simplification on provider side because of OGRGeometry class
* (GDAL C++ API) is not available in current QGIS builds.
* This simplification is ~5-10% faster than simplification on QGIS side
* (for very complex polygons up to ~20%).
* While GDAL C API has not published the needed method 'OGR_G_SetPoints()'
* to rewrite the geometry of a LineString/LinearRing in one single call,
* we can not enable the OGR-simplification to change the current disabled
* references of OGRGeometry* (GDAL C++ API) to OGRGeometryH (GDAL C API).
* Search in 'qgsogrgeometrysimplifier.cpp' : lineString->setPoints(...);
* We can not use 'OGR_G_SetPoint(...)' because of each call reallocs the
* point array of the geometry and it is very-very slow.
#if defined(__cplusplus)
class OGRGeometry;
class OGRRawPoint;

* Abstract base class for simplify OGR-geometries using a specific algorithm
Expand Down

0 comments on commit 0c99423

Please sign in to comment.