Git Product home page Git Product logo

Comments (2)

anitagraser avatar anitagraser commented on August 20, 2024

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!

from qgis-edge-bundling.

lucasvw avatar lucasvw commented on August 20, 2024

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!

from qgis-edge-bundling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.