I'm trying to write code to generate fixtures for a django/geodjango project. I need to generate geometry for arcs (line string) given three lat/long pairs; start of arc, end of arc and centre of arc. I read through the geodjango documentation but this functionality doesn't seem to be available. Does anyone know if there is a Python library that provides this functionality? Or does anyone have an algorithm I can port to python? Thanks
[GIS] Python library or algorithm to generate arc geometry from three coordinate pairs
djangogeodjangogeometrypython
Best Answer
Shapely PyQGIS, and GeoDjango use the same API based on the GEOS library:
With Shapely:
with a list of points:
or with a list of coordinates:
with PyQGIS:
with a list of points:
with GeoDjango (look at Django: GEOS API)
with a list of coordinates:
The resulting line is made up of two segments: (0,0) to (20,20) and (20,20) to (50,50)