Giter Site home page Giter Site logo

Riverbank centerlines about label_centerlines HOT 3 CLOSED

ungarj avatar ungarj commented on July 28, 2024
Riverbank centerlines

from label_centerlines.

Comments (3)

StyXman avatar StyXman commented on July 28, 2024

In fact this algorithm does not properly work for what I want :( On narrow sections, Voronoi ridge vertices start falling out of the shape. Here's an example of an atual riverbank. The red line is what this algo finds as the center line.

I'll keep looking for a way to separate the actual riverbanks from the segments that just 'cross' the river.

from label_centerlines.

ungarj avatar ungarj commented on July 28, 2024

Hi, first of all, thanks for contributing!

I never tried the algorithm on riverbanks but theoretically it should work as well. Looking at your example, maybe it helps to decrease the segmentize value. The algorithm then puts the points closer together before drawing the voronoi and if they are close enough, there should be a centerline.

However there could be the issue that the algorithm incredibly slows down because the biggest performance issue with the current system is to extract the longest line from the voronoi. And the effort increases for every additional segmentize point.

from label_centerlines.

StyXman avatar StyXman commented on July 28, 2024

In #osm they pointed me to PostGIS' ST_ApproximateMedialAxis. This looks more like what I actually want, but assumes your data is already in PostGIS (which I do). Maybe you could check out the algo for your script.

from label_centerlines.

Related Issues (14)

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.