Skip to content
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

Bundling fails on datasets including zero length lines #3

Open
paulds8 opened this issue Oct 20, 2017 · 6 comments
Open

Bundling fails on datasets including zero length lines #3

paulds8 opened this issue Oct 20, 2017 · 6 comments

Comments

@paulds8
Copy link

paulds8 commented Oct 20, 2017

Hi Anita

I keep getting the following error, regardless if I run the bundle edges script in Windows or Linux. Do you have any idea how to remedy it? I have some really great use cases for this bundling script, but I don't understand how to correct this issue.

2017-10-20T16:03:36	1	Cannot find variable: staticmethod
2017-10-20T16:03:37	2	Uncaught error while executing algorithm
			Traceback (most recent call last):
			  File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py", line 203, in execute
			    self.processAlgorithm(progress)
			  File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\script\ScriptAlgorithm.py", line 378, in processAlgorithm
			    exec((script), ns)
			  File "<string>", line 313, in <module>
			  File "<string>", line 164, in force_directed_eb
			  File "<string>", line 103, in compute_compatibilty_matrix
			Exception: unknown
@anitagraser
Copy link
Collaborator

I cannot reproduce the issue. It sounds like an issue of correctly adding the scripts to Processing. Please list, in detail, which QGIS versions you are running and exactly which steps you're using.

@paulds8
Copy link
Author

paulds8 commented Oct 23, 2017

At the moment I am running 2.18.12

In Windows I placed the scripts in:
C:\Users\user.qgis2\processing\scripts

And in Ubuntu, I placed them in /home/user/.qgis2/processing/scripts

In both cases I was able to run the clustering scripts and I have created my own scripts that I have placed in these locations in the past.

It almost seems like the rest of the script can't access MiscUtils in my case. Unless I am just interpreting this incorrectly.

I have attached a sample of the data. Hopefully that might help: qgis_bundling_testdata.zip

@anitagraser
Copy link
Collaborator

I can reproduce the issue with this dataset. The issue is caused by zero length lines. If those are removed, it works.

I'll look into providing a better error message or ignoring those features ...

@anitagraser anitagraser reopened this Oct 23, 2017
@anitagraser anitagraser changed the title @staticmethod Bundling fails on datasets including zero length lines Oct 23, 2017
@paulds8
Copy link
Author

paulds8 commented Oct 24, 2017

Thanks for getting to the bottom of that!

This data represents inter-connectivity between phone calls at a cell site level, so there are many cases where a person phones another person who receives the call through the same cell site.

I will have to find a way of visualizing those cases using an alternative method.

@brylie
Copy link

brylie commented Nov 2, 2017

I am experiencing this issue as well. How do you recommend we filter out zero-length lines?

@spatialsparks
Copy link
Contributor

Maybe filter out zero-length lines in bundling algorithm but make a new SHP-file including points of zero length lines (as zero length lines are basically just points)? This way no data gets lost but unused data (zero length lines) are still visualisable in the map?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants