Skip to content
Permalink
Browse files
Merge pull request #4303 from nyalldawson/densify
Port processing densify algorithms to c++
  • Loading branch information
nyalldawson committed Mar 25, 2017
2 parents daa2454 + 51035cf commit 314842d0ccfffd40944bf6e874cfbd5efcfb011d
Showing with 822 additions and 215 deletions.
  1. +1 −1 NEWS
  2. +1 −1 doc/api_break.dox
  3. +1 −1 doc/news.html
  4. +1 −1 doc/news.t2t
  5. +2 −2 python/core/effects/qgsgloweffect.sip
  6. +2 −2 python/core/effects/qgspainteffect.sip
  7. +3 −11 python/core/geometry/qgsgeometry.sip
  8. +6 −6 python/core/geometry/qgslinestring.sip
  9. +1 −1 python/core/qgsexpression.sip
  10. +1 −1 python/core/qgsexpressioncontext.sip
  11. +1 −1 python/core/qgstaskmanager.sip
  12. +1 −1 python/core/qgstextrenderer.sip
  13. +1 −1 python/core/symbology-ng/qgssymbol.sip
  14. +1 −1 python/gui/qgsfieldmodel.sip
  15. +21 −15 python/plugins/processing/algs/help/qgis.yaml
  16. +2 −46 python/plugins/processing/algs/qgis/DensifyGeometries.py
  17. +1 −52 python/plugins/processing/algs/qgis/DensifyGeometriesInterval.py
  18. +11 −0 scripts/spell_check/spelling.dat
  19. +13 −8 src/app/qgsmapcanvasdockwidget.cpp
  20. +1 −1 src/core/composer/qgscomposermap.cpp
  21. +20 −0 src/core/composer/qgscomposermapoverview.cpp
  22. +2 −2 src/core/composer/qgscomposertablev2.cpp
  23. +2 −2 src/core/effects/qgsgloweffect.h
  24. +2 −2 src/core/effects/qgspainteffect.h
  25. +17 −12 src/core/geometry/qgsgeometry.cpp
  26. +27 −0 src/core/geometry/qgsgeometry.h
  27. +7 −5 src/core/geometry/qgsgeometryfactory.cpp
  28. +29 −5 src/core/geometry/qgsgeos.cpp
  29. +193 −0 src/core/geometry/qgsinternalgeometryengine.cpp
  30. +25 −0 src/core/geometry/qgsinternalgeometryengine.h
  31. +58 −0 src/core/geometry/qgslinestring.cpp
  32. +20 −0 src/core/geometry/qgslinestring.h
  33. +15 −6 src/core/geometry/qgstriangle.cpp
  34. +1 −1 src/core/qgsexpression.h
  35. +1 −1 src/core/qgsexpressioncontext.h
  36. +1 −1 src/core/qgstaskmanager.h
  37. +1 −1 src/core/qgstextrenderer.h
  38. +1 −8 src/core/qgsvectorlayereditutils.cpp
  39. +5 −5 src/core/qgsvectorlayerlabelprovider.cpp
  40. +1 −1 src/core/symbology-ng/qgslinesymbollayer.h
  41. +1 −1 src/core/symbology-ng/qgssymbol.h
  42. +1 −1 src/core/symbology-ng/qgssymbollayerutils.cpp
  43. +1 −1 src/gui/qgsfieldmodel.h
  44. +1 −6 src/gui/qgsmaptoolcapture.cpp
  45. +23 −0 tests/src/core/testqgscomposermapoverview.cpp
  46. +125 −0 tests/src/core/testqgsgeometry.cpp
  47. +1 −1 tests/src/core/testqgspainteffect.cpp
  48. +169 −0 tests/src/python/test_qgsgeometry.py
  49. BIN ...poverview/expected_composermap_overview_reprojected/expected_composermap_overview_reprojected.png
  50. BIN ...view/expected_composermap_overview_reprojected/expected_composermap_overview_reprojected_mask.png
2 NEWS
@@ -2012,7 +2012,7 @@ Implemented a new map cursor type : Capture Point (little pencil icon on your to
are placed into the system clipboard.

In release 0.5 this will be extended to provide simple point vector file data capture /
digitizing facility. This will be implemented by means of a plugin which will utilise the
digitizing facility. This will be implemented by means of a plugin which will utilize the
aforementioned xyClickCoordinate(QgsPoint) signal.

2004-06-12 [gsherman] 0.3.0devel30
@@ -2127,7 +2127,7 @@ Processing {#qgis_api_break_3_0_Processing}
- Algorithm providers now subclass the c++ QgsProcessingProvider class, and must be adapted to the API for QgsProcessingProvider. Specifically,
getName() should be replaced with id(), getDescription() with name(), and getIcon with icon().
- Algorithm's processAlgorithm method now passes a QgsProcessingFeedback object instead of the loosely defined progress parameter. Algorithms will
need to update their use of the progress argument to utilise the QgsProcessingFeedback API.
need to update their use of the progress argument to utilize the QgsProcessingFeedback API.
- Similarly, Python processing scripts no longer have access to a progress variable for reporting their progress. Instead they have a feedback
object of type QgsProcessingFeedback, and will need to adapt their use of progress reporting to the QgsProcessingFeedback API.
- SilentProgress was removed. Use the base QgsProcessingFeedback class instead.
@@ -2203,7 +2203,7 @@ <H1>28. 0.5</H1>
</P>
<P>
In release 0.5 this will be extended to provide simple point vector file data capture /
digitizing facility. This will be implemented by means of a plugin which will utilise the
digitizing facility. This will be implemented by means of a plugin which will utilize the
aforementioned xyClickCoordinate(QgsPoint) signal.
</P>
<P>
@@ -1964,7 +1964,7 @@ Implemented a new map cursor type : Capture Point (little pencil icon on your to
are placed into the system clipboard.

In release 0.5 this will be extended to provide simple point vector file data capture /
digitizing facility. This will be implemented by means of a plugin which will utilise the
digitizing facility. This will be implemented by means of a plugin which will utilize the
aforementioned xyClickCoordinate(QgsPoint) signal.

2004-06-12 [gsherman] 0.3.0devel30
@@ -124,15 +124,15 @@ class QgsGlowEffect : QgsPaintEffect
QColor color() const;

/** Sets the color ramp for the glow. This only applies if the @link colorType @endlink
* is set to ColorRamp. The glow will utilise colors from the ramp.
* is set to ColorRamp. The glow will utilize colors from the ramp.
* @param ramp color ramp for glow. Ownership of the ramp is transferred to the effect.
* @see ramp
* @see setColorType
*/
void setRamp( QgsColorRamp* ramp /Transfer/ );

/** Returns the color ramp used for the glow. This only applies if the @link colorType @endlink
* is set to ColorRamp. The glow will utilise colors from the ramp.
* is set to ColorRamp. The glow will utilize colors from the ramp.
* @returns color ramp for glow
* @see setRamp
* @see colorType
@@ -192,7 +192,7 @@ class QgsPaintEffect
*/
void drawSource( QPainter& painter );

/** Returns the source QPicture. The @link draw @endlink member can utilise this when
/** Returns the source QPicture. The @link draw @endlink member can utilize this when
* drawing the effect.
* @returns source QPicture
* @see drawSource
@@ -201,7 +201,7 @@ class QgsPaintEffect
const QPicture* source() const;

/** Returns the source QPicture rendered to a new QImage. The @link draw @endlink member can
* utilise this when drawing the effect. The image will be padded or cropped from the original
* utilize this when drawing the effect. The image will be padded or cropped from the original
* source QPicture by the results of the @link boundingRect @endlink method.
* The result is cached to speed up subsequent calls to sourceAsImage.
* @returns source QPicture rendered to an image
@@ -541,17 +541,9 @@ class QgsGeometry
* @note added in QGIS 3.0
*/
QgsGeometry extendLine( double startDistance, double endDistance ) const;

/** Returns a simplified version of this geometry using a specified tolerance value */
QgsGeometry simplify( double tolerance ) const;

/**
* Returns the center of mass of a geometry.
* @note for line based geometries, the center point of the line is returned,
* and for point based geometries, the point itself is returned
* @see pointOnSurface()
* @see poleOfInaccessibility()
*/
QgsGeometry simplify( double tolerance ) const;
QgsGeometry densifyByCount( int extraNodesPerSegment ) const;
QgsGeometry densifyByDistance( double distance ) const;
QgsGeometry centroid() const;

/**
@@ -11,14 +11,14 @@ class QgsLineString: public QgsCurve

public:
QgsLineString();
~QgsLineString();
QgsLineString( const QVector<double> &x, const QVector<double> &y,
const QVector<double> &z = QVector<double>(),
const QVector<double> &m = QVector<double>() );
QgsLineString( const QList<QgsPoint> &points );

bool operator==( const QgsCurve& other ) const;
bool operator!=( const QgsCurve& other ) const;
bool operator==( const QgsCurve &other ) const;
bool operator!=( const QgsCurve &other ) const;

/** Returns the specified point from inside the line string.
* @param i index of point, starting at 0 for the first point
*/
QgsPointV2 pointN( int i ) const;

/** Returns the z-coordinate of the specified node in the line string.
@@ -423,7 +423,7 @@ class QgsExpression
static const QList<QgsExpression::Function *>& Functions();
static const QStringList& BuiltinFunctions();

/** Registers a function to the expression engine. This is required to allow expressions to utilise the function.
/** Registers a function to the expression engine. This is required to allow expressions to utilize the function.
* @param function function to register
* @param transferOwnership set to true to transfer ownership of function to expression engine
* @returns true on successful registration
@@ -206,7 +206,7 @@ class QgsExpressionContextScope
/** \ingroup core
* \class QgsExpressionContext
* \brief Expression contexts are used to encapsulate the parameters around which a QgsExpression should
* be evaluated. QgsExpressions can then utilise the information stored within a context to contextualise
* be evaluated. QgsExpressions can then utilize the information stored within a context to contextualise
* their evaluated result. A QgsExpressionContext consists of a stack of QgsExpressionContextScope objects,
* where scopes added later to the stack will override conflicting variables and functions from scopes
* lower in the stack.
@@ -116,7 +116,7 @@ class QgsTask : QObject
* time as the parent task. This behavior can be overridden through the subTaskDependency
* argument.
*
* The parent task must be added to a QgsTaskManager for subtasks to be utilised.
* The parent task must be added to a QgsTaskManager for subtasks to be utilized.
* Subtasks should not be added manually to a QgsTaskManager, rather, only the parent
* task should be added to the manager.
*
@@ -609,7 +609,7 @@ class QgsTextShadowSettings
*/
int offsetAngle() const;

/** Sets the angle for offseting the position of the shadow from the text.
/** Sets the angle for offsetting the position of the shadow from the text.
* @param angle offset angle in degrees
* @see offsetAngle()
* @see setOffsetDistance()
@@ -217,7 +217,7 @@ class QgsSymbol
*/
QSet<QString> usedAttributes( const QgsRenderContext& context ) const;

/** Returns whether the symbol utilises any data defined properties.
/** Returns whether the symbol utilizes any data defined properties.
* @note added in QGIS 2.12
*/
bool hasDataDefinedProperties() const;
@@ -13,7 +13,7 @@ class QgsFieldModel : QAbstractItemModel

public:

//! Roles utilised by the model
//! Roles utilized by the model
enum FieldRoles
{
FieldNameRole, /*!< return field name if index corresponds to a field */

0 comments on commit 314842d

Please sign in to comment.