26 #include "../Shared/funcannotations.h"
28 #define COMPRESSION_NONE 0
29 #define COMPRESSION_GEOINT32 1
30 #define COMPRESSION_GEOBBINT32 2
31 #define COMPRESSION_GEOBBINT16 3
32 #define COMPRESSION_GEOBBINT8 4
34 #define TOLERANCE_DEFAULT 0.000000001
35 #define TOLERANCE_DEFAULT_SQUARED 0.000000000000000001
36 #define TOLERANCE_GEOINT32 0.0000001
38 namespace Geospatial {
42 return static_cast<double>(compressed) *
43 8.3819031754424345e-08;
48 return static_cast<double>(compressed) *
49 4.1909515877212172e-08;
54 return (*reinterpret_cast<const uint32_t*>(&compressed) == 0x80000000U);
59 return (*reinterpret_cast<const uint32_t*>(&compressed) == 0x80000000U);
64 int32_t
compressed_coord =
static_cast<int32_t
>(coord * (2147483647.0 / 180.0));
65 return static_cast<uint64_t
>(*
reinterpret_cast<uint32_t*
>(&
compressed_coord));
70 int32_t
compressed_coord =
static_cast<int32_t
>(coord * (2147483647.0 / 90.0));
71 return static_cast<uint64_t
>(*
reinterpret_cast<uint32_t*
>(&
compressed_coord));
76 return 0x0000000080000000ULL;
81 return 0x0000000080000000ULL;
DEVICE double decompress_latitude_coord_geoint32(const int32_t compressed)
DEVICE uint64_t compress_longitude_coord_geoint32(const double coord)
DEVICE ALWAYS_INLINE int32_t compressed_coord(const int8_t *data, const int32_t index)
DEVICE ALWAYS_INLINE Point2D coord(const int8_t *data, const int32_t x_index, const int32_t ic, const int32_t isr, const int32_t osr)
DEVICE bool is_null_point_longitude_geoint32(const int32_t compressed)
DEVICE uint64_t compress_latitude_coord_geoint32(const double coord)
DEVICE constexpr uint64_t compress_null_point_latitude_geoint32()
DEVICE double decompress_longitude_coord_geoint32(const int32_t compressed)
DEVICE constexpr uint64_t compress_null_point_longitude_geoint32()
DEVICE bool is_null_point_latitude_geoint32(const int32_t compressed)