Skip to content
Browse files
#9360R: disable ogr simplification while OGR_G_SetPoints does not exist
  • Loading branch information
ahuarte47 committed Jan 20, 2014
1 parent 6c14b50 commit 0c99423b181bfc418b6a71aed33cbf6d7abc24c2
Showing with 16 additions and 1 deletion.
  1. +16 −1 src/providers/ogr/qgsogrgeometrysimplifier.h
@@ -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

0 comments on commit 0c99423

Please sign in to comment.