File tree Expand file tree Collapse file tree 5 files changed +15
-26
lines changed Expand file tree Collapse file tree 5 files changed +15
-26
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ IF (PEDANTIC)
311
311
ADD_DEFINITIONS ( /wd4100 ) # unused formal parameters
312
312
ADD_DEFINITIONS ( /wd4127 ) # constant conditional expressions (used in Qt template classes)
313
313
ADD_DEFINITIONS ( /wd4231 ) # nonstandard extension used : 'identifier' before template explicit instantiation (used in Qt template classes)
314
+ ADD_DEFINITIONS ( /wd4244 ) # conversion from '...' to '...' possible loss of data
314
315
ADD_DEFINITIONS ( /wd4251 ) # needs to have dll-interface to be used by clients of class (occurs in Qt template classes)
315
316
ADD_DEFINITIONS ( /wd4275 ) # non dll-interface class '...' used as base for dll-interface class '...'
316
317
ADD_DEFINITIONS ( /wd4505 ) # unreferenced local function has been removed (QgsRasterDataProvider::extent)
Original file line number Diff line number Diff line change @@ -440,14 +440,11 @@ class QgsGeometry
440
440
* @note python binding added in 1.6
441
441
**/
442
442
void validateGeometry( QList<QgsGeometry::Error> &errors /Out/ );
443
+
444
+ /** compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
445
+ @param geometryList a list of QgsGeometry* as input
446
+ @returns the new computed QgsGeometry, or null
447
+ */
448
+ static QgsGeometry *unaryUnion( const QList<QgsGeometry*>& geometryList ) /Factory/;
443
449
}; // class QgsGeometry
444
450
445
- /** namespace where QgsGeometry-based algorithms lie */
446
- namespace QgsGeometryAlgorithms
447
- {
448
- /** compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
449
- @param geometryList a list of QgsGeometry* as input
450
- @returns the new computed QgsGeometry, or null
451
- */
452
- QgsGeometry* unaryUnion( const QList<QgsGeometry*>& geometryList );
453
- };
Original file line number Diff line number Diff line change @@ -6397,10 +6397,7 @@ QgsGeometry* QgsGeometry::convertToPolygon( bool destMultipart )
6397
6397
}
6398
6398
}
6399
6399
6400
- namespace QgsGeometryAlgorithms
6401
- {
6402
-
6403
- QgsGeometry* unaryUnion ( const QList<QgsGeometry*>& geometryList )
6400
+ QgsGeometry *QgsGeometry::unaryUnion ( const QList<QgsGeometry*> &geometryList )
6404
6401
{
6405
6402
QList<GEOSGeometry*> geoms;
6406
6403
foreach ( QgsGeometry* g, geometryList )
@@ -6414,5 +6411,3 @@ QgsGeometry* unaryUnion( const QList<QgsGeometry*>& geometryList )
6414
6411
ret->fromGeos ( unioned );
6415
6412
return ret;
6416
6413
}
6417
-
6418
- }// QgsGeometryAlgorithms
Original file line number Diff line number Diff line change @@ -486,6 +486,12 @@ class CORE_EXPORT QgsGeometry
486
486
**/
487
487
void validateGeometry ( QList<Error> &errors );
488
488
489
+ /* * compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
490
+ @param geometryList a list of QgsGeometry* as input
491
+ @returns the new computed QgsGeometry, or null
492
+ */
493
+ static QgsGeometry *unaryUnion ( const QList<QgsGeometry*>& geometryList );
494
+
489
495
private:
490
496
// Private variables
491
497
@@ -679,14 +685,4 @@ class CORE_EXPORT QgsConstWkbPtr
679
685
inline operator const unsigned char *() const { return mP ; }
680
686
};
681
687
682
- /* * namespace where QgsGeometry-based algorithms lie */
683
- namespace QgsGeometryAlgorithms
684
- {
685
- /* * compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
686
- @param geometryList a list of QgsGeometry* as input
687
- @returns the new computed QgsGeometry, or null
688
- */
689
- QgsGeometry* unaryUnion ( const QList<QgsGeometry*>& geometryList );
690
- }
691
-
692
688
#endif
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ void QgsInvertedPolygonRenderer::stopRender( QgsRenderContext& context )
224
224
if ( mPreprocessingEnabled )
225
225
{
226
226
// compute the unary union on the polygons
227
- QScopedPointer<QgsGeometry> unioned ( QgsGeometryAlgorithms ::unaryUnion ( cit->geometries ) );
227
+ QScopedPointer<QgsGeometry> unioned ( QgsGeometry ::unaryUnion ( cit->geometries ) );
228
228
// compute the difference with the extent
229
229
QScopedPointer<QgsGeometry> rect ( QgsGeometry::fromPolygon ( mExtentPolygon ) );
230
230
QgsGeometry *final = rect->difference ( const_cast <QgsGeometry*>(unioned.data ()) );
You can’t perform that action at this time.
0 commit comments