Skip to content
Permalink
Browse files

Geometry Checker and Geometry Snapper plugins

  • Loading branch information
manisandro committed Sep 21, 2015
1 parent 992bacc commit e9e638f6f40baf22f4d0667a98fb8e034fefd78c
Showing with 10,419 additions and 308 deletions.
  1. +1 −0 CMakeLists.txt
  2. +16 −2 python/core/geometry/qgsabstractgeometryv2.sip
  3. +1 −1 python/core/geometry/qgscircularstringv2.sip
  4. +1 −1 python/core/geometry/qgscompoundcurvev2.sip
  5. +7 −4 python/core/geometry/qgscurvepolygonv2.sip
  6. +5 −0 python/core/geometry/qgscurvev2.sip
  7. +1 −1 python/core/geometry/qgsgeometry.sip
  8. +7 −0 python/core/geometry/qgsgeometrycollectionv2.sip
  9. +27 −26 python/core/geometry/qgsgeometryengine.sip
  10. +1 −1 python/core/geometry/qgslinestringv2.sip
  11. +1 −1 python/core/geometry/qgsmulticurvev2.sip
  12. +1 −1 python/core/geometry/qgsmultilinestringv2.sip
  13. +1 −1 python/core/geometry/qgsmultipointv2.sip
  14. +1 −1 python/core/geometry/qgsmultipolygonv2.sip
  15. +1 −1 python/core/geometry/qgsmultisurfacev2.sip
  16. +7 −1 python/core/geometry/qgspointv2.sip
  17. +1 −1 python/core/geometry/qgspolygonv2.sip
  18. +0 −1 python/core/geometry/qgssurfacev2.sip
  19. +4 −0 python/core/qgsmapsettings.sip
  20. +4 −0 python/core/qgsrectangle.sip
  21. +1 −1 python/gui/qgisinterface.sip
  22. +4 −1 src/app/qgisappinterface.cpp
  23. +1 −1 src/app/qgisappinterface.h
  24. +5 −0 src/core/CMakeLists.txt
  25. +49 −22 src/core/geometry/qgsabstractgeometryv2.cpp
  26. +63 −37 src/core/geometry/qgsabstractgeometryv2.h
  27. +1 −1 src/core/geometry/qgscircularstringv2.cpp
  28. +1 −1 src/core/geometry/qgscircularstringv2.h
  29. +1 −1 src/core/geometry/qgscompoundcurvev2.cpp
  30. +1 −1 src/core/geometry/qgscompoundcurvev2.h
  31. +13 −8 src/core/geometry/qgscurvepolygonv2.cpp
  32. +8 −4 src/core/geometry/qgscurvepolygonv2.h
  33. +8 −0 src/core/geometry/qgscurvev2.cpp
  34. +5 −0 src/core/geometry/qgscurvev2.h
  35. +1 −1 src/core/geometry/qgsgeometry.cpp
  36. +5 −4 src/core/geometry/qgsgeometry.h
  37. +2 −1 src/core/geometry/qgsgeometrycollectionv2.cpp
  38. +7 −1 src/core/geometry/qgsgeometrycollectionv2.h
  39. +30 −29 src/core/geometry/qgsgeometryengine.h
  40. +83 −0 src/core/geometry/qgsgeometryutils.cpp
  41. +51 −0 src/core/geometry/qgsgeometryutils.h
  42. +161 −100 src/core/geometry/qgsgeos.cpp
  43. +38 −32 src/core/geometry/qgsgeos.h
  44. +1 −1 src/core/geometry/qgslinestringv2.cpp
  45. +1 −1 src/core/geometry/qgslinestringv2.h
  46. +1 −1 src/core/geometry/qgsmulticurvev2.cpp
  47. +1 −1 src/core/geometry/qgsmulticurvev2.h
  48. +1 −1 src/core/geometry/qgsmultilinestringv2.cpp
  49. +1 −1 src/core/geometry/qgsmultilinestringv2.h
  50. +1 −1 src/core/geometry/qgsmultipointv2.cpp
  51. +1 −1 src/core/geometry/qgsmultipointv2.h
  52. +1 −1 src/core/geometry/qgsmultipolygonv2.cpp
  53. +1 −1 src/core/geometry/qgsmultipolygonv2.h
  54. +1 −1 src/core/geometry/qgsmultisurfacev2.cpp
  55. +1 −1 src/core/geometry/qgsmultisurfacev2.h
  56. +6 −1 src/core/geometry/qgspointv2.cpp
  57. +7 −1 src/core/geometry/qgspointv2.h
  58. +1 −1 src/core/geometry/qgspolygonv2.cpp
  59. +1 −1 src/core/geometry/qgspolygonv2.h
  60. +0 −1 src/core/geometry/qgssurfacev2.h
  61. +61 −0 src/core/geosextra/geos_c_extra.cpp
  62. +40 −0 src/core/geosextra/geos_c_extra.h
  63. +61 −0 src/core/geosextra/geos_extra/geos_c_extra.cpp
  64. +40 −0 src/core/geosextra/geos_extra/geos_c_extra.h
  65. +13 −0 src/core/qgsmapsettings.cpp
  66. +4 −0 src/core/qgsmapsettings.h
  67. +20 −0 src/core/qgsrectangle.cpp
  68. +4 −0 src/core/qgsrectangle.h
  69. +1 −1 src/gui/qgisinterface.h
  70. +2 −0 src/plugins/CMakeLists.txt
  71. +106 −0 src/plugins/geometry_checker/CMakeLists.txt
  72. +132 −0 src/plugins/geometry_checker/checks/qgsgeometryanglecheck.cpp
  73. +30 −0 src/plugins/geometry_checker/checks/qgsgeometryanglecheck.h
  74. +216 −0 src/plugins/geometry_checker/checks/qgsgeometryareacheck.cpp
  75. +37 −0 src/plugins/geometry_checker/checks/qgsgeometryareacheck.h
  76. +208 −0 src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp
  77. +153 −0 src/plugins/geometry_checker/checks/qgsgeometrycheck.h
  78. +100 −0 src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.cpp
  79. +52 −0 src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.h
  80. +81 −0 src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.cpp
  81. +30 −0 src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.h
  82. +111 −0 src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.cpp
  83. +62 −0 src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.h
  84. +105 −0 src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.cpp
  85. +30 −0 src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.h
  86. +209 −0 src/plugins/geometry_checker/checks/qgsgeometrygapcheck.cpp
  87. +96 −0 src/plugins/geometry_checker/checks/qgsgeometrygapcheck.h
  88. +73 −0 src/plugins/geometry_checker/checks/qgsgeometryholecheck.cpp
  89. +29 −0 src/plugins/geometry_checker/checks/qgsgeometryholecheck.h
  90. +80 −0 src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.cpp
  91. +29 −0 src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.h
  92. +192 −0 src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.cpp
  93. +63 −0 src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.h
  94. +95 −0 src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.cpp
  95. +30 −0 src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.h
  96. +315 −0 src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp
  97. +54 −0 src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.h
  98. +41 −0 src/plugins/geometry_checker/checks/qgsgeometrysliverpolygoncheck.h
  99. +154 −0 src/plugins/geometry_checker/checks/qgsgeometrytypecheck.cpp
  100. +54 −0 src/plugins/geometry_checker/checks/qgsgeometrytypecheck.h
  101. BIN src/plugins/geometry_checker/icons/geometrychecker.png
  102. +115 −0 src/plugins/geometry_checker/icons/geometrychecker.svg
  103. BIN src/plugins/geometry_checker/icons/tooltip.png
  104. +6 −0 src/plugins/geometry_checker/pluginres.qrc
  105. +252 −0 src/plugins/geometry_checker/qgsgeometrychecker.cpp
  106. +76 −0 src/plugins/geometry_checker/qgsgeometrychecker.h
  107. +43 −0 src/plugins/geometry_checker/qgsgeometrycheckerplugin.cpp
  108. +113 −0 src/plugins/geometry_checker/qgsgeometrycheckerplugin.h
  109. +475 −0 src/plugins/geometry_checker/qgsgeometrycheckfactory.cpp
  110. +71 −0 src/plugins/geometry_checker/qgsgeometrycheckfactory.h
  111. +87 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckerdialog.cpp
  112. +48 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckerdialog.h
  113. +131 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckerfixsummarydialog.cpp
  114. +61 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckerfixsummarydialog.h
  115. +329 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckerfixsummarydialog.ui
  116. +592 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.cpp
  117. +77 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.h
  118. +392 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui
  119. +322 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckersetuptab.cpp
  120. +58 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckersetuptab.h
  121. +703 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckersetuptab.ui
  122. +184 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckfixdialog.cpp
  123. +61 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckfixdialog.h
  124. +127 −0 src/plugins/geometry_checker/utils/qgsfeaturepool.cpp
  125. +66 −0 src/plugins/geometry_checker/utils/qgsfeaturepool.h
  126. +112 −0 src/plugins/geometry_checker/utils/qgsgeomutils.cpp
  127. +68 −0 src/plugins/geometry_checker/utils/qgsgeomutils.h
  128. +63 −0 src/plugins/geometry_snapper/CMakeLists.txt
  129. BIN src/plugins/geometry_snapper/icons/geometrysnapper.png
  130. +257 −0 src/plugins/geometry_snapper/icons/geometrysnapper.svg
  131. +5 −0 src/plugins/geometry_snapper/pluginres.qrc
  132. +250 −0 src/plugins/geometry_snapper/qgsgeometrysnapper.cpp
  133. +65 −0 src/plugins/geometry_snapper/qgsgeometrysnapper.h
  134. +309 −0 src/plugins/geometry_snapper/qgsgeometrysnapperdialog.cpp
  135. +53 −0 src/plugins/geometry_snapper/qgsgeometrysnapperdialog.h
  136. +41 −0 src/plugins/geometry_snapper/qgsgeometrysnapperplugin.cpp
  137. +112 −0 src/plugins/geometry_snapper/qgsgeometrysnapperplugin.h
  138. +423 −0 src/plugins/geometry_snapper/qgssnapindex.cpp
  139. +106 −0 src/plugins/geometry_snapper/qgssnapindex.h
  140. +299 −0 src/plugins/geometry_snapper/ui/qgsgeometrysnapperdialog.ui
