2

Some background to explain what I have done, and thus my current question (at the end).

I am trying to find a way to get a list of the distances between sites of a certain class to the nearest site of a different class, along a given road network.

If I use the "Distance to nearest hub (points)" I get a list of distances or with MMQGIS "Hubs/Lines Distance" I get lines to the closest sites, but not along the road. (The two methods also seem to result in slightly different numbers [e.g., 13,684m versus 13,654m])

The Vector Analysis > distance matrix produces a list, but listing every distance, not the shortest, and it also does not allow for usage of the road network.

If I use the QNEAT3 > routing > shortest path (point to point) I get a result that uses the road system, but it outputs a cost for an unknown unit (is it meters/km/time/energy or something else? e.g., "cost on graph" 3040.1860093 or total cost 38338.3270700). However, I have 1465 sites, so I cannot do this one by one.

The OD Matrices produces tables, and the Layers as Lines option allows one to produce a list of sites of one type to another. Thus it appears to do what I need, but I need to interpret the output. It outputs extry cost, network cost, exit cost, and total cost. I cannot find documentation that tells me what unts these numbers represent. (cf description here: https://root676.github.io/OdMatrixAlgs.html) Are they meters?

For example, one site for which the basic hub distance (without the road network) gives a distance of 13,684 meters, and the OD Matrix gives the following costs: entry 1440.8991346 network 88264.5431346 exit 675.5143279 total 90380.9565971

Does anyone know what these numbers represent in either QNEAT3 method?

EDIT: QNEAT3 appears to output in meters. But the issue with the Matrix is it outputs distance to every other site, not just to the closest.

EDIT: Please see the below screenshots: Project CRS enter image description here Output of Least-Cost Path enter image description here Output of measuring tool between same two sites enter image description here

4
  • Using the QGIS measure function, and comparison with Google Map distances, makes me think the units are meters.
    – jsilverman
    Commented Jul 9, 2021 at 10:33
  • Apparently the tables produce all distances, not just the closest
    – jsilverman
    Commented Jul 9, 2021 at 13:02
  • Distances should be in layer units if you select shortest/distance as input. If you choose fastest, I think units are in seconds. So it depends on what setting you do in the plugin and on what CRS you have (check layer and project CRS). Please post a screenshot for what you have to see where the problem is
    – Babel
    Commented Jul 9, 2021 at 14:23
  • I will edit the above post with these screen shots: CRS of the project, the output of the shortest-path QNEAT3 between two sites, and the output of the measuring tool in meters
    – jsilverman
    Commented Jul 12, 2021 at 10:28

1 Answer 1

2

QNEAT3-plugin's OD Matrices outputs meters for the network-distance. It outputs layer-units for entry-/exit-cost: that is the distance from the point to the nearest point on the network, thus connecting the points to the network if they are not snapped to it.

In the dialog under advanced parameters, you can choose how entry cost is calculated: ellipsoidal (returns meters) or planar (returns layer units). I produced a network plus two point layers, all in CRS EPSG:4326 (units: degrees) and project CRS in the same EPSG:4326. With option set to planar (highlighte in the screenshot), you get the output in the left table: units in degrees, that does not make sense. Setting it to ellipsoidal, you get the output of the right table. Network cost is the same in both cases.

So you should not only differentiate between units (meters, km, feet, degrees etc.), but also between different measurement methods: planar = measuring on a flat, projected map canvas vs. ellipsoidal = measuring on the surface of a spheroid. The last one normally is more accurate/realistic. For short distances, depending on the CRS, the difference can be ignored.

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.