Re: [Qgis-developer] function similar to Excel VLOOKUP - SOLVED

2015-07-30 Thread Zoltan Szecsei
Awesome. Thank you. I added the extra column to the shapefile attributes, joined the shapefile to the CSV file, and then updated the new column in my shapefile using: attribute($currentfeature,'joinedcolumn') (NOTE: single quotes for field name) I'm sure I could have skipped the Join step a

Re: [Qgis-developer] Using the QgsBrowserModel in Python

2015-07-30 Thread Ludovic Delauné
Le 30/07/2015 13:47, Hugo Mercier a écrit : > Hi, > > On 29/07/2015 17:50, Ludovic Delauné wrote: >> Hi devs, >> >> i'm trying to use the QgsBrowserModel in a Python plugin. >> I need to get the URI from a selected Item in the QTreeView, i expected to >> have a QgsLayerItem returned by the dataIt

Re: [Qgis-developer] function similar to Excel VLOOKUP

2015-07-30 Thread Roy
How about a " Join " QGIS join Il 30/07/2015 13.06, Zoltan Szecsei ha scritto: Hi, How could I implement something like vlookup in QGIS? I have a shapefile with 2000 polygons and column 1 of its attribute table has a code value. Using the code in this column 1, I need to look up which row

Re: [Qgis-developer] function similar to Excel VLOOKUP

2015-07-30 Thread DelazJ
Hi, I think combining getFeature and attribute functions should help u do that in the field calculator, though I haven't used them on csv files. Assuming col1 in your csv contains also the code you are looking for, applying this expression on shapefile "col 6" in QGIS field calculator may do the jo

Re: [Qgis-developer] Using the QgsBrowserModel in Python

2015-07-30 Thread Hugo Mercier
Hi, On 29/07/2015 17:50, Ludovic Delauné wrote: > Hi devs, > > i'm trying to use the QgsBrowserModel in a Python plugin. > I need to get the URI from a selected Item in the QTreeView, i expected to > have a QgsLayerItem returned by the dataItem() in order to get the uri() > member but a QgsData

[Qgis-developer] function similar to Excel VLOOKUP

2015-07-30 Thread Zoltan Szecsei
Hi, How could I implement something like vlookup in QGIS? I have a shapefile with 2000 polygons and column 1 of its attribute table has a code value. Using the code in this column 1, I need to look up which row of a CSV file has that code, and return column 2 of the CSV file. This returned va

Re: [Qgis-developer] Freeze on release-2_8 branch

2015-07-30 Thread Sandro Santilli
On Thu, Jul 30, 2015 at 10:07:32AM +0200, Jürgen E. Fischer wrote: > On Thu, 30. Jul 2015 at 09:05:11 +1000, Nyall Dawson wrote: > > They were both backported to 2.8.3 (thanks Jürgen!). I assume the release > > announcement is waiting on the packages being built and available for the > > major plat

Re: [Qgis-developer] Freeze on release-2_8 branch

2015-07-30 Thread Jürgen E . Fischer
Hi, On Thu, 30. Jul 2015 at 09:05:11 +1000, Nyall Dawson wrote: > They were both backported to 2.8.3 (thanks Jürgen!). I assume the release > announcement is waiting on the packages being built and available for the > major platforms. We need to be noisy about point releases, too? It's all on gi

[Qgis-developer] Dissolve/Intersection/Clip in 2.10 doesn´t work (Regression)

2015-07-30 Thread Lene Fischer
Hi, I have installed QGIS 2.10.1 on Windows 7 (64 bit). When I use the Geoprocessing tool - Dissolve, Clip and Intersection Dissolve and add Unique ID field – All polygons that are unique are stored and all the rest are not are not created. The problem is both in the vector menu and in the Proc

Re: [Qgis-developer] memory layer performance while adding many features?

2015-07-30 Thread Raymond Nijssen
Merci Denis, I will try both options later today. Raymond On 30-07-15 09:34, Denis Rouzaud wrote: From your code [0] , I would see 2 options: * add features all at once on the provider using QgsVectorDataProvider::addFeatures (the method you currently use) * work on the layer level rather

Re: [Qgis-developer] memory layer performance while adding many features?

2015-07-30 Thread Denis Rouzaud
From your code [0] , I would see 2 options: * add features all at once on the provider using QgsVectorDataProvider::addFeatures (the method you currently use) * work on the layer level rather than the provider, which I believe is the recommended way for plugins. Make the layer editable, and a

Re: [Qgis-developer] memory layer performance while adding many features?

2015-07-30 Thread Raymond Nijssen
Hi Hugo, I'm not specifically adding an index. So if you are right, I'm not using that. Regards, Raymond On 30-07-15 09:10, Hugo Mercier wrote: Hi Raymond, On 29/07/2015 09:04, Raymond Nijssen wrote: Dear developers, ;) A plugin of mine imports data from a gml file into a memory layer. W

Re: [Qgis-developer] memory layer performance while adding many features?

2015-07-30 Thread Raymond Nijssen
Hi Denis, The code is in the ImaerReader plugin in the qgis repo and in github: https://github.com/opengeogroep/AERIUS-QGIS-plugins I'm adding the features one by one. Regards, Raymond On 30-07-15 08:46, Denis Rouzaud wrote: Hi Raymond, Can you show us the code doing this? Do you commit fea

Re: [Qgis-developer] Definition of Perimeter for polygons with holes

2015-07-30 Thread Hugo Mercier
Hi Marco, On 28/07/2015 10:38, Marco Hugentobler wrote: > Hi > > While working on QgsDistanceArea, I noticed the definition of perimeter > in QGIS is not the same as in PostGIS. PostGIS returns the length of > outer and inner rings, while QGIS expects the length of the outer ring > only: > > tes

Re: [Qgis-developer] memory layer performance while adding many features?

2015-07-30 Thread Hugo Mercier
Hi Raymond, On 29/07/2015 09:04, Raymond Nijssen wrote: > Dear developers, ;) > > A plugin of mine imports data from a gml file into a memory layer. Works > fine for tiny gml files, but takes forever on huge ones. Sounds > plausible maybe, but the relation is not linear. > > So I did did some te