I am trying to wrap my head around storing attribute values in the most efficient way for a large shapefile (>1 000 000 records). I have found excellent descriptions of data representations in 8-bit, 16-bit as interger vs. float, etc (e.g. https://www3.ntu.edu.sg/home/ehchua/programming/java/datarepresentation.html). But I can't find the equivalencies between QGIS and standard names for those formats. Furthermore, QGIS uses different terms depending on the function to further complicate things.
Does QGIS only support two integer formats : 32-bit and 64-bit? Are real numbers assigned to Float32
or Float64
based on the length and precision?
Formats that I have found as accessed from Properties
and Source fields
with the corresponding options from add field are:
type/type name, selection from add field
double/real,
Decimal number (real)
with less than 10 digits (32-bit?)double/double,
Decimal number (real)
with over 11 digits (64-bit?)int/integer,
Whole number (integer)
(8-bit? 16-bit?)- qlonglong/integer64,
Whole number (integer64)
Raster format has the following options with fairly straight-forward translations between names and data types:
real
values are seen asdouble
.Float32
orFloat64
values are mostly seen in raster formats.