geo-registry

Polygons To Lines

The outlines of polygons as line features.

Pitfall. Shared edges between neighbouring polygons appear once per polygon unless the engine builds a topology.
About this operation
Also called Polygon To Line, boundary, outline
Group vector/geometry
Checks geometry.valid
Pitfalls 1 listed above
Columbus tool Not stated
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Not stated

Inputs and outputs

Direction Name Type Geometry Note
Input layer vector polygon Not stated
Output output vector line Not stated

In each engine

Engine Tool Parameters Differences
apache-sedona sedona.sql.ST_Boundary
  • layer → geometry
  • A Spark SQL function: arguments are columns or column names, run over a Spark DataFrame.
geopandas geopandas.GeoSeries.boundary Not stated
  • A property of the GeoSeries; returns a GeoSeries without the other columns.
grass v.type
  • layer → input
  • output → output
  • Converts area boundaries to lines; a boundary shared by two areas becomes one line, not one per polygon.
Preset: {"from_type":"boundary","to_type":"line"}
postgis st_boundary
  • layer → #1
None noted
qgis native:polygonstolines
  • layer → INPUT
  • output → OUTPUT
None noted
sf sf::st_boundary
  • layer → x
None noted
shapely shapely.boundary
  • layer → geometry
  • Also gives the end points of lines and nothing for points (the boundary in the OGC sense).
turf-js turf.polygonToLine
  • layer → poly
  • One polygon (a Feature or geometry) per call, not a FeatureCollection.
  • Turf works on GeoJSON in longitude/latitude (WGS 84); data in another CRS must be reprojected first.
whiteboxtools PolygonsToLines
  • layer → input
  • output → output
None noted