[GIS] How to display distance in meters (km) and not in Decimal Degrees in QGIS 2.4

coordinate systemparametersqgisutm

I am a GIS beginner, and I have a question about how to get the distance between two points in meters instead of decimal degree.

In QGIS 2.4 I have a project with two point layers (in WGS84). From both layers I used I wanted to have the distance in meters between the two closest point between the layers. So what I did: Vector -> analyse tools -> distance Matrix, ticked the box "only nearest (k) target points: 1". This created a CSV file with all the distances, but in the wrong units.

So I looked it up on the internet and I found out two things:

  • I have to set my CRV in a projected coordinate system (like a UTM zone).
  • And I have to tick or untick the box with "on the fly" –> which I cannot find in QGIS2.4 Project –> project setting –> CRS.

I tried the first option. I tried to set the layers in UTM 29 ZONE IRENET95, EPSG: 2158 by "save as" –> add new vector layer. It still gives the distance in the wrong units. My project only contains point in southwest Ireland, so that is why I picked this projection. Or should I project it in a different projection?

I also tried to find a converter to convert the decimal degree outcome to meters, but I did not find any. I guess there is none. Am I right?

For me it seems like there must me an easy solution, but I did not manage to find one. I think I am doing something wrong with setting the layers in a different projection.

Best Answer

On the fly transform:

  1. Click the CRS status button on the lower right corner of the window.
  2. Tick the "Enable 'on the fly' CRS transformation" dialogue box.
  3. Select your desired projection and click Apply.

On the fly projection

Result:

On the fly projection

Reproject layer:

Right click on layer -> "Save as..." -> CRS: Selected CRS -> Then select your CRS from the list.

I recommend on the fly transformations, because repeated physical reprojections can lower the accuracy of your geometry. To answer @zimmi's question, this phenomenon will likely occur, when you transform very different projections and the transformation algorithm can't translate the coordinates precisely and can only give an approximate result (the result of the equation is not finite, so the algorithm has to round the transformed coordinates).

See an example of an extreme difference below (EPSG:4326 - EPSG:2158 - EPSG:4326):

Extreme reprojection error

Note that the UTM 29N projection can't describe the problematic areas properly and I only used it for the sake of the extreme example. The normal loss in accuracy is only ~1 mm after two sets of transformations (EPSG:23700 - EPSG:4326 - EPSG:23700 - EPSG:4326 - EPSG:23700):

Normal reprojection error