Skip to content

Commit e9e638f

Browse files
committedSep 21, 2015
Geometry Checker and Geometry Snapper plugins
1 parent 992bacc commit e9e638f

File tree

140 files changed

+10419
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+10419
-308
lines changed
 

‎CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ ENDIF(NOT WIN32 AND NOT ANDROID)
191191
# required
192192
FIND_PACKAGE(Proj)
193193
FIND_PACKAGE(GEOS)
194+
SET(GEOS_CPP_LIBRARY -lgeos CACHE STRING "Path to the geos CPP library")
194195
FIND_PACKAGE(GDAL)
195196
FIND_PACKAGE(Expat REQUIRED)
196197
FIND_PACKAGE(Spatialindex REQUIRED)

‎python/core/geometry/qgsabstractgeometryv2.sip

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ struct QgsVertexId
1111
};
1212

1313
QgsVertexId();
14-
QgsVertexId( int _part, int _ring, int _vertex, VertexType _type );
14+
QgsVertexId( int _part, int _ring, int _vertex, VertexType _type);
1515

1616
bool isValid() const;
17+
bool operator==( const QgsVertexId& other ) const;
18+
bool operator!=( const QgsVertexId& other ) const;
19+
bool partEqual( const QgsVertexId& o ) const;
20+
bool ringEqual( const QgsVertexId& o ) const;
21+
bool vertexEqual( const QgsVertexId& o ) const;
22+
bool isValid(const QgsAbstractGeometryV2* geom) const;
23+
1724
int part;
1825
int ring;
1926
int vertex;
@@ -101,7 +108,7 @@ class QgsAbstractGeometryV2
101108

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

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

123+
/** Returns the centroid of the geometry*/
124+
virtual QgsPointV2 centroid() const;
125+
116126
virtual bool hasCurvedSegments() const;
117127
/** Returns a geometry without curves. Caller takes ownership*/
118128
virtual QgsAbstractGeometryV2* segmentize() const /Factory/;
119129

120130
/** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments.
121131
@return rotation in radians, clockwise from north*/
122132
virtual double vertexAngle( const QgsVertexId& vertex ) const = 0;
133+
134+
virtual int vertexCount(int part = 0, int ring = 0) const = 0;
135+
virtual int ringCount(int part = 0) const = 0;
136+
virtual int partCount() const = 0;
123137
};

0 commit comments

Comments
 (0)
Please sign in to comment.