1

I have a GIS with a logistics layer that contains line features. The lines have been digitised from aerial photography and each line represents a path from A to B, following roads, rail and waterways.

My goal is to write the real world distance along each path to a column within the attribute table.

So far I have tried using:

[Toolbox > Vector geometry > Add geometry attributes] Add Geometry Attributes

The results are as follows: Results

My result of 16.5 is confusing, because the actual distance in this case is about 1650km. I followed a tutorial to do this and their results were in metres, so I guess my questions are:

  1. Is my result in degrees or some other units?
  2. Is there a better way to get the ellipsoidal distance along each line into the attribute table?

(Edited to note I am using QGIS 3.10)

  • 1
    Area & length calculation in QGIS cares about the layer CRS. And your layer is in EPSG 4326 - thus, your results are in degree. Try to find a CRS fitting your AOI which is based on m. – Erik Jan 28 at 10:16
1

Under "Project Properties > General"

Set the ellipsoid to WGS84 and units to km. enter image description here

Then use "Attribute Table > Field Calculator" enter image description here

The $length function can then be used to update a distance column correctly as it respects the current project's ellipsoid and distance unit settings.

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.