Skip to content

Commit

Permalink
flatten geometries in virtual ogr sublayers, i.e. mix 2D and 25D
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Jun 3, 2013
1 parent b383c69 commit d4945db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/providers/ogr/qgsogrfeatureiterator.cpp
Expand Up @@ -217,9 +217,8 @@ bool QgsOgrFeatureIterator::readFeature( OGRFeatureH fet, QgsFeature& feature )

feature.setGeometryAndOwnership( wkb, OGR_G_WkbSize( geom ) );
}

if (( useIntersect && ( !feature.geometry() || !feature.geometry()->intersects( mRequest.filterRect() ) ) )
|| ( geometryTypeFilter && ( !feature.geometry() || feature.geometry()->wkbType() != ( QGis::WkbType )P->mOgrGeometryTypeFilter ) ) )
|| ( geometryTypeFilter && ( !feature.geometry() || wkbFlatten(( OGRwkbGeometryType )feature.geometry()->wkbType() ) != wkbFlatten( P->mOgrGeometryTypeFilter ) ) ) )
{
OGR_F_Destroy( fet );
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -552,7 +552,7 @@ QStringList QgsOgrProvider::subLayers() const
OGRGeometryH geom = OGR_F_GetGeometryRef( fet );
if ( geom )
{
OGRwkbGeometryType gType = OGR_G_GetGeometryType( geom );
OGRwkbGeometryType gType = wkbFlatten( OGR_G_GetGeometryType( geom ) );
fCount[gType] = fCount.value( gType ) + 1;
}
OGR_F_Destroy( fet );
Expand Down

0 comments on commit d4945db

Please sign in to comment.