Wednesday, 30 October 2019

arcgis 10.0 - Splitting polygon with line using ArcPy?


In looking at Buffering with physical barrier using ArcGIS for Desktop?, it occurred to me that I am not sure how one would go about using geoprocessing tools in ArcGIS to split a polygon with a line programatically.


Manually, you would use the Cut Polygons tool or the Split Polygons tool on the Topology toolbar, but how would you accomplish the same task using modelbuilder or python groprocessing scripting tools?


Right off the bat I think of all of the tools in the Analysis toobox like Union, Identity, etc, but those are all Polygon-Polygon tools, NOT Polygon-Line tools. Even the Split tool is Polygon-Polygon.


Any ideas?



Answer



Using ET Geowizard you can access the code for the Split Polygons with Polylines tool:


enter image description here


Here is the link to the script.


Alternatively, you can use ArcObjects to do this:



Cut Polygon Snippet


You may also use the one side buffer method described here.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...