[Qgis-developer] geomType of the postgre

Gavin Macaulay gavin at macaulay.co.nz
Fri May 5 05:45:00 EDT 2006


Marco,

I think that changing it to return the multi types will be ok.

Gavin

>
> 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
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>





More information about the Qgis-developer mailing list