Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Looking for a simpler method here.

I am trying to split up / cut / slice existing polygons by using existing poly-lines. An example would be splitting a water body or land parcel at the point where a bridge/road crosses it. But the road network may not necessarily result in a closed loop.

Since the poly-lines are not necessarily interconnected or continuous, creating a polygon from them is not an option (which eliminates using the split tool). Also, I have tried using a topology with the geometry, but it keeps failing, probably due to the large/complex geometry.

Current Workflow: I have accomplished this with the Feature to Polygon tool, combining the lines and polygons together, but it creates additional unwanted polygons anywhere a loop closes. I created a mask of the original polygons, and used this with the overlay->erase tool to remove the unwanted polygons. This still leaves some unwanted geometry (mostly slivers), but is somewhat workable.

This seems like an extremely convoluted and round-a-bout way to accomplish (what seems like it should be) a very simple task.

Other than manual edits, or using a topology, is there is tool that could accomplish this in a single step?

Using: ArcMap \ ArcInfo Desktop 10 SP5

Edit 1: In my case, it is not actually roads as mentioned above. I have water polygons for a coastal area, and need to split the polygons where rock dams or levees have been put across the waterways. Which are typically not interconnected.

The water polygons have been simplified and repaired, to the point where I would no longer call the data "dirty" just complex and large. But I've got the workaround mentioned above working for this case.

I'm looking more "in general" for a tool that can simply divide polygons using polylines.

Edit 2:

Mapperz:Thanks for the Model Builder suggestion. I am going to use that as a stop gap solution, for now.

Jakub: Thanks for the suggestion. I'm not opposed to a programmatic solution or developing a custom tool, although I've never made one before. I have programming experience, but not in conjunction with Arc. I'd prefer something that directly cuts the geometry though, instead of following the roundabout logistics above. In theory that should reduce resultant gaps, since it wouldn't be subject to multiple iterations of cracking/clustering. Although, I'm not sure that would be as easy or even possible.

Edit 3: I'm looking for something to function like on the left in the image.

Cut Polygon vs Feature to Polygon

share|improve this question
Use can recreate your actions with the Model Builder - help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//… - ArcGIS is always convoluted... –  Mapperz Aug 22 '12 at 14:47
It sounds like you have very dirty/ugly data. It is difficult to automate processing on dirty data. It usually requires some manual cleanup before processing. For example, if your roads layer isn't continuous and has random gaps or missing vertices, it could be rough to chop things up with it. You might want to play with the Extend Line tool to clean up danglers. –  Baltok Aug 22 '12 at 15:33
I think adding a Cut Polygons tool, that divides an input polygon feature class using an input line feature class, to ArcToolbox would make an excellent ArcGIS Idea. If you submit it be sure to place a link in your original Question to try and attract some upvotes. –  PolyGeo Aug 22 '12 at 22:54
These are the type of situations where you could develop a custom tool with ArcObjects. I don't have a tool for your particular situation but this can easily be handled programatically. You pretty much have all the logistics figured out you just need to write it in code. I see you want an existing tool so I presume programmatic solution is not acceptable here (?) There would have to be a function that handles the gaps in your lines which would add complexity but not impossible. Sounds like a good custom add-in project. –  Jakub Aug 23 '12 at 13:32
Duplicate question? gis.stackexchange.com/questions/30586/… –  RyanDalton Aug 27 '12 at 21:32

3 Answers 3

I thought there must be a way to do this, so I created my what I believe to be a pretty good solution. I have posted it on the ArcGIS Resources site and in the Community->Technical->Analysis & Geoprocessing->Analysis->Gallery.

The tool is called Split Polygons With Lines and requires an ArcInfo license because of some of the tools used within the model. Essentially what I did was create the minimum bounding box for the polygons and extend the lines to them. So using some ModelBuilder voodoo, I was able to turn the linework into polygons, which then I used Identity to split the original polys.

Please test it out and see if it works for you. In my (limited) tests it preserved attributes of the original polygons, and split only the existing polygons.

share|improve this answer
great tool! nice work! –  Reen Jan 16 at 14:10

I believe "Feature to Polygon" does exactly what you need. You can input a combination of Polygon and Polyline feature classes. The output Polygons are split at each Polyline. An ArcInfo license is required, which you have. Tested in 10.0.

