<div dir="ltr">Maaza,<div><br></div><div>Are you using QGIS 2.0?</div><div><br></div><div>- Nathan </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 1, 2013 at 6:27 AM, mmekuria <span dir="ltr"><<a href="mailto:sailmcm@yahoo.com" target="_blank">sailmcm@yahoo.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was using Python Spatial Index and select from a vector layer using the<br>
result from nearest neighbor (list) and get error messages saying it does<br>
not recognized the list. I see in the API the input to the select<br>
<br>
QList< QgsFeatureId > QgsSpatialIndex::nearestNeighbor ( QgsPoint       point,<br>
int     neighbors )<br>
<br>
and the vector select allows input of feature Id's but the documentation is<br>
very scantily covered to give what the python representation might be<br>
<br>
void QgsVectorLayer::select     (       const QgsFeatureIds &   featureIds      )<br>
<br>
The format for the  QgsFeatureIds is typedef QSet<QgsFeatureId><br>
QgsFeatureIds<br>
<br>
How can I coerce this magical transformation using soemthing similar in<br>
Python (may be a Set) ? I tried making a Python Set but Vector layer Select<br>
refuses to accept it.<br>
<br>
How do I transform QList to QSet<QgsFeatureId> in Python?<br>
<br>
Thank you,<br>
<br>
<br>
<br>
<br>
-----<br>
Maaza Christos, PhD<br>
<a href="http://www.Axumcorp.com" target="_blank">www.Axumcorp.com</a><br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Nearest-Neighbor-List-and-Vector-Layer-Selection-tp5092015.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Nearest-Neighbor-List-and-Vector-Layer-Selection-tp5092015.html</a><br>


Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br></div>