6

I'm calculating field of various features in my shapefile using QGIS.

I'm getting some sample length as 0.134914579766986.

I want to know in what unit (eg: meters, km etc) is the above value ?

  • I think this is a bug. The function description said " The length calculated by this function respects both the current project's ellipsoid setting and distance unit settings". My distance unit setting is "meters". The $length function return degres. My project use UTM 19 NAD83 projection, my shape is geographic (EPSG:4269). So the $length function return result in the shape unit, not in the project unit as specified in the doc. And this bug appears only in labelling. So you can create a column attribute in the shape, use $lentgh for populate all line with the length in meter (divide by 1000 f – Gilles Turgeon Oct 10 '18 at 12:58
  • Welcome to GIS Stack Exchange. Please read the tour to get a sense of the workings of this site. Your post here doesn't provide an answer to the original question but rather to a comment on the original answer. This might get confusing if it is caused by a bug that gets fixed. – Gabriel C. Oct 10 '18 at 13:32
7

This is a measurement of whatever map units are specified in your project properties or CRS.

Check out:

http://hub.qgis.org/wiki/quantum-gis/Getting_Started_with_CRS_and_Projections

OR

Page 9 of http://wiki.osgeo.org/images/3/38/Db_foss_m1.pdf

"To set project properties click "[Settings > Project Properties]" in the main menu. The "Project Properties" window will appear. Click on the "[General]" tab and set Project Title and Map Units."

  • 1
    Funnily enough this doesn't work for the calculator in the Style tab of a layer. My project has CRS EPSG:3857 (units is meters) but my layer has EPSG:4326 (units is degrees). If I make a legend/style for the layer, the units for the $area variable is always in the CRS of the layer, not the Project CRS. – Dolf Andringa Jul 28 '17 at 1:41

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.