Make sure you have a field that is populated, for all features, before running "Feature to Polygon. The new Polygon Fills will have all blank fields. Another method is to spatially select the "cut" polygons with the original Polygons. The "cut" filled polys will not "have their center" in the original polygons.

share|improve this answer
Not quite. Feature to Polygon fills in any closed geometry with a new polygon. I only want to slice existing polygons. I am currently using this as part of my workaround, though. (See orig question) –  brnt Aug 23 '12 at 18:56
This is simple to remedy. Make sure you have a field that is populated, for all features, before running "Feature to Polygon. The new Polygon Fills will have all blank fields. Another method is to spatially select the "cut" polygons with the original Polygons. The "cut" filled polys will not "have their center" in the original polygons. –  klewis Aug 27 '12 at 16:46

This is a long shot, but do you have a 'Production Mapping', 'Defense Mapping', 'Aviation', or 'Maritime Charting' extension for ArcGIS? It seems the "Dice Polygons" tool will accomplish what you need. I've never used the tool personally, but from the description, it sounds like a winner.

Search Link


Alternatively, I've written a quick script based on the discussion in "Optimizing ArcPy code to cut polygon?" to cut/split/dice a polygon feature class using a polyline feature class. Credits to those on the thread.

You just need to make a skeleton tool that accepts as parameters:

  1. Input Polygon Feature Class (Type: Feature Class, Filter: Polygon)
  2. Cutting Polyline Feature Class (Type: Feature Class, Filter: Polyline)
  3. Output Polygon Feature Class (Type: Feature Class, Direction: Output

There are two assumptions I noticed while running the tool:

  • Your polyline must cross the polygon entirely, no stopping halfway or passing off to a second line inside the polygon to finish off the traverse.
  • If a polygon gets crossed by two (or more) lines, it will get cut twice and you'll get some stacked polygons, since you end up with 4 slices at the end (see images).

Polygon cut oncePolygon cut again, ending up with stacked slices

Code below for saving as .py file:

__author__ = "John K. Tran, Tristan Forward"
__contact__ = "jtran20@masonlive.gmu.edu, http://gis.stackexchange.com/users/6996/tristan-forward"
__version__ = "1.0"
__created__ = "7/3/15"
__credits__ = "http://gis.stackexchange.com/questions/124198/optimizing-arcpy-code-to-cut-polygon"

import os
import sys
import arcpy

def cut_geometry(to_cut, cutter, out_fc):
    Cut polygons by polylines, splitting each polygon into slices.
    :param to_cut: The polygon to cut.
    :param cutter: The polylines that will each polygon.
    :param out_fc: The output with the split geometry added to it.

    arcpy.SetProgressor("default", "Firing up script...")
    geometries = None
    polygon = None
    spatialref = arcpy.Describe(to_cut).spatialReference
    slices = []

    pcount = 0
    with arcpy.da.SearchCursor(to_cut, ["SHAPE@", "OID@"]) as pcursor:
        for prow in pcursor:
            arcpy.SetProgressorLabel("Generating slices: {0} rows complete".format(str(pcount)))
            polygon = prow[0]
            polyid = prow[1]
            with arcpy.da.SearchCursor(cutter, "SHAPE@") as lcursor:
                for lrow in lcursor:
                    line = lrow[0]
                    if line.crosses(polygon):
                            slice1, slice2 = polygon.cut(line)
                        except RuntimeError:
                        slices.append((slice1, polyid))
                        slices.append((slice2, polyid))
            pcount += 1
            del lcursor
    del pcursor

    arcpy.SetProgressorLabel("Creating output feature class")
    arcpy.CreateFeatureclass_management(os.path.dirname(out_fc), os.path.basename(out_fc), "POLYGON", spatial_reference = spatialref)
    arcpy.AddField_management(out_fc, "SOURCE_OID", "LONG")
    scount = 0
    with arcpy.da.InsertCursor(out_fc, ["SHAPE@", "SOURCE_OID"]) as icursor:
        for eachslice in slices:
            if scount % 10 == 0:
                arcpy.SetProgressorLabel("Inserting slices: {0} rows complete".format(str(scount)))
            scount += 1
    del icursor


if __name__ == '__main__':
    argv = tuple(arcpy.GetParameterAsText(i) for i in range(arcpy.GetArgumentCount()))

The script isn't too slow, but for others who want improve the script, there may be some value in exploring using Extent objects. I think line.crosses(polygon) does the job before performing polygon.cut(line), but maybe Extents are a good alternative to explore.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.