Central lines of polygons
Generate centerlines for polygon features.
The code below uses the Toolbox SDK, which you can install with pip install toolbox-sdk.
Additional Python examples: using SDK, using Requests. If you prefer other programming language or need full API reference, check out Toolbox OpenAPI as well.
Docs
This instrument creates centerlines for polygons. It is helpful for transforming roads or rivers digitized as polygons into lines.
Input polygon layer and resulting line layer¶
Inputs:
Polygon vector layer in a GDAL-supported format, e.g. GeoPackage, GeoJSON, MapInfo TAB, ESRI Shapefile (the latter two should be in ZIP archive).
Outputs:
Line vector layer in GeoPackage.
Try the tool in action
Click on the Demo button above the tool form. The fields are filled in with demo values.
Click on the Run button.