Skip to content
Permalink
Browse files

Feature #8725: Minor improvement

  • Loading branch information
ahuarte47 committed Oct 24, 2013
1 parent 81afd87 commit b745c3d83df60a24654b9c8465402ba95458ee74
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/providers/ogr/qgsogrfeatureiterator.cpp
@@ -236,10 +236,12 @@ bool QgsOgrFeatureIterator::readFeature( OGRFeatureH fet, QgsFeature& feature )
notifyReadedFeature( fet, geom, feature );

// get the wkb representation
unsigned char *wkb = new unsigned char[OGR_G_WkbSize( geom )];
int memorySize = OGR_G_WkbSize( geom );
unsigned char *wkb = new unsigned char[memorySize];
OGR_G_ExportToWkb( geom, ( OGRwkbByteOrder ) QgsApplication::endian(), wkb );

feature.setGeometryAndOwnership( wkb, OGR_G_WkbSize( geom ) );
QgsGeometry* geometry = feature.geometry();
if ( !geometry ) feature.setGeometryAndOwnership( wkb, memorySize ); else geometry->fromWkb( wkb, memorySize );

notifyLoadedFeature( fet, feature );
}

0 comments on commit b745c3d

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