Snaps the features of a polyline layer to another layer (Point, Multipoint, Polyline or Polygon)
Before Snap
After Snap - Option1: Nodes, Option2: Vertices
After Snap - Option1: Vertices, Option2: Vertices
After Snap - Option1: Insert Vertices, Option2: Vertices and Edges
Parameters
Expression | Explanation |
---|---|
Function Name | SnapPolylines |
<input dataset> | A String representing the input layer. Must be of Polyline type. |
<Reference Dataset> | A String representing the layer to be used to snap to. |
<output dataset> | A String - the full name of the output layer. |
<Snap Tolerance> | A Double representing the Snap Tolerance (in the units of the spatial reference of the input dataset or the Reference Dataset is KeepSourceSref = FALSE). |
<Snap What> | Required. A String indicating what parts of the input polygons will be snapped. Possible values:
|
<Snap To What> | Required. A String indicating to what parts of the reference geometries the input polygons will try to snap. Possible values:
|
{Snap To Z} | Optional. A Boolean indicating whether the input geometries will snap the the Z values of the geometries from the Reference Dataset. Only if both dataset have Z values. |
{KeepSourceSref} | Optional. A Boolean indicating whether the output to have the spatial reference of the input layer. If False or 0, the spatial reference of the reference layer will be used. |
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, "SnapPolylines", "input dataset", "Reference Dataset", "output dataset", "Snap Tolerance", "Snap What", "Snap To What", "Snap To Z", "KeepSourceSref"]) |
.NET using ETGWRun.exe | StartInfo.FileName = ETGWPath StartInfo.Arguments = "SnapPolylines" "input dataset" "Reference Dataset" "output dataset" "Snap Tolerance" "Snap What" "Snap To What" "Snap To Z" "KeepSourceSref" |
.NET using ETGWOutX.dll | SnapPolylines(input dataset, Reference Dataset, output dataset, Snap Tolerance, Snap What, Snap To What, Snap To Z,KeepSourceSref) |
ArcPy | arcpy.SnapPolylines(input dataset, Reference Dataset, "output dataset" , "Snap Tolerance", "Snap What", "Snap To What", "Snap To Z", "KeepSourceSref") |
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.