Skip to content
Permalink
Browse files

flatten geometries in virtual ogr sublayers, i.e. mix 2D and 25D

  • Loading branch information
blazek committed Jun 3, 2013
1 parent b383c69 commit d4945db8116f5c4c7b864332bf4eacfffea21289
Showing with 2 additions and 3 deletions.
  1. +1 −2 src/providers/ogr/qgsogrfeatureiterator.cpp
  2. +1 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -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;
@@ -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 );

0 comments on commit d4945db

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