Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
single geometry xyz
  • Loading branch information
m-kuhn committed Oct 15, 2018
1 parent 2f5c7a3 commit d7597f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Expand Up @@ -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() ) );
}
}
7 changes: 4 additions & 3 deletions src/app/qgsgeometryvalidationservice.cpp
Expand Up @@ -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()
Expand Down Expand Up @@ -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.