@@ -82,10 +82,10 @@ class QgsGeometry
82
82
/**
83
83
* Returns the size of the WKB in asWkb().
84
84
*/
85
- size_t wkbSize();
85
+ size_t wkbSize() const ;
86
86
87
87
/** Returns type of wkb (point / linestring / polygon etc.) */
88
- QGis::WkbType wkbType();
88
+ QGis::WkbType wkbType() const ;
89
89
90
90
/** Returns type of the vector */
91
91
QGis::GeometryType type();
@@ -253,41 +253,41 @@ class QgsGeometry
253
253
QgsRectangle boundingBox();
254
254
255
255
/** Test for intersection with a rectangle (uses GEOS) */
256
- bool intersects( const QgsRectangle& r );
256
+ bool intersects( const QgsRectangle& r ) const ;
257
257
258
258
/** Test for intersection with a geometry (uses GEOS) */
259
- bool intersects( QgsGeometry* geometry );
259
+ bool intersects( const QgsGeometry* geometry ) const ;
260
260
261
261
/** Test for containment of a point (uses GEOS) */
262
- bool contains( QgsPoint* p );
262
+ bool contains( const QgsPoint* p ) const ;
263
263
264
264
/** Test for if geometry is contained in an other (uses GEOS)
265
265
* @note added in 1.5 */
266
- bool contains( QgsGeometry* geometry );
266
+ bool contains( const QgsGeometry* geometry ) const ;
267
267
268
268
/** Test for if geometry is disjoint of an other (uses GEOS)
269
269
* @note added in 1.5 */
270
- bool disjoint( QgsGeometry* geometry );
270
+ bool disjoint( const QgsGeometry* geometry ) const ;
271
271
272
272
/** Test for if geometry equals an other (uses GEOS)
273
273
* @note added in 1.5 */
274
- bool equals( QgsGeometry* geometry );
274
+ bool equals( const QgsGeometry* geometry ) const ;
275
275
276
276
/** Test for if geometry touch an other (uses GEOS)
277
277
* @note added in 1.5 */
278
- bool touches( QgsGeometry* geometry );
278
+ bool touches( const QgsGeometry* geometry ) const ;
279
279
280
280
/** Test for if geometry overlaps an other (uses GEOS)
281
281
* @note added in 1.5 */
282
- bool overlaps( QgsGeometry* geometry );
282
+ bool overlaps( const QgsGeometry* geometry ) const ;
283
283
284
284
/** Test for if geometry is within an other (uses GEOS)
285
285
* @note added in 1.5 */
286
- bool within( QgsGeometry* geometry );
286
+ bool within( const QgsGeometry* geometry ) const ;
287
287
288
288
/** Test for if geometry crosses an other (uses GEOS)
289
289
* @note added in 1.5 */
290
- bool crosses( QgsGeometry* geometry );
290
+ bool crosses( const QgsGeometry* geometry ) const ;
291
291
292
292
/** Returns a buffer region around this geometry having the given width and with a specified number
293
293
of segments used to approximate curves */
@@ -326,44 +326,44 @@ class QgsGeometry
326
326
/** Exports the geometry to mWkt
327
327
* @return true in case of success and false else
328
328
*/
329
- QString exportToWkt();
329
+ QString exportToWkt() const ;
330
330
331
331
/** Exports the geometry to mGeoJSON
332
332
* @return true in case of success and false else
333
333
* @note added in 1.8
334
334
* @note python binding added in 1.9
335
335
*/
336
- QString exportToGeoJSON();
336
+ QString exportToGeoJSON() const ;
337
337
338
338
/* Accessor functions for getting geometry data */
339
339
340
340
/** return contents of the geometry as a point
341
341
if wkbType is WKBPoint, otherwise returns [0,0] */
342
- QgsPoint asPoint();
342
+ QgsPoint asPoint() const ;
343
343
344
344
/** return contents of the geometry as a polyline
345
345
if wkbType is WKBLineString, otherwise an empty list */
346
- QgsPolyline asPolyline();
346
+ QgsPolyline asPolyline() const ;
347
347
348
348
/** return contents of the geometry as a polygon
349
349
if wkbType is WKBPolygon, otherwise an empty list */
350
- QgsPolygon asPolygon();
350
+ QgsPolygon asPolygon() const ;
351
351
352
352
/** return contents of the geometry as a multi point
353
353
if wkbType is WKBMultiPoint, otherwise an empty list */
354
- QgsMultiPoint asMultiPoint();
354
+ QgsMultiPoint asMultiPoint() const ;
355
355
356
356
/** return contents of the geometry as a multi linestring
357
357
if wkbType is WKBMultiLineString, otherwise an empty list */
358
- QgsMultiPolyline asMultiPolyline();
358
+ QgsMultiPolyline asMultiPolyline() const ;
359
359
360
360
/** return contents of the geometry as a multi polygon
361
361
if wkbType is WKBMultiPolygon, otherwise an empty list */
362
- QgsMultiPolygon asMultiPolygon();
362
+ QgsMultiPolygon asMultiPolygon() const ;
363
363
364
364
/** return contents of the geometry as a list of geometries
365
365
@note added in version 1.1 */
366
- QList<QgsGeometry*> asGeometryCollection() /Factory/;
366
+ QList<QgsGeometry*> asGeometryCollection() const /Factory/;
367
367
368
368
/** delete a ring in polygon or multipolygon.
369
369
Ring 0 is outer ring and can't be deleted.
0 commit comments