5

This question follows from $area gives NULL for some polygons in QGIS's Field Calculator. New question asks the same question as to why some area variables appear NULL. But the problem was resolved for one layer but not the other.

All $areas are found except for the polygon in the screenshot. The larger polygon and smaller polygon are over-wrapped but are separate entries. Area for smaller entry is found but not the bigger one. I tried fixing geometries but it does not help. Please let me know how I can proceed.

I am using the layer, all economic concessions (English) from the link: https://data.opendevelopmentcambodia.net/dataset/economiclandconcessions

enter image description here

Uditha Herath
  • 703
  • 5
  • 16
JessicaP
  • 173
  • 11

1 Answers1

4

Short Answer

since the $area calculated exceeding the value of the displayable limit of the whole number integer with in field calculator please use output field type as whole number integer 64 bit with maximum output field length of 21

(whole number integer 64 bit and 21 field size is a must)

Long Answer

Please refer the previous answer HERE for the CRS Change and all up to step 4

  1. go to the Attribute Table of the newly created shapefile
  2. Go to Field Calculator
  3. And enter $area in the Expression Field while giving a name to the column with data type whole number integer 64 bit (whole number integer 64 bit and 21 field size is a must)
  4. then give the output field length as 21 (maximum possible)

enter image description here

  1. and click ok
  2. your attribute table should look like this

enter image description here

again as previous areas with unknown geometry will not display any area

enter image description here

Uditha Herath
  • 703
  • 5
  • 16
  • 1
    or create a float number field, as it's country areas, just divide the area by 1 000 000 to have square kilometers : round($area / 1000000, 2). – J. Monticolo Jan 26 '21 at 14:11
  • 1
    @J.Monticolo yes, this is also can be done. with this we can go with whole number integer as well. – Uditha Herath Jan 26 '21 at 14:23