2

I meet a problem while I try to calculate the length of a polyline in QGIS in the attribute table.

I created a new column with the function "$length" inside (type: real, 10 digits and 3 digits of precision). My projection is WGS84.

My problem is that the result is completely wrong!

For example, I used the measurement tool on the desktop and measured a street: I got 525m. On my attribute table I have 0.007...

I tried to change my projection but I still have the same problem...

Does anyone have an idea to help me ?

closed as off-topic by Mapperz Nov 25 '15 at 16:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Mapperz
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Ok, my bad... It was a projection problem. My data came from OSM so I need to use EPSG3857. Everything is all right now!! Thanks me ;) ... and other posts :D – Yvanou Nov 25 '15 at 15:48
1

The problem comes from the unit of measurement, as specified by the Coordinate Reference System: EPSG:4326 (WGS84 LatLon) uses "degree" as the unit of measurement and the coordinate value. So your length is then also presented in decimal degrees.

When you switch to a metric coordinate system that has meters as units of measurement (as has EPSG:3857), your length measurement will be in meters.

When using EPSG:2967, the UOM will be "feet" :-)

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