Snaps the features of a polygon layer to another layer (Point, Polyline or Polygon)
Before Snap
After Snap - Option: Vertices
After Snap - Option: Nearest Edge
After Snap - Option: Vertices and Edges
Parameters
Expression | Explanation |
---|---|
Function Name | SnapPolygons |
<input dataset> | A String representing the input layer. Must be of Polygon 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. |
<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. |
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, "SnapPolygons", "input dataset", "Reference Dataset", "output dataset", "Snap Tolerance", "Snap What", "Snap To What", "Snap To Z"]) |
.NET using ETGWRun.exe | StartInfo.FileName = ETGWPath StartInfo.Arguments = "SnapPolygons" "input dataset" "Reference Dataset" "output dataset" "Snap Tolerance" "Snap What" "Snap To What" "Snap To Z" |
.NET using ETGWOutX.dll | SnapPolygons(input dataset, Reference Dataset, output dataset, Snap Tolerance, Snap What, Snap To What, Snap To Z) |
ArcPy | arcpy.SnapPolygons(input dataset, Reference Dataset, "output dataset" , "Snap Tolerance", "Snap What", "Snap To What", "Snap To Z") |
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.