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.

I am attempting to clip a series of polylines (cross sections) using a single polygon. There are approximately 2400 polyline features in my input featureclass. Is this too large for the Clip tool to handle? I've tried it a few times and each time I've just shut it off after 40 or so minutes. I figure it should take less than a minute to run.

Any thoughts?

share|improve this question
    
I think the number of vertices in your clipping polygon, as well as the number of vertices in the 2400 polylines you are trying to clip may contribute to the amount of work that needs to be done. Also, perhaps think about using arcpy.env.extent (along lines of Dan's answer) if you are comfortable running your Clip within a Python script. –  PolyGeo Aug 23 '11 at 22:43
    
How long does it take to clip one polyline? If that's quick, you might have a problem with a "bad" polyline somewhere. You can find it by a recursive divide-and-conquer approach: try to clip the first half of the features. If you succeed, iterate on the second half. If you fail, iterate on the first half. This will take at most log(2400)/log(2) ~ 12 iterations totalling 1/2 + 1/2 + 1/4 + 1/8 + ... = 2 minutes (plus some overhead for selections). Does this narrow down the problem? –  whuber Aug 23 '11 at 22:47
    
Have you run Repair Geometry on both the lines and the polygon? –  Kirk Kuykendall Aug 23 '11 at 22:49
    
PolyGeo - I'm working in a C# environment with ArcObjects, so Python isn't the way to go for me. I am testing this problem in the standard GUI though. @whuber - clipping 1 polyline from the file takes ~1sec. Clipping 50 takes ~10secs. When I try to clip half (~1200) I run into the original issue. Looking at my resource manager I see several instances of ArcSOCP.exe running with very high CPU/Memory usage. It's like the processes have never closed. Even with Arc closed now they persist and I am showing 100% CPU usage and >75% memory usage. –  Radar Aug 23 '11 at 23:03
    
@Kirk I have attempted to run repair geometry on both the lines and polygon and it hasn't resolved the issue. –  Radar Aug 23 '11 at 23:15
show 5 more comments

2 Answers

up vote 3 down vote accepted

You may wish to wait longer. Clipping is not a strong point of ArcGIS. See

http://donmeltz.com/blog/index.php/2011/06/10/arcgisqgis-faceoff/

http://donmeltz.com/blog/index.php/2011/06/11/arcgis-vs-qgis-clipping-contest-rematch/

So I'd give QGIS a try.

share|improve this answer
    
I appreciate the links, however, QGIS is not an option since this process is contained within an ArcGIS extension I am developing. –  Radar Aug 26 '11 at 22:12
    
Another thing (actually mentioned in the link) is perhaps running some checks on the files before the clip happens (as mentioned -repair geometry) - that may help with obnoxious files that are bad. Also reading Dan's suggestion - I think he may mean select by location - select the features that intersect the poly - and export those and clip the exported layer. That being said - have you tried letting it run overnight-(enough to get an error or completion). Reading with what you have seen so far - it almost sounds like a bad line(s). Another idea to try is exporting to a different format... –  mike Aug 27 '11 at 0:11
add comment

Try a select by attributes to select features within your clip area, then try clipping the selection.

share|improve this answer
    
I just tried this and it still just keeps running without progress. –  Radar Aug 23 '11 at 22:45
    
follow @whuber's suggestion of narrowing down the offending area if repair geometry does nothing. Also, try clipping a shapefile to a folder if that is not what you are doing. –  Dan Patterson Aug 24 '11 at 0:13
    
@Dan Actually, given subsequent information that clipping individual polylines is three orders of magnitude slower than the OP expected, some streamlining is necessary. To rule out certain bugs, one might start by trying to clip heavily simplified versions of those polylines using the same clipping polygon. If that fails or is slow, the problem is the clipping polygon. If it succeeds, we get another point on the computational time scaling curve and can at least start developing more accurate projections of the time needed to complete the original task. –  whuber Aug 24 '11 at 13:52
add comment

Your Answer

 
discard

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.