1

This is related to an old problem of mine, regarding arrowheads on lines, which doesn't look very nice unless the line is very thin. It's even an ArcGIS idea with quite a lot of votes (although no apparent attention from ESRI).

My current workaround consists of splitting the lines at a specified distance from the end, distance depending on the intended scale. Then change the symbology on the end part to contain arrows. Hopefully they will connect nicely to the rest of the line, which then can be a lot thicker.

However, this time I need arrows on more lines than I care to edit manually, and I need arrows in both ends. So I figured out I need to split my lines at about 110 m from each end. How can I accomplish that? There are no vertices, points or anything at that location which I can use. All my lines are of different lengths. Every function I have tried (native ArcGIS functions, ET Geowizards) can only split the lines multiple times in equal segments, and only count from one side. I only need one segment at each end, and it has to be 110 m.

I guess I could use the split function twice on each line, select the segments I need and be happy with that. It seems highly ineffecient though.

How should I go about fixing this, or are there any other workarounds to get my arrows look nice? Python solutions could work as well.

I have a Basic license, Python 2.7, Spatial analyst and 3D analyst to work with.

I have a number of lines that looks like this: enter image description here

  • I'm pretty sure there is an ArcPy way to determine distance along as a percentage of length but I think it may be 10.1 and later so can you include your version and whether an ArcPy solution is acceptable, please? Also include your license level on this one because it may narrow/expand your options. – PolyGeo Aug 28 '14 at 11:32
  • @PolyGeo Sounds promising. I edited in my version (10.2). – Martin Aug 28 '14 at 11:36
  • This is what I was thinking of gis.stackexchange.com/questions/26542/… – PolyGeo Aug 28 '14 at 11:44
  • 1
    I don't have code, but what if you convert the start and end points to points, buffer the point by 110m, then intersect the buffers and lines? The created segment wouldn't be exactly 110m but perhaps close enough depending on the scale you're working at? There would be complications if the ends of two lines are closer than that, but if you iterated through each line instead of doing them all at once that wouldn't be an issue. – Chris W Aug 28 '14 at 20:32
  • 1
    That could be another option. I actually managed to get the code linked above working well enough to complete my task. It still involved a bit of manual work, but at least I didn't have to split them one by one. When I get the script cleaned up nicely, I'll post it here for future readers. – Martin Aug 29 '14 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.