Skip to content
Permalink
Browse files
changed geometry type return of postgres provider
git-svn-id: http://svn.osgeo.org/qgis/trunk@5421 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 5, 2006
1 parent 3298749 commit efddf4b650539cec10420aceca294cd7d8c68698
Showing with 27 additions and 6 deletions.
  1. +3 −0 src/gui/qgisapp.cpp
  2. +24 −6 src/providers/postgres/qgspostgresprovider.cpp
@@ -78,6 +78,7 @@
#include "qgslegendlayerfile.h"
#include "qgslegendlayerfile.h"
#include "qgslegendlayer.h"
#include "qgslogger.h"
#include "qgsmapcanvas.h"
#include "qgsmapoverviewcanvas.h"
#include "qgsmaprender.h"
@@ -1613,6 +1614,7 @@ bool QgisApp::addLayer(QFileInfo const & vectorFile)
mMapCanvas->freeze(); // XXX why do we do this?

// create the layer
QgsDebugMsg("completeBaseName is: " + vectorFile.completeBaseName());

QgsVectorLayer *layer = new QgsVectorLayer(vectorFile.filePath(),
vectorFile.completeBaseName(),
@@ -1732,6 +1734,7 @@ bool QgisApp::addLayer(QStringList const &theLayerQStringList, const QString& en
QFileInfo fi(*it);
QString base = fi.completeBaseName();

QgsDebugMsg("completeBaseName: "+base);

// create the layer

@@ -2497,12 +2497,30 @@ bool QgsPostgresProvider::getGeometryDetails()
if (!srid.isEmpty() && !fType.isEmpty())
{
valid = true;
if (fType == "POINT" || fType == "MULTIPOINT")
geomType = QGis::WKBPoint;
else if (fType == "LINESTRING" || fType == "MULTILINESTRING")
geomType = QGis::WKBLineString;
else if (fType == "POLYGON" || fType == "MULTIPOLYGON")
geomType = QGis::WKBPolygon;
if (fType == "POINT")
{
geomType = QGis::WKBPoint;
}
else if(fType == "MULTIPOINT")
{
geomType = QGis::WKBMultiPoint;
}
else if(fType == "LINESTRING")
{
geomType = QGis::WKBLineString;
}
else if(fType == "MULTILINESTRING")
{
geomType = QGis::WKBMultiLineString;
}
else if (fType == "POLYGON")
{
geomType = QGis::WKBPolygon;
}
else if(fType == "MULTIPOLYGON")
{
geomType = QGis::WKBMultiPolygon;
}
else
{
showMessageBox(tr("Unknown geometry type"),

0 comments on commit efddf4b

Please sign in to comment.