1

Is there an easy way to "inspect" the nodes that make up a line?

I am interested to see what node is the 1st, 2nd and so on along with their coordinates. Preferably in a list or something for a selected feature that is not in edit mode. I know I can add a marker to display the direction a line is digitilized at, but I am looking for the individual nodes.

I use another GIS program too that can do it very nicely (Intergraph), looking for a similar tool/method for QGIS.

2
  • 1
    I suppose you wouldn't want to use the extract vertices tool?
    – Erik
    Commented Apr 29, 2020 at 13:30
  • Preferably not as it would be very useful to do it "on the fly" or adhoc.
    – geogrow
    Commented Apr 29, 2020 at 15:11

2 Answers 2

3

I think you are looking for Vertex Editor (a table of coordinates of vertices).

  1. make your layer editable
  2. select the Vertex Tool, the Vertext editor panel is displayed
  3. right click on a feature to get the list of coordinates
  4. you can select a point in the vertext editor clicking on the ID, and the correspondent point on the canvas is also marked (blue circle)
  5. you can even edit the coordinates, add and delete nodes...

Here is a screen shot:

enter image description here

UPDATE

Simple solution to list the coordinates without set it to editable. To list the coordinates of the first selected feature on the active layer enter the following Python command into the Python console of QGIS:

iface.activeLayer().selectedFeatures()[0].geometry()

enter image description here

If you need prettier output, you should extend the single line Python code to a plug-in.

2
  • Would be great if this feature also worked without making the layer editable, because some layers "I need" to use is not editable. But this is essentially what I am looking for. Thank you!
    – geogrow
    Commented Apr 29, 2020 at 15:12
  • I've added a very-very simple solution without GUI, to see the coordinates.
    – Zoltan
    Commented Apr 29, 2020 at 17:47
3

A fast way to show the nodes of a selected line is to use the Geometry generator and to create a second multipoint symbol with the expression

if(is_selected( ), nodes_to_points($geometry),'')

enter image description here

Also, using the expression

if(is_selected( ), to_string(geom_to_wkt(nodes_to_points($geometry))),'')

you can create a label that contains all the coordinates of the nodes of the selected line. Activating the option Wrap on character and using the comma as separator, you can create an easy-to-read list.

In the picture an example.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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