havatv / qgisnnjoinplugin

GNU General Public License v2.0
7 stars 8 forks source link

Status bar shows 100% but no joined file created #17

Closed DrGHarper closed 6 years ago

DrGHarper commented 6 years ago

When I run a large spatial point to polygon join of 2 million points to 657 polygons using NNjoin, when the process completes and the status bar shows 100%, the NNjoin window does not close and no output file is created or added to QGIS, even after waiting an hour. If I close the status bar on QGIS, I get a Python error "RuntimeError: wrapped C/C++ object of type QProgressBar has been deleted.

NNjoin works fine on smaller point files of tens of thousands rather than millions. Will it work for these larger files?

havatv commented 6 years ago

Thank you for the input, @DrGHarper. When investigating this I found a bug: The update of the progressbar is not done correctly, so the process is only half-way when the progressbar reaches 100%. So, the plugin might work for your input dataset of 2 million points, but it will take twice the time that the progressbar indicates...

DrGHarper commented 6 years ago

Hi, thank you for getting back to me. You are right, I split the file into two 1 million points, and ran NNjoin again. The output file eventually showed in QGIS but I had to leave the application alone for a long time after the status bar said 100% complete.

havatv commented 6 years ago

Commit b5751ea fixes this for QGIS 2. The new version (1.3.3) has been uploaded to plugins.qgis.org.

havatv commented 6 years ago

Commit c31dd85 fixes this for QGIS 3.

havatv commented 6 years ago

NNJoin 3.0.7 (available on plugins.qgis.org) includes the fix.

DrGHarper commented 6 years ago

Hi, I am using version 3.0.7. It has taken 24 hours to progress 67% through a join of 1 million points to 5,000 polygons. Does that sound right?

havatv commented 6 years ago

Sorry, but I have no idea about how long it should take. But except for the progressbar fix, there is no change between 3.0.6 and 3.0.7. With this fix, the plugin is finished with the processing when the progressbar reaches 100%. If there is a delay after that, it will have to do with sending the results back to the UI thread.