How to Add Stationing to Line Features


Ever wonder how to add stationing to line features in ArcGIS? In this blog entry I will give an example of how to accomplish just that!

For a line feature to display stationing or hatchings, the feature has to be converted to a route. Add the “Route Editing Toolbar” to your display. Start an edit session then click the “Make Route” icon. From here select the line feature you wish to make a route. In the “Make Route” window select where you would like the beginning of the stationing to start and then select Measure Field > Shape_Length for the measured values. Leave the rest as the default. Next, click “Make Route”.


Next, go into the layers properties and click on the “Hatches” tab. Here add a “Hatch Definition” and select it in the left hand side of the window.


In this window, select “Label Settings” which brings up the following window:


Next, click “Build a text expression> Expression” button. This presents the “Hatch Text Expression” window.


Below is what is shown in the above expression window in full detail:


def FindLabel ( esri__measure ):

EM = str(int(round(esri__measure)))

if len(EM) == 0:

return “0+00”

elif len(EM) == 1:

return “0+0{0}”.format(*EM)

elif len(EM) == 2:

return “0+{0}{1}”.format(*EM)

elif len(EM) == 3:

return “{0}+{1}{2}”.format(*EM)

elif len(EM) == 4:

return “{0}{1}+{2}{3}”.format(*EM)

elif len(EM) == 5:

return “{0}{1}{2}+{3}{4}”.format(*EM)

elif len(EM) == 6:

return “{0}{1}{2}{3}+{4}{5}”.format(*EM)

This creates the stationing 00+00. Below is an example of having intervals every 1000 feet with smaller intervals at 100 feet.


The end result stationing!


2 thoughts on “How to Add Stationing to Line Features

  1. This is so awesome, thank you for posting this workaround. I cannot get the hatching to show appropriatly. I’ve copied your text expression into notepad++ and pasted it back into The Hatch Text Expression, under the advanced setting. I cannot get the expression to work. I get an “Error 3 Line 12 – Syntax error”. The string looks good to my untrained eye.

Leave a Reply

Your email address will not be published. Required fields are marked *