@@ -191,6 +191,7 @@ ENDIF(NOT WIN32 AND NOT ANDROID)
# required
FIND_PACKAGE(Proj)
FIND_PACKAGE(GEOS)
SET(GEOS_CPP_LIBRARY -lgeos CACHE STRING "Path to the geos CPP library")
FIND_PACKAGE(GDAL)
FIND_PACKAGE(Expat REQUIRED)
FIND_PACKAGE(Spatialindex REQUIRED)
@@ -11,9 +11,16 @@ struct QgsVertexId
};

QgsVertexId();
QgsVertexId( int _part, int _ring, int _vertex, VertexType _type );
QgsVertexId( int _part, int _ring, int _vertex, VertexType _type);

bool isValid() const;
bool operator==( const QgsVertexId& other ) const;
bool operator!=( const QgsVertexId& other ) const;
bool partEqual( const QgsVertexId& o ) const;
bool ringEqual( const QgsVertexId& o ) const;
bool vertexEqual( const QgsVertexId& o ) const;
bool isValid(const QgsAbstractGeometryV2* geom) const;

int part;
int ring;
int vertex;
@@ -101,7 +108,7 @@ class QgsAbstractGeometryV2

virtual void coordinateSequence( QList< QList< QList< QgsPointV2 > > >& coord /Out/ ) const = 0;
int nCoordinates() const;
QgsPointV2 vertexAt( const QgsVertexId& id ) const;
virtual QgsPointV2 vertexAt( const QgsVertexId& id ) const = 0;
virtual double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const = 0;

