I am trying to add labels to my linear feature class. Some of my lines are vertical (i.e. I only see a point representing the start or end node of the line, because they have the same XY coordinates but different Z coordinates).

Unfortunately, it seems ArcMap cannot understand where to place the label (e.g. along the line, before the start, etc.) because the line itself is null (i.e. has 0 (zero) shape length).

The same seems to happen in ArcGIS Pro as well (although in the 3D viewer this problem does not occur, see the image below).

Is there a way to solve this?

enter image description here

  • 1
    It looks like that line with a Length = 0 is considered topologically incorrect. That is why it was excluded from rendering its label. Same behaviour happened in QGIS.
    – ahmadhanb
    Oct 30 '18 at 11:49
  • Is there a way to overcome this issue? Many ilnes I have have to be vertical because they really represent vertical features.
    – umbe1987
    Oct 30 '18 at 11:50
  • as a workaround, you could try to use the midpoint of each line as a source of label
    – radouxju
    Oct 30 '18 at 11:53
  • @radouxju interesting. How? I mean, I don't want to add a point layer to achieve my aim. If you mean there's a setting somewhere in the label manager or similar where I can do this could you please tell me where?
    – umbe1987
    Oct 30 '18 at 11:55
  • 1
    @NULL.Dude Lines to points did not work also, I have tried to convert lines to points (vertices), and for lines with length, I have got the points, but for the line with length = 0, the point was not created.
    – ahmadhanb
    Oct 30 '18 at 12:44

I saw your comment that:

[You] don't want to add a point layer to achieve [your] aim

but if all else fails, then using ArcPy cursors to read the X,Y location of those vertical lines and creating a point feature class to label on should work.


I finally ended up applying a small (1m) shift to the firstPoint coordinate of my vertical lines to be able to see the labels, although this is not the best, I had to avoid ctrating a parallel point layer as I would have had to manage two datasets and the final users (actually accessing the dataset from a web client) would have seen two layers (one for the lines and one for the labelled points) and this is not what I wanted.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.