5

I'm running into difficulty when using the split tool with ArcGIS 10.

enter image description here

I am trying to split lines using a grid that I generated using the Fishnet command. Each gridcell has a unique text value as a name (FID converted to a string), which is my Split Field. However, I can't tell whether it is the size of my grid (300000 cells), or if it is due to no line being within a cell that causes the error.

enter image description here

I tried breaking my grid cell into smaller pieces of ~50000 cells, but I still got an error occuring. Then I tried selecting only cells that were intersected by the lines, and just splitting using those cells, and still got an error. The strange part about the error messages, were that the analysis would run for about 30 minutes or so, producing output, and then an error message would appear on screen, but no explanation - no error number or no further details.

What I have no resorted to doing is splitting the grid into 500 smaller grids, and then splitting each subgrid on itself. Then I will loop through every cell, and clip the lines to each cell. The problem with this approach is that it is taking a long time (~20 hours so far).

Are there any ways I can improve this process?

11
  • Try a few things and let us know the results: Try selecting only four cells of the grid and running your split command; then try selecting four empty cells and running it. If those both work, try progressively larger selections of cells until you get an error
    – Patrick
    Aug 16, 2011 at 23:59
  • There are many reasons for errors, but we can narrow them down by trying those things. Also, could you let us know the name of the actual error?
    – Patrick
    Aug 17, 2011 at 0:00
  • @Patrick - I'll try that. Strangely, there were no names (or numbers) with the errors. I'm using to getting ERROR: 9234XX etc; these had no identifiers.
    – djq
    Aug 17, 2011 at 0:20
  • That's really odd. Was it one of the "send feedback" errors? Or did ArcMap keep running?
    – Patrick
    Aug 17, 2011 at 0:26
  • No, it was just one of the pop-up 'Split Failed' errors. When I examined it in the results there were no further details, just the small red circle signifying that it had failed, but no error numbers or warnings.
    – djq
    Aug 17, 2011 at 0:33

2 Answers 2

3

Here's another potential workflow: 1. Intersect the Roads with the polygons, outputting "lines". This will divide the roads along the polygons. 2. Use the split by attribute tool or something similar to divide the roads into separate files based on the FID field from the polygons.

I suspect this will be much faster than looping through the clip function.

5
  • Great suggestion, Patrick. All I need is the total length of the road per grid which I can then calculate within Python (or R! using doBy) as the intersected line takes on the attribute of the grid.
    – djq
    Aug 17, 2011 at 21:12
  • Or calculate it in Access. It's funny - I did this exact thing yesterday. Sorry I didn't think of it sooner!
    – Patrick
    Aug 17, 2011 at 21:14
  • It's still useful, and orders of magnitude quicker than my first approach.
    – djq
    Aug 17, 2011 at 21:22
  • 1
    +1 This is the method I would recommend, and a couple months back posted a workflow that I could follow in Google Docs (look at step 6): docs.google.com/… where the Intersect tool is what does all the heavy lifting.
    – SaultDon
    Aug 17, 2011 at 21:34
  • +1 for saving old workflows. I should start doing that...
    – Patrick
    Aug 17, 2011 at 21:38
1

One way to work around this would be to loop in Python, selecting each grid cell, clipping the other layer using Clip_analysis(), and then selecting the next cell.

I have no idea how long this would take, but it shouldn't require any manual input, possibly saving you some time.

3
  • Patrick, how do I clip based on a selected cell? Do I need to export it first? I'm familiar with Python, just not familiar with how to do this.
    – djq
    Aug 17, 2011 at 14:34
  • Clip always only uses the selected features. So, if you use SelectLayerByAttribute_management() to loop through your grid cells, using an FID or something, you could easily run a Clip_analysis on each cell.
    – Patrick
    Aug 17, 2011 at 14:54
  • I noticed as I was testing that Clip_analysis seems very sensitive to the number of objects in the in_features, so if speed is important, you may want to break up your feature layers into a handful of separate areas.
    – Patrick
    Aug 17, 2011 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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