//low-level editing
@@ -113,11 +120,18 @@ class QgsAbstractGeometryV2
virtual double length() const;
virtual double area() const;

/** Returns the centroid of the geometry*/
virtual QgsPointV2 centroid() const;

virtual bool hasCurvedSegments() const;
/** Returns a geometry without curves. Caller takes ownership*/
virtual QgsAbstractGeometryV2* segmentize() const /Factory/;

/** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments.
@return rotation in radians, clockwise from north*/
virtual double vertexAngle( const QgsVertexId& vertex ) const = 0;

virtual int vertexCount(int part = 0, int ring = 0) const = 0;
virtual int ringCount(int part = 0) const = 0;
virtual int partCount() const = 0;
};
@@ -10,7 +10,7 @@ class QgsCircularStringV2: public QgsCurveV2

virtual QString geometryType() const;
virtual int dimension() const;
virtual QgsAbstractGeometryV2* clone() const;
virtual QgsCircularStringV2* clone() const;
virtual void clear();

virtual QgsRectangle calculateBoundingBox() const;
@@ -12,7 +12,7 @@ class QgsCompoundCurveV2: public QgsCurveV2

virtual QString geometryType() const;
virtual int dimension() const;
virtual QgsAbstractGeometryV2* clone() const;
virtual QgsCompoundCurveV2* clone() const;
virtual void clear();

