Thursday 30 July 2015

algorithm - Problems using the 'Split' tool with ArcGIS


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?



Answer



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.


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...