Feature request #2402

Field calculator can't fill fields with areas in units differ from layer measurements untits

Added by dr - about 14 years ago. Updated about 8 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Vectors
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:12462

Description

I'm trying to create new field with field calculator and fill it with area of features. But I can't use units differ from layer units.

If set 'Enable on the fly CRS transformation' and choose Settings -> Options -> Map tools and set 'Preferred measurements units' to Meters then using Identify Features tool it is possible to get areas of features in square meters.

It will be great to realise such function in Fields Calculator.


Related issues

Related to QGIS Application - Feature request #10170: Calculations should use the project's CRS, not the layer's Open 2014-05-04
Related to QGIS Application - Feature request #12939: make the field calculator compute areas and lengths in un... Closed 2015-06-11

Associated revisions

Revision ddbdcf8a
Added by Nyall Dawson about 8 years ago

Fix project unit confusion (pt 2): add project distance unit setting

Adds a new option in project properties to set the units used for
distance measurements. This setting defaults to the units set in
QGIS options, but can then be overridden for specific projects.

The setting is respected for length and perimeter calculations in:
- Attribute table field update bar
- Field calculator calculations
- Identify tool derived length and perimeter values
- Default unit shown in measure dialog

Also adds unit tests to ensure that length and perimeter calculated
by attribute table update bar, field calculator and identify tool
are consistent wrt ellipsoidal calculations and distance units.

(refs #13209, #12939, #2402, #4857, #4252)

Revision dfdcec89
Added by Nyall Dawson about 8 years ago

Fix project unit confusion (pt 3): add area unit settings with a
ton of available area units (eg m2, km2, mi2, ft2, yd2, ha, ac,
etc)

Adds a new option in both the QGIS setting and project properties to
set the units used for area measurements. Just like the distance
setting, this defaults to the units set in QGIS options, but can
then be overridden for specific projects.

The setting is respected for area calculations in:
- Attribute table field update bar
- Field calculator calculations
- Identify tool derived length and perimeter values

Also adds unit tests to ensure that area calculated by attribute table
update bar, field calculator and identify tool are consistent wrt
ellipsoidal calculations and area units.

TODO: make measure tool respect area setting

(refs #13209, #4252 and fixes #12939, #2402, #4857)

History

#1 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#2 Updated by Giovanni Manghi almost 12 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#3 Updated by Magnus Homann over 11 years ago

  • Pull Request or Patch supplied set to No
  • Assignee changed from nobody - to Magnus Homann

#4 Updated by Pirmin Kalberer over 11 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#5 Updated by Giovanni Manghi almost 10 years ago

  • Assignee deleted (Magnus Homann)
  • Operating System deleted (All)
  • Status info deleted (0)

#6 Updated by Nyall Dawson about 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF