AW: Re: [Qgis-developer] provider.getNextFeature(fet) with PostGIS

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Wed Feb 13 07:00:12 EST 2008


And what were the arguments you provided for the select() call of the 
provider? 

Marco 

Am Mittwoch 13 Februar 2008 12:52:34 schrieb Düster Horst:
> Code and corresponding outputs with respect to an example postgis layer:
>
>
> ...
>     print "N-Features: "+str(provider.featureCount())
> # Output: "N-Features: 4 "
>
>     provider.getNextFeature(feat)
>     attrib = feat.attributeMap()
>     geom = feat.geometry()
>
>     print "Geomtry: "+geom.exportToWkt()
> # Error message: AttributeError: 'NoneType' object has no attribute
> 'exportToWkt'
>     print "AttributeMap: "+str(attrib)
> # Output: "AttributeMap: {}"
> ...
>
> The number of features is correct but no geometry and no attributeMap
>
> Regards
> Horst
> ------------------------------------------------
>
> Dr. Horst Düster
> GIS-Koordinator, Stv. Amtschef
>
> Kanton Solothurn
> Bau- und Justizdepartement
> Amt für Geoinformation
> SO!GIS Koordination
> Rötistrasse 4
> CH-4501 Solothurn
>
> Telefon ++41(0)32 627 25 32
> Telefax ++41(0)32 627 22 14
>
> mailto:horst.duester at bd.so.ch
> http://www.agi.so.ch
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Marco Hugentobler [mailto:marco.hugentobler at karto.baug.ethz.ch]
> Gesendet am: Mittwoch, 13. Februar 2008 12:39
> An: qgis-developer at lists.osgeo.org
> Cc: Düster Horst
> Betreff: Re: [Qgis-developer] provider.getNextFeature(fet) with PostGIS
>
> I recently did some changes in the postgres provider to enhance
> efficiency.
> Maybe this is a side-effect of my changes? It would therefore be
> interesting
> to know what exactly does not work. Is the geometry empty? Or the
> attribute
> information missing? Also, it would be good to know the arguments you
> passed
> to 'getNextFeature'.
>
> As it works with .shp layers, I think it is very unlikely that it is a
> python
> bindings problem.
>
> Regards,
> Marco
>
> Am Mittwoch 13 Februar 2008 12:14:29 schrieb Düster Horst:
> > Martin
> >
> > Thank you for Rev. 8153 now setAttributeMap() works fine. But now I'm
> > faced with the next problem.
> >
> > provider.getNextFeature()
> >
> > doesn't work no more with PostGIS layers. It works fine with *.shp
> > layers.
> >
> > Maybe the same issue like setAttributeMap()???
> >
> > Geoprocessing Plugin:
> > >In my opinion you can put your plugin to the repository, maybe some
> > >people would like to join your efforts!
> >
> > How can I put the plugin to the repository??
> >
> > Regards
> > Horst
> >
> > ------------------------------------------------
> >
> > Dr. Horst Düster
> > GIS-Koordinator, Stv. Amtschef
> >
> > Kanton Solothurn
> > Bau- und Justizdepartement
> > Amt für Geoinformation
> > SO!GIS Koordination
> > Rötistrasse 4
> > CH-4501 Solothurn
> >
> > Telefon ++41(0)32 627 25 32
> > Telefax ++41(0)32 627 22 14
> >
> > mailto:horst.duester at bd.so.ch
> > http://www.agi.so.ch



-- 
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee


More information about the Qgis-developer mailing list