Skip to content
Permalink
Browse files

Patch from Mathias Walker: improvement of geometry detection in offli…

…ne plugin

git-svn-id: http://svn.osgeo.org/qgis/trunk@14457 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Oct 30, 2010
1 parent 6104410 commit da26890e998c9ddf0d5a00e995075a8ebac0d560
Showing with 14 additions and 5 deletions.
  1. +14 −5 src/plugins/offline_editing/offline_editing.cpp
@@ -370,19 +370,28 @@ void QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlite3* db, con

// add geometry column
QString geomType = "";
switch ( layer->geometryType() )
switch ( layer->wkbType() )
{
case QGis::Point:
case QGis::WKBPoint:
geomType = "POINT";
break;
case QGis::Line:
case QGis::WKBMultiPoint:
geomType = "MULTIPOINT";
break;
case QGis::WKBLineString:
geomType = "LINESTRING";
break;
case QGis::Polygon:
case QGis::WKBMultiLineString:
geomType = "MULTILINESTRING";
break;
case QGis::WKBPolygon:
geomType = "POLYGON";
break;
case QGis::WKBMultiPolygon:
geomType = "MULTIPOLYGON";
break;
default:
showWarning( tr( "Unknown QGIS geometry type %1" ).arg( layer->geometryType() ) );
showWarning( tr( "QGIS wkbType %1 not supported" ).arg( layer->wkbType() ) );
break;
};
QString sqlAddGeom = QString( "SELECT AddGeometryColumn('%1', 'Geometry', %2, '%3', 2)" )

0 comments on commit da26890

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