Comments (3)
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.
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.
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)
- Why does it always remind me "AttributeError: 'str' object has no attribute 'geom_type'" HOT 1
- Thank you for your help HOT 2
- Obtain the centerlines from 3D binary mask HOT 1
- ogr2ogr wont import the result geojson HOT 2
- Error while install Pacakegs HOT 1
- How do I convert a point on an edge of 255 in a binary image to a data type in this project HOT 1
- Can not get center-line
- find a better performing solution to extract best path from voronoi diagram
- Allow setting of maxnum longest paths HOT 3
- libgfortran error HOT 1
- TypeError: '<' not supported between instances of 'dict' and 'dict' HOT 1
- Keep getting CenterlineError("Polygon has too few points") HOT 1
- how to run it?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from label_centerlines.