https://github.com/amauryval/linestring-bender
A example to curve a LineString with Shapely and Scipy
https://github.com/amauryval/linestring-bender
bend curve linestring scipy shapely
Last synced: about 2 months ago
JSON representation
A example to curve a LineString with Shapely and Scipy
- Host: GitHub
- URL: https://github.com/amauryval/linestring-bender
- Owner: amauryval
- License: mit
- Created: 2021-01-26T19:24:08.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-20T00:52:50.000Z (about 4 years ago)
- Last Synced: 2025-01-24T16:09:56.942Z (3 months ago)
- Topics: bend, curve, linestring, scipy, shapely
- Language: Python
- Homepage:
- Size: 729 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```python
from shapely.wkt import loadsfrom 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
```