Skip to content

Commit 8be1f93

Browse files
committed
docs: more datatype updates
- fix: INT2U max value in table - update notes: - NaN for float types - large unsigned integers and decimal precision - minimum required GDAL version for INT8U, INT8S, INT1S
1 parent bbdf468 commit 8be1f93

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

man/datatype.Rd

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The following raster datatypes are available:
3535
\tabular{lll}{
3636
\bold{Datatype definition} \tab \bold{minimum possible value} \tab \bold{maximum possible value} \cr
3737
\code{INT1U} \tab 0 \tab 255 \cr
38-
\code{INT2U} \tab 0 \tab 65,534 \cr
38+
\code{INT2U} \tab 0 \tab 65,535 \cr
3939
\code{INT4U} \tab 0 \tab 4,294,967,296 \cr
4040
\code{INT8U} \tab 0 \tab 18,446,744,073,709,551,616\cr
4141
\code{INT1S} \tab -128 \tab 128 \cr
@@ -46,13 +46,16 @@ The following raster datatypes are available:
4646
\code{FLT8S} \tab -1.7e+308 \tab 1.7e+308 \cr
4747
}
4848

49-
For all integer and byte types the lowest (signed) or highest (unsigned) value is used to store \code{NA}.
49+
For all integer and byte types the lowest (signed) or highest (unsigned) value is used to store \code{NA}. For float types \code{NaN} is used (following the IEEE 754 standard).
5050

51-
Note that very large integer numbers may be imprecise as they are internally represented as decimal numbers.
51+
Note that very large integer numbers may be imprecise as they are internally represented as decimal numbers.
5252

53-
\code{INT4U} is available but they are best avoided as R does not support 32-bit unsigned integers.
53+
Also note that \code{NaN} may not be equally supported by all implementations. For example OGR SQL and SQLite queries generally convert \code{NaN} values to \code{NULL}.
54+
55+
\code{INT4U} and \code{INT8U} are available but they are best avoided as R does not support 32-bit or 64-bit unsigned integers. \code{INT8U} is a special case where the NA store value is \code{18446744073709549568} (\code{UINT64_MAX - 1101}) because of precision in decimal representation.
56+
57+
\code{INT8U} and \code{INT8S} require GDAL version 3.5 or higher. \code{INT1S} requires GDAL version 3.7 or higher.
5458

55-
\code{INT1S} requires GDAL version 3.7 or higher.
5659
}
5760

5861

0 commit comments

Comments
 (0)