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

Porting clustering and summarize #15

Open
lucasvw opened this issue Jan 18, 2019 · 2 comments
Open

Porting clustering and summarize #15

lucasvw opened this issue Jan 18, 2019 · 2 comments

Comments

@lucasvw
Copy link

lucasvw commented Jan 18, 2019

Hi Anita,

First of all, congrats on all your super interesting work in the field of OS GIS software, really impressive!

I have been trying out the edge-bundeling for QGIS 3.0 and already have some very interesting results. I saw from your blog and in the repo that for QGIS2 you also have two additional tools, the clustering pre-processing and the summarize. Are you planning or anybody else on porting those as well to QGIS3.0?

I also tried to use the standard k-means clustering in QGIS3.0 prior to the edge-bundeling which seemed to work as well. What is the difference between the standard and your custom k-means clustering?

Best,
Lucas

@anitagraser
Copy link
Collaborator

Hi Lucas,

Thank you for the kind words!

The documentation of the built-in K-Means clustering tool in QGIS 3.4 states

If input geometries are lines or polygons, the clustering is based on the centroid of the feature.

The clustering we implemented in https://github.com/dts-ait/qgis-edge-bundling/blob/master/cluster_lines_kmeans.py uses start and end points instead and lines are clustered irrespective of direction.

I'm not aware of any current plans to port the old script but if you're interested in looking into it, that would be a very welcome contribution!

@lucasvw
Copy link
Author

lucasvw commented Jan 21, 2019

Hi Anita,

Thank you for your quick reply.

Ah yes, I see.. clustering on centroid seems to be quite suboptimal for my use-case. Perhaps I can do k-means clustering twice manually on (1) start-points and (2) end-points, and build new clusters from the permutations. That way the clusters would even take direction into consideration 🤔

I have to see if I can find the time to spend on porting, but I must say I am not familiar with the PyQGIS API.

Thanks again!

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

2 participants