An ArcGIS python add-in that allows for simple contour labelling.
- Clone the repository
- Run makeaddin.py.
- Install the resulting .esriaddin file.
- The toolbar can be found in Customize > Toolbars > Contour Labeller
- Add your contour line feature class to your mxd and select it from the 'Contour Layer' drop-down
- Select the attribute field which contains the elevation data in your contours layer from the 'Height Field' drop-down
- Use the 'Draw Labels' tool to begin drawing your label lines. The 'rotation_angle' field value for each label will be determined by the angle at which you draw the lines
- If you make a mistake you can reset the tool by clicking on the 'Reset Label Lines' button
- When you're ready to create the labels click on the 'Create Labels Layer' button
- When labelling use the Maplex labelling engine with the position of the label set to 'Center' and use 'Rotate by attribute' with the rotation field selected and 'Rotation Type' set to 'Arithmetic'.
- Resulting point layers are saved in your scratch workspace. If you want to change your scratch workspace location you'll find it in the 'Environments...' > 'Workspace' under the 'Geoprocessing' menubar. I recommend moving the resulting layers to a more permanent location to avoid losing data.