I want to label a set of lines, with the name of the points that come before and after the line segment.

Red labels in the example below indicate what I want to end up with: Example result

What I have:

  • A point dataset containing all of the points. Each point has a letter code (one or two letters), and has a line name.
  • A line dataset, made from the point dataset. As Line Field, in the Points to line tool, I used the lane names. In the example, this is "Line 1" and "Line 2".

Further details:
I want to have labels along each line segment, that refers to its start and end point. In the example, the first segment starts in A and ends in B, and is therefore labeled "A-B". Similarly, in line 2, the segment that starts in BY and ends in BZ is labeled "BY-BZ".

Preferably I would like the labels to repeat when zoomed in, so that they always show which line segment is visible.

Is this possible to solve in ArcGIS 10.4? I have all extensions available, if that matters.

  • I would prefer the label to repeat itself dynamically along the line, so that it is always visible regardless of zoom level. But if placing it in the center is the only way, it will have to do.
    – Khazeth
    Commented Oct 31, 2017 at 13:10
  • 1
    – FelixIP
    Commented Oct 31, 2017 at 19:54

1 Answer 1


Since labels cannot be based on information contained in another layer, you need to use Spatial Join to add the points' attributes to the lines' attribute table. Make sure you select JOIN_ONE_TO_MANY as join_operation parameter.

Then in ArcMap, activate Maplex so you have more labeling options available. Make the Labelling toolbar visible and select 'Use Maplex Label Engine': enter image description here

Open the properties of your line feature class and choose an appropriate option in the label tab, e.g. River placement, Centered Curved:

enter image description here

Then for the label expression, type [Field1] & "-" & [Field2] .

Lastly, add a halo so that the line is hidden behind the label: enter image description here

  • Thanks for a detailed answer! This adds one field to the line attribute table, which contains the point names. With this method, I am still unable to label each segment (straight part of the line), with its start and end point. My result labels the entire line with all the points along it. That doesn't really help me. Am I doing something wrong here?
    – Khazeth
    Commented Oct 31, 2017 at 14:12
  • 1
    Indeed, sorry. With Spatial Join the lines are duplicated when they touch several points. There are workarounds, but I took a second look at your picture and realised that the lines are made up of more than 2 points. You cannot have different labels for 1 feature, so what you ask is going to be difficult to achieve.
    – GISGe
    Commented Oct 31, 2017 at 14:29
  • I see. I guess my best bet is to split the lines at the points, and label each segment manually. Time consuming, but I think it will be faster than looking for a more automated solution. Thanks for taking the time to try, at least!
    – Khazeth
    Commented Oct 31, 2017 at 14:41
  • @GISGe Actually you can have different labels for 1 feature by using the "Define classes of features and label each class differently" option under the Method drop-down on the Labels tab. Not sure if that will accomplish what you two are talking about though.
    – Dan C
    Commented Oct 31, 2017 at 14:46
  • 1
    @Khazeth - If every line is made up of 2 points and you can separate (filter) the first and last points, you can run Spatial Join twice, and get the 2 point fields in the same row. This is also achievable with the geometry methods of arcpy, if you can't separate first and last points.
    – GISGe
    Commented Oct 31, 2017 at 14:52

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.