-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Count Unique Points in Polygons seems to fail inside a loop (PyQGIS) #24528
Comments
Author Name: Giovanni Manghi (@gioman)
|
Author Name: evangelos vafeiadis (@vagvaf)
Hello Giovanni, your input parameters seem to be wrong. It's 'isseed' instead of 'issed'. Could you try again? |
Author Name: evangelos vafeiadis (@vagvaf) PS. Can you assign the bug to me? I plan to a bit of extra code to catch an error like this. |
Author Name: Borys Jurgiel (@borysiasty) I'm updating the category. Unfortunately I have no idea how to assign it to you. Giovanni, are you around?
|
Author Name: Alexander Bruy (@alexbruy) Please check with latest 2.18 and master.
|
Author Name: Alexander Bruy (@alexbruy) Closed for the lack of feedback. Please reopen if necessary.
|
Author Name: Diego García Díaz (Diego García Díaz)
Original Redmine Issue: 16628
Affected QGIS version: 2.18.8
Redmine category:processing/qgis
Hi,
I have been using the tool 'is:countuniquepointsinpolygon' inside a loop with 4000 polygons and a shapefile with 500000 points. The tool runs without any issue, but when I look at the result field, the maximum value that it gets is 2 (which is incorrect). If I run the tool from the toolbox, just for one polygon I get correct results, but for one reason inside the loop never go over 2 (maybe something with memory available?). Besides, this happens with a huge number of points, if I run the loop with a smaller shapefile point, it throws correct results.
I have uploaded to my Dropbox 5 polygons and a 10% of the points (I also get wrong values with this small sub dataset): https://www.dropbox.com/sh/f5982yd8dovsng3/AAAfwVmbtGc4uSOhi96GLHP4a?dl=0
And the script that I wrote is this:
------Code------
import os, processing
Set local variables
path = r'my\base\path\Dissolves'
continents = r'\somepath\points.shp'
outpath = r'path\to\outfile'
Creamos la lista de shapes
shpList = [os.path.join(path, i) for i in os.listdir(path) if i.endswith('.shp') and not 'point' in i]
print('creada lista de', len(shpList), 'shapes')
for shp in shpList:
-----End Code-------
Thanks for your help!
Best regards,
Diego Garcia Diaz
The text was updated successfully, but these errors were encountered: