Skip to content
Permalink
Browse files
fix spit plugin
git-svn-id: http://svn.osgeo.org/qgis/trunk@9168 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 25, 2008
1 parent cbf8dbd commit c05bfb54ff692e62c8cd985bf17bb1c0a427d69c
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/plugins/spit/qgsshapefile.cpp
@@ -18,6 +18,7 @@

#include <QApplication>
#include <ogr_api.h>
#include <cpl_conv.h>
#include <string>
#include <fstream>
#include <cstdio>
@@ -406,14 +407,14 @@ bool QgsShapeFile::insertLayer( QString dbname, QString schema, QString primary_
.arg( QgsPgUtil::quotedIdentifier( table_name ) )
.arg( m );

int num = OGR_G_WkbSize( geom );
char * geo_temp = new char[num*3];
char *geo_temp;
// 'GeometryFromText' supports only 2D coordinates
// TODO for proper 2.5D support we would need to use 'GeomFromEWKT'
if ( hasMoreDimensions )
OGR_G_SetCoordinateDimension( geom, 2 );
OGR_G_ExportToWkt( geom, &geo_temp );
QString geometry( geo_temp );
CPLFree(geo_temp);

for ( uint n = 0; n < column_types.size(); n++ )
{
@@ -462,7 +463,6 @@ bool QgsShapeFile::insertLayer( QString dbname, QString schema, QString primary_

pro.setValue( pro.value() + 1 );
qApp->processEvents();
delete[] geo_temp;
}
OGR_F_Destroy( feat );
}

0 comments on commit c05bfb5

Please sign in to comment.