1

I created a line by importing a delimited CSV file and the line appears fine. I can add a label on the line by using the "begin" or "end" attributes but not the "Name" attribute. It is not showing a label. So I assume the value of "Name" is somehow blank although I have it defined in the CSV file:

csv

I define the value as "Name" on the Layer Properties/Label tab:

enter image description here

Is there a way of looking at the attribute values after the import?

After fixing the CSV import file, I get:

enter image description here

I think Stu Smith is right that I was labeling the points and not the line. But how do I do that when the there is no attribute on the line style:

enter image description here

  • 5
    I see two fields having the name Name. The first field contains p1 and p2, and the second field contains Topic 1 and Topic 2. Change one of the field names to a different name, and confirm if the issue still exists. – ahmadhanb Oct 19 at 1:12
  • Did you check the checkbox to show all labels? – TwoPunchMan Oct 19 at 1:19
  • Both are great insights! I didn't notice the duplicate Name column. I will fix that! Also where is the checkbox to show all labels? – bdelliott Oct 19 at 14:51
  • Okay. I changed the CSV file so I don't have duplicate column names and got the labels to appear on the line but it is at the ends (probably due to my CSV having two label names). But is there a way to just have one label in the middle of the line. I used the Points to Path feature to create the line. See image in original posting. – bdelliott Oct 19 at 15:06
  • 1
    Looks to me like you're labeling the point layer, not the line layer. – Stu Smith Oct 19 at 15:16
0

I was able to label the points fine from the functionality provided but I figured it out the part about labeling a line! The trick is not to use the Points to Path plugin but simply "Add Delimited Text Layer" and then turn on the Labels from the Layers Style menu. This posting proves the first part: QGIS How to draw lines from two points in a CSV? QGIS How to draw lines from two points in a CSV?

| improve this answer | |

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.