[Qgis-developer] geomType of the postgre
humarco
marco.hugentobler at karto.baug.ethz.ch
Fri May 5 05:23:08 EDT 2006
Dear qgis devs,
I'm trying to make qgis editing possible for multilines (and later also for
multilines). For this, i need to know the wkbtype of a layer, which can be
done with QgsVectorDataProvider::geometryType(). The postgres provider
returns QgsPostgresProvider::geomType which is set in the following code
sequence (qgspostgresprovider.cpp:2500):
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;
The effect is that i receive QGis::WKBLineString also for multiline layers.
Was there a particular reason for this behaviour or is it ok if i change it to
return the real WKB type?
cheers,
Marco
More information about the Qgis-developer
mailing list