virtual QgsRectangle calculateBoundingBox() const;
@@ -12,7 +12,7 @@ class QgsCurvePolygonV2: public QgsSurfaceV2

virtual QString geometryType() const;
virtual int dimension() const;
virtual QgsAbstractGeometryV2* clone() const;
virtual QgsCurvePolygonV2* clone() const;
void clear();


@@ -30,14 +30,13 @@ class QgsCurvePolygonV2: public QgsSurfaceV2
//surface interface
virtual double area() const;
virtual double length() const;
QgsPointV2 centroid() const;
QgsPointV2 pointOnSurface() const;
QgsPolygonV2* surfaceToPolygon() const;

//curve polygon interface
int numInteriorRings() const;
const QgsCurveV2* exteriorRing() const;
const QgsCurveV2* interiorRing( int i ) const;
QgsCurveV2* exteriorRing() const;
QgsCurveV2* interiorRing( int i ) const;
virtual QgsPolygonV2* toPolygon() const;

/** Sets exterior ring (takes ownership)*/
@@ -67,4 +66,8 @@ class QgsCurvePolygonV2: public QgsSurfaceV2
@param vertex the vertex id
@return rotation in radians, clockwise from north*/
double vertexAngle( const QgsVertexId& vertex ) const;

virtual int vertexCount(int part = 0, int ring = 0) const;
virtual int ringCount(int part = 0) const;
virtual int partCount() const;
};
@@ -26,4 +26,9 @@ class QgsCurveV2: public QgsAbstractGeometryV2

/** Returns a geometry without curves. Caller takes ownership*/
QgsAbstractGeometryV2* segmentize() const /Factory/;

virtual int vertexCount(int part = 0, int ring = 0) const;
virtual int ringCount(int part = 0) const;
virtual int partCount() const;
virtual QgsPointV2 vertexAt( const QgsVertexId& id ) const;
};
@@ -56,7 +56,7 @@ class QgsGeometry
* @note added in QGIS 2.10
* @see setGeometry
*/
const QgsAbstractGeometryV2* geometry() const;
QgsAbstractGeometryV2* geometry() const;

/** Sets the underlying geometry store. Ownership of geometry is transferred.
* @note added in QGIS 2.10
@@ -10,6 +10,8 @@ class QgsGeometryCollectionV2: public QgsAbstractGeometryV2
//QgsGeometryCollectionV2& operator=( const QgsGeometryCollectionV2& c );
virtual ~QgsGeometryCollectionV2();

virtual QgsGeometryCollectionV2* clone() const;

int numGeometries() const;
//const QgsAbstractGeometryV2* geometryN( int n ) const;
QgsAbstractGeometryV2* geometryN( int n );
@@ -63,4 +65,9 @@ class QgsGeometryCollectionV2: public QgsAbstractGeometryV2
@param vertex the vertex id
@return rotation in radians, clockwise from north*/
double vertexAngle( const QgsVertexId& vertex ) const;

virtual int vertexCount(int part = 0, int ring = 0) const;
virtual int ringCount(int part = 0) const;
virtual int partCount() const;
virtual QgsPointV2 vertexAt( const QgsVertexId& id ) const;
};
@@ -11,31 +11,32 @@ class QgsGeometryEngine
virtual void geometryChanged() = 0;
virtual void prepareGeometry() = 0;

virtual QgsAbstractGeometryV2* intersection( const QgsAbstractGeometryV2& geom ) const = 0;
virtual QgsAbstractGeometryV2* difference( const QgsAbstractGeometryV2& geom ) const = 0;
virtual QgsAbstractGeometryV2* combine( const QgsAbstractGeometryV2& geom ) const = 0;
virtual QgsAbstractGeometryV2* combine( const QList< const QgsAbstractGeometryV2* > ) const = 0;
virtual QgsAbstractGeometryV2* symDifference( const QgsAbstractGeometryV2& geom ) const = 0;
virtual QgsAbstractGeometryV2* buffer( double distance, int segments ) const = 0;
virtual QgsAbstractGeometryV2* buffer( double distance, int segments, int endCapStyle, int joinStyle, double mitreLimit ) const = 0;
virtual QgsAbstractGeometryV2* simplify( double tolerance ) const = 0;
virtual QgsAbstractGeometryV2* interpolate( double distance ) const = 0;
virtual bool centroid( QgsPointV2& pt ) const = 0;
virtual bool pointOnSurface( QgsPointV2& pt ) const = 0;
virtual QgsAbstractGeometryV2* convexHull() const = 0;
virtual double distance( const QgsAbstractGeometryV2& geom ) const = 0;
virtual bool intersects( const QgsAbstractGeometryV2& geom ) const = 0;
virtual bool touches( const QgsAbstractGeometryV2& geom ) const = 0;
virtual bool crosses( const QgsAbstractGeometryV2& geom ) const = 0;
virtual bool within( const QgsAbstractGeometryV2& geom ) const = 0;
virtual bool overlaps( const QgsAbstractGeometryV2& geom ) const = 0;
virtual bool contains( const QgsAbstractGeometryV2& geom ) const = 0;
virtual bool disjoint( const QgsAbstractGeometryV2& geom ) const = 0;
virtual double area() const = 0;
virtual double length() const = 0;
virtual bool isValid() const = 0;
virtual bool isEqual( const QgsAbstractGeometryV2& geom ) const = 0;
virtual bool isEmpty() const = 0;
virtual QgsAbstractGeometryV2* intersection( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* difference( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* combine( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* combine( const QList< const QgsAbstractGeometryV2* >, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* symDifference( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* buffer( double distance, int segments, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* buffer( double distance, int segments, int endCapStyle, int joinStyle, double mitreLimit, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* simplify( double tolerance, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* interpolate( double distance, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* envelope( QString* errorMsg = 0 ) const = 0;
virtual bool centroid( QgsPointV2& pt, QString* errorMsg = 0 ) const = 0;
virtual bool pointOnSurface( QgsPointV2& pt, QString* errorMsg = 0 ) const = 0;
virtual QgsAbstractGeometryV2* convexHull( QString* errorMsg = 0 ) const = 0;
virtual double distance( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual bool intersects( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual bool touches( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual bool crosses( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual bool within( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual bool overlaps( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual bool contains( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual bool disjoint( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual double area( QString* errorMsg = 0 ) const = 0;
virtual double length( QString* errorMsg = 0 ) const = 0;
virtual bool isValid( QString* errorMsg = 0 ) const = 0;
virtual bool isEqual( const QgsAbstractGeometryV2& geom, QString* errorMsg = 0 ) const = 0;
virtual bool isEmpty( QString* errorMsg = 0 ) const = 0;

virtual QgsAbstractGeometryV2* offsetCurve( double distance, int segments, int joinStyle, double mitreLimit ) const = 0;
virtual QgsAbstractGeometryV2* offsetCurve( double distance, int segments, int joinStyle, double mitreLimit, QString* errorMsg = 0 ) const = 0;
};
@@ -10,7 +10,7 @@ class QgsLineStringV2: public QgsCurveV2

virtual QString geometryType() const;
virtual int dimension() const;
virtual QgsAbstractGeometryV2* clone() const;
virtual QgsLineStringV2* clone() const;
virtual void clear();

virtual bool fromWkb( const unsigned char* wkb );
@@ -6,7 +6,7 @@ class QgsMultiCurveV2: public QgsGeometryCollectionV2

public:
virtual QString geometryType() const;
QgsAbstractGeometryV2* clone() const;
virtual QgsMultiCurveV2* clone() const;

bool fromWkt( const QString& wkt );

@@ -6,7 +6,7 @@ class QgsMultiLineStringV2: public QgsMultiCurveV2

public:
virtual QString geometryType() const;
QgsAbstractGeometryV2* clone() const;
virtual QgsMultiLineStringV2* clone() const;

bool fromWkt( const QString& wkt );

@@ -5,7 +5,7 @@ class QgsMultiPointV2: public QgsGeometryCollectionV2
%End
public:
virtual QString geometryType() const;
QgsAbstractGeometryV2* clone() const;
virtual QgsMultiPointV2* clone() const;

bool fromWkt( const QString& wkt );

@@ -5,7 +5,7 @@ class QgsMultiPolygonV2: public QgsMultiSurfaceV2
%End
public:
virtual QString geometryType() const;
QgsAbstractGeometryV2* clone() const;
virtual QgsMultiPolygonV2* clone() const;

bool fromWkt( const QString& wkt );

@@ -5,7 +5,7 @@ class QgsMultiSurfaceV2: public QgsGeometryCollectionV2
%End
public:
virtual QString geometryType() const;
QgsAbstractGeometryV2* clone() const;
virtual QgsMultiSurfaceV2* clone() const;

bool fromWkt( const QString& wkt );

@@ -6,12 +6,13 @@ class QgsPointV2: public QgsAbstractGeometryV2

public:
QgsPointV2( double x = 0.0, double y = 0.0 );
QgsPointV2( const QgsPoint& p );
QgsPointV2( QgsWKBTypes::Type type, double x = 0.0, double y = 0.0, double z = 0.0, double m = 0.0 );

bool operator==( const QgsPointV2& pt ) const;
bool operator!=( const QgsPointV2& pt ) const;

virtual QgsAbstractGeometryV2* clone() const;
virtual QgsPointV2* clone() const;
void clear();

double x() const;
@@ -60,4 +61,9 @@ class QgsPointV2: public QgsAbstractGeometryV2
@param vertex the vertex id
@return 0.0*/
double vertexAngle( const QgsVertexId& vertex ) const;

virtual int vertexCount(int part = 0, int ring = 0) const;
virtual int ringCount(int part = 0) const;
virtual int partCount() const;
virtual QgsPointV2 vertexAt( const QgsVertexId& id ) const;
};
@@ -6,7 +6,7 @@ class QgsPolygonV2: public QgsCurvePolygonV2

public:
virtual QString geometryType() const;
virtual QgsAbstractGeometryV2* clone() const;
virtual QgsPolygonV2* clone() const;

virtual bool fromWkb( const unsigned char* wkb );
// inherited: bool fromWkt( const QString &wkt );
@@ -5,7 +5,6 @@ class QgsSurfaceV2: public QgsAbstractGeometryV2
%End

public:
virtual QgsPointV2 centroid() const = 0;
virtual QgsPointV2 pointOnSurface() const = 0;
virtual QgsPolygonV2* surfaceToPolygon() const = 0;
};
@@ -139,6 +139,10 @@ class QgsMapSettings

const QgsMapToPixel& mapToPixel() const;

//! computes an *estimated* conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits
//! @param referenceExtent A reference extent based on which to perform the computation. If not specified, the layer extent is used
double layerToMapUnits( QgsMapLayer* theLayer, const QgsRectangle& referenceExtent = QgsRectangle() ) const;

/**
* @brief transform bounding box from layer's CRS to output CRS
* @see layerToMapCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ) if you want to transform a rectangle
@@ -58,6 +58,10 @@ class QgsRectangle
//! Scale the rectangle around its center point
void scale( double scaleFactor, const QgsPoint *c = 0 );
void scale( double scaleFactor, double centerX, double centerY );
//! Grow the rectangle by the specified amount
void grow( double delta );
/** Updates the rectangle to include the specified point */
void include( const QgsPoint& p );
/** Get rectangle enlarged by buffer.
* @note added in 2.1 */
QgsRectangle buffer( double width );
@@ -252,7 +252,7 @@ class QgisInterface : QObject
virtual void showLayerProperties( QgsMapLayer *l ) = 0;

/** Open attribute table dialog */
virtual void showAttributeTable( QgsVectorLayer *l ) = 0;
virtual QDialog* showAttributeTable( QgsVectorLayer *l, const QString& filterExpression = QString() ) = 0;

/** Add window to Window menu. The action title is the window title
* and the action should raise, unminimize and activate the window. */
@@ -429,13 +429,16 @@ void QgisAppInterface::showLayerProperties( QgsMapLayer *l )
}
}

void QgisAppInterface::showAttributeTable( QgsVectorLayer *l )
QDialog* QgisAppInterface::showAttributeTable( QgsVectorLayer *l, const QString& filterExpression )
{
if ( l )
{
QgsAttributeTableDialog *dialog = new QgsAttributeTableDialog( l );
dialog->setFilterExpression( filterExpression );
dialog->show();
return dialog;
}
return 0;
}

void QgisAppInterface::addWindow( QAction *action )
@@ -267,7 +267,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
/** Show layer attribute dialog for layer
* @param l layer to show attribute table for
*/
virtual void showAttributeTable( QgsVectorLayer *l ) override;
virtual QDialog* showAttributeTable( QgsVectorLayer *l, const QString& filterExpression = QString() ) override;

/** Add window to Window menu. The action title is the window title
* and the action should raise, unminimize and activate the window. */
@@ -3,6 +3,8 @@

SET(QGIS_CORE_SRCS

geosextra/geos_c_extra.cpp

gps/qgsgpsconnection.cpp
gps/qgsgpsconnectionregistry.cpp
gps/qgsnmeaconnection.cpp
@@ -521,6 +523,8 @@ SET(QGIS_CORE_HDRS
${CMAKE_BINARY_DIR}/qgsconfig.h
../plugins/qgisplugin.h

geosextra/geos_c_extra.h

qgis.h
qgsattributeaction.h
qgscachedfeatureiterator.h
@@ -845,6 +849,7 @@ TARGET_LINK_LIBRARIES(qgis_core

${PROJ_LIBRARY}
${GEOS_LIBRARY}
${GEOS_CPP_LIBRARY}
${GDAL_LIBRARY}
${SPATIALINDEX_LIBRARY}
${EXPAT_LIBRARY}

0 comments on commit e9e638f

Please sign in to comment.
You can’t perform that action at this time.