Skip to content
Permalink
Browse files

single geometry xyz

  • Loading branch information
m-kuhn committed Sep 17, 2018
1 parent 2f5c7a3 commit d7597f9307061f9b323099f8d684cddd485cb6ec
@@ -103,5 +103,10 @@ bool QgsGeometryCheckErrorSingle::handleChanges( const QgsGeometryCheck::Changes

void QgsSingleGeometryCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &messages, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
{

QMap<QString, QgsFeatureIds> featureIds = ids.isEmpty() ? allLayerFeatureIds() : ids;
QgsGeometryCheckerUtils::LayerFeatures layerFeatures( mContext->featurePools, featureIds, mCompatibleGeometryTypes, progressCounter, mContext );
for ( const QgsGeometryCheckerUtils::LayerFeature &layerFeature : layerFeatures )
{
errors.append( processGeometry( layerFeature.geometry() ) );
}
}
@@ -24,7 +24,8 @@ email : matthias@opengis.ch
QgsGeometryValidationService::QgsGeometryValidationService( QgsProject *project )
{
connect( project, &QgsProject::layersAdded, this, &QgsGeometryValidationService::onLayersAdded );
mIsValidGeometryCheck = new QgsIsValidGeometryCheck();
// TODO: should not provide a nullptr context
mIsValidGeometryCheck = new QgsIsValidGeometryCheck( nullptr );
}

QgsGeometryValidationService::~QgsGeometryValidationService()
@@ -88,6 +89,6 @@ void QgsGeometryValidationService::processFeature( QgsVectorLayer *layer, QgsFea

QgsFeature feature = layer->getFeature( fid );
// TODO: this is a bit hardcore
const auto errors = mIsValidGeometryCheck->processGeometry( QgsGeometryCheckerUtils::LayerFeature( nullptr, feature ) );
emit geometryCheckCompleted( layer, fid, errors );
const auto errors = mIsValidGeometryCheck->processGeometry( feature.geometry() );
// emit geometryCheckCompleted( layer, fid, errors );
}

0 comments on commit d7597f9

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