Polylines To Polygons

Running programmatically

Converts closed polylines (and polyline chains) to polygons



Notes :


Source Polyline Layer

pl2pg_source.jpg (22220 bytes)

Result Polygon Layer

pl2pg_nochains.jpg (22278 bytes)

Result Polygon Layer(closed polyline chains used)

pl2pg_chains.jpg (22113 bytes)

Result Polygon Layer (Build Polygons Function)

pl2pg_build.jpg (22558 bytes)

Running Programmatically

(Go to TOP)


Expression Explanation
Function Name PolylinesToPolygons
<input dataset> A String representing the input layer. Must be of Polyline type.
<output dataset> A String - the full name of the output layer.
{Force Closure} A Boolean indicating whether polylines that are not closed and the distance between the from and to nodes is smaller than the tolerance specified to be closed.
{Close Tolerance} A Double representing the distance to be used for closing the non closed polylines.

Running the function

ETGWPath used in the table below is the  full path to ETGWRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETGeo Wizards\ETGWRun.exe")

Language Syntax
Python subprocess.call([ETGWPath, "PolylinesToPolygons", "input dataset", "output dataset", "Force Closure", "Close Tolerance"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "PolylinesToPolygons" "input dataset" "output dataset" "Force Closure" "Close Tolerance"
.NET using ETGWOutX.dll PolylinesToPolygons(input dataset, output dataset, Force Closure, Close Tolerance)
ArcPy arcpy.PolylinesToPolygons(input dataset, output dataset, "Force Closure", "Close Tolerance")


(Go to TOP)