3

I work with this line layer:

enter image description here

The label is placed in the middle and i seek for a way to place it in the start\ end of the line. I search for that option in the placement tab in the properties but with no results.

I know that when i pan the map the label jump for the best location, but still i need to place the label in the start\ end of the line.

I try to find an option similar to the simple function in the ArcGIS:

enter image description here

0

1 Answer 1

5

Not sure if you need to update to QGIS 2.16 for this workflow:

  • in the attribute table, start the field calculator
  • create a virtual field x_start of type double, precision 5 with $x_at(0) as value
  • create a virtual field y_start of type double, precision 5 with $y_at(0) as value
  • in the Layer Styling, Label tab, Placement tab, Go to the Data defined section
  • for Coordinate X, select field x_start
  • for Coordinate Y, select field y_start

The result looks like this:

enter image description here

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