<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html;">
<title>Scalix message content</title>
<style type="text/css">
<!--
.Normal { text-align: left; text-indent:0pt; margin-top:0pt; margin-bottom:0pt; font-family: Arial; font-size: 12pt; }
.Default_Paragraph_Font {font-family: Arial; color: Black; background-color: white ; font-size: 12pt; font-weight: normal; font-style: normal; font-variant: normal; vertical-align: normal; text-decoration: none;}
div.ltTOCtitle { font-family: Verdana; font-size: 8pt; font-weight: bold; text-align: center;}
div.ltTOCl1 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:32pt; text-indent:-32pt;}
div.ltTOCl2 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:40pt; text-indent:-32pt;}
div.ltTOCl3 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:48pt; text-indent:-32pt;}
div.ltTOCl4 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:56pt; text-indent:-32pt;}
div.ltTOCl5 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:64pt; text-indent:-32pt;}
div.ltTOCl6 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:72pt; text-indent:-32pt;}
-->
</style>
</head>
<body>
<div class="Normal"><span style='font-size: 10pt; '>Code and corresponding
outputs with respect to an example postgis layer:</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>...</span><br><span style='font-size: 10pt; '>
print "N-Features:
"+str(provider.featureCount())</span><br><span style='font-size: 10pt; '>#
Output: "N-Features: 4 "</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>
provider.getNextFeature(feat)</span><br><span style='font-size: 10pt; '>
attrib = feat.attributeMap()</span><br><span style='font-size: 10pt; '> geom
= feat.geometry()</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '> print "Geomtry:
"+geom.exportToWkt()</span><br><span style='font-size: 10pt; '># Error message:
AttributeError: 'NoneType' object has no attribute
'exportToWkt'</span><br><span style='font-size: 10pt; '> print "AttributeMap:
"+str(attrib) </span><br><span style='font-size: 10pt; '># Output:
"AttributeMap: {}"</span><br><span style='font-size: 10pt; '>...</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>The number of features is
correct but no geometry and no attributeMap</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Regards</span><br><span style='font-size: 10pt; '>Horst</span><br><span style='font-size: 10pt; '>------------------------------------------------</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Dr. Horst
Düster</span><br><span style='font-size: 10pt; '>GIS-Koordinator, Stv.
Amtschef</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Kanton
Solothurn</span><br><span style='font-size: 10pt; '>Bau- und
Justizdepartement</span><br><span style='font-size: 10pt; '>Amt für
Geoinformation</span><br><span style='font-size: 10pt; '>SO!GIS
Koordination</span><br><span style='font-size: 10pt; '>Rötistrasse
4</span><br><span style='font-size: 10pt; '>CH-4501 Solothurn</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Telefon ++41(0)32 627 25
32</span><br><span style='font-size: 10pt; '>Telefax ++41(0)32 627 22
14</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>mailto:horst.duester@bd.so.ch</span><br><span style='font-size: 10pt; '>http://www.agi.so.ch</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>-----Ursprüngliche
Nachricht-----</span><br><span style='font-size: 10pt; '>Von: Marco Hugentobler
[mailto:marco.hugentobler@karto.baug.ethz.ch]</span><br><span style='font-size: 10pt; '>Gesendet
am: Mittwoch, 13. Februar 2008
12:39</span><br><span style='font-size: 10pt; '>An:
qgis-developer@lists.osgeo.org</span><br><span style='font-size: 10pt; '>Cc:
Düster Horst</span><br><span style='font-size: 10pt; '>Betreff: Re:
[Qgis-developer] provider.getNextFeature(fet) with PostGIS</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>I recently did some changes
in the postgres provider to enhance efficiency.
</span><br><span style='font-size: 10pt; '>Maybe this is a side-effect of my
changes? It would therefore be interesting
</span><br><span style='font-size: 10pt; '>to know what exactly does not work.
Is the geometry empty? Or the attribute
</span><br><span style='font-size: 10pt; '>information missing? Also, it would
be good to know the arguments you passed
</span><br><span style='font-size: 10pt; '>to 'getNextFeature'.</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>As it works with .shp
layers, I think it is very unlikely that it is a python
</span><br><span style='font-size: 10pt; '>bindings problem.</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Regards,</span><br><span style='font-size: 10pt; '>Marco
</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Am Mittwoch 13 Februar 2008
12:14:29 schrieb Düster
Horst:</span><br><span style='font-size: 10pt; '>>
Martin</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
Thank you for Rev. 8153 now setAttributeMap() works fine. But now
I'm</span><br><span style='font-size: 10pt; '>> faced with the next
problem.</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
provider.getNextFeature()</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
doesn't work no more with PostGIS layers. It works fine with
*.shp</span><br><span style='font-size: 10pt; '>>
layers.</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
Maybe the same issue like
setAttributeMap()???</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
Geoprocessing Plugin:</span><br><span style='font-size: 10pt; '>> >In my
opinion you can put your plugin to the repository, maybe
some</span><br><span style='font-size: 10pt; '>> >people would like to
join your
efforts!</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
How can I put the plugin to the
repository??</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
Regards</span><br><span style='font-size: 10pt; '>>
Horst</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
------------------------------------------------</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
Dr. Horst Düster</span><br><span style='font-size: 10pt; '>>
GIS-Koordinator, Stv.
Amtschef</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
Kanton Solothurn</span><br><span style='font-size: 10pt; '>> Bau- und
Justizdepartement</span><br><span style='font-size: 10pt; '>> Amt für
Geoinformation</span><br><span style='font-size: 10pt; '>> SO!GIS
Koordination</span><br><span style='font-size: 10pt; '>> Rötistrasse
4</span><br><span style='font-size: 10pt; '>> CH-4501
Solothurn</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
Telefon ++41(0)32 627 25 32</span><br><span style='font-size: 10pt; '>>
Telefax ++41(0)32 627 22
14</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
mailto:horst.duester@bd.so.ch</span><br><span style='font-size: 10pt; '>>
http://www.agi.so.ch</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>--
</span><br><span style='font-size: 10pt; '>Dr. Marco
Hugentobler</span><br><span style='font-size: 10pt; '>Institute of
Cartography</span><br><span style='font-size: 10pt; '>ETH
Zurich</span><br><span style='font-size: 10pt; '>Technical Advisor QGIS Project
Steering Committee</span></div>
</body>
</html>