Lines to polygons
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
Each line turns into a polygon. Straight and self-intersected lines are omitted. Multilines are exploded to multiple features.
Input:
Linear vector layer in GeoJSON or GeoPackage format or ESRI Shapefile in a zip archive.
Output:
Polygon layer;
Linear layer with remaining self-intersecting lines.
Both files are in the same format as the input.
Example:
Example input¶
Example output: polygons and sefl-intersecting lines¶
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.