Geospatial Modelling Environment

convert.polygonstolines (Convert Polygons To Lines)

Converts polygons to lines (polylines)


This tool converts the polygons in a polygon data source to lines (polylines) in a new or existing line data source. This works with multipart polygons, and with any inner rings or holes in the polygon: all the component lines that make up the polygon are included in the output line. The unique polygon ID is written to the line attribute table. Note that the resulting lines will overlap where two polygons share the same boundary (this algorithm does not simplify the resulting line data to remove segments from different polygons where there is precise overlap).


convert.polygonstolines(in, uidfield, out, [where]);

inthe input polygon data source
uidfieldthe unique ID field of the input feature data source
outthe output line data source
[where]the selection statement that will be applied to the feature data source to identify a subset of features to process (see full Help documentation for further details)


convert.polygonstolines(in=”C:dataplots.shp”, uidfield=”PLOTID”, out=”C:databndlines.shp”);

convert.polygonstolines(in=”C:dataparcels.shp”, uidfield=”PARCELID”, out=”C:databndlines.shp”);


Please consider making a purchase to support the continued development of these tools  Read more...

Tips on how to use this interface efficiently 


Open Source GIS

Copyright © 2001-2014 Hawthorne L. Beyer, Ph.D., Spatial Ecology LLC    Connect on LinkedIn