Skip to content

A example to curve a LineString with Shapely and Scipy

License

Notifications You must be signed in to change notification settings

amauryval/linestring-bender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linestring-bender

Because it's fun to bend a LineString :)

Based on this stackoverflow topic: https://stackoverflow.com/questions/12643079/b%C3%A9zier-curve-fitting-with-scipy

Install the environment

conda env create -f environment.yml

Here a short snippet

from shapely.wkt import loads

from core.line_bender import LineStringBender

input_line = loads("LINESTRING(0 0, 25 25)")
curve_process = LineStringBender(input_line, 0.5, 2, 'right')

curve = curve_process.curve_geom()
print(curve.wkt)

And a bokeh app to bend some LineStrings

cd linestring-bender
bokeh serve main.py --show

example

About

A example to curve a LineString with Shapely and Scipy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages