Skip to content

Commit 59fd22a

Browse files
authored
Merge pull request #1995 from brownag/doc-int1s
docs: datatype INT1S and NA flags
2 parents fd2f40e + 8be1f93 commit 59fd22a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

man/datatype.Rd

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,27 @@ 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
41+
\code{INT1S} \tab -128 \tab 128 \cr
4142
\code{INT2S} \tab -32,767\tab 32,767 \cr
4243
\code{INT4S} \tab -2,147,483,647 \tab 2,147,483,647 \cr
4344
\code{INT8S} \tab -9,223,372,036,854,775,808 \tab 9,223,372,036,854,775,808 \cr
4445
\code{FLT4S} \tab -3.4e+38 \tab 3.4e+38 \cr
4546
\code{FLT8S} \tab -1.7e+308 \tab 1.7e+308 \cr
4647
}
4748

48-
For all integer types, except the single 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).
4950

50-
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.
52+
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.
5158

52-
\code{INT4U} is available but they are best avoided as R does not support 32-bit unsigned integers.
5359
}
5460

5561

0 commit comments

Comments
 (0)