Converts closed polylines (and polyline chains) to polygons
Source Polyline Layer
Result Polygon Layer
Result Polygon Layer(closed polyline chains used)
Result Polygon Layer (Build Polygons Function)
Parameters
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. |
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") |
Notes:
<> - required parameter
{} - optional parameter
The argument separator for StartInfo.Arguments is space. If a string might contain a space, you need to double quote it.