OmniSciDB  ab4938a6a3
Geo_namespace Namespace Reference

Classes

class  GeoBase
 
class  GeoLineString
 
class  GeoMultiPolygon
 
class  GeoPoint
 
class  GeoPolygon
 
class  GeoTypesError
 
class  GeoTypesFactory
 

Functions

DEVICE double decompress_longitude_coord_geoint32 (const int32_t compressed)
 
DEVICE double decompress_lattitude_coord_geoint32 (const int32_t compressed)
 
DEVICE bool is_null_point_longitude_geoint32 (const int32_t compressed)
 
DEVICE bool is_null_point_lattitude_geoint32 (const int32_t compressed)
 
DEVICE uint64_t compress_longitude_coord_geoint32 (const double coord)
 
DEVICE uint64_t compress_lattitude_coord_geoint32 (const double coord)
 
DEVICE constexpr uint64_t compress_null_point_longitude_geoint32 ()
 
DEVICE constexpr uint64_t compress_null_point_lattitude_geoint32 ()
 

Function Documentation

◆ compress_lattitude_coord_geoint32()

DEVICE uint64_t Geo_namespace::compress_lattitude_coord_geoint32 ( const double  coord)
inline

Definition at line 60 of file geo_compression_runtime.h.

Referenced by geospatial::compress_coord().

60  {
61  // compress latitude: -90..90 ---> -2,147,483,647..2,147,483,647
62  int32_t compressed_coord = static_cast<int32_t>(coord * (2147483647.0 / 90.0));
63  return static_cast<uint64_t>(*reinterpret_cast<uint32_t*>(&compressed_coord));
64 }
+ Here is the caller graph for this function:

◆ compress_longitude_coord_geoint32()

DEVICE uint64_t Geo_namespace::compress_longitude_coord_geoint32 ( const double  coord)
inline

Definition at line 54 of file geo_compression_runtime.h.

Referenced by geospatial::compress_coord().

54  {
55  // compress longitude: -180..180 ---> -2,147,483,647..2,147,483,647
56  int32_t compressed_coord = static_cast<int32_t>(coord * (2147483647.0 / 180.0));
57  return static_cast<uint64_t>(*reinterpret_cast<uint32_t*>(&compressed_coord));
58 }
+ Here is the caller graph for this function:

◆ compress_null_point_lattitude_geoint32()

DEVICE constexpr uint64_t Geo_namespace::compress_null_point_lattitude_geoint32 ( )

Definition at line 71 of file geo_compression_runtime.h.

Referenced by geospatial::compress_null_point().

71  {
72  // compress null point latitude: NULL ---> -2,147,483,648
73  return 0x0000000080000000ULL;
74 }
+ Here is the caller graph for this function:

◆ compress_null_point_longitude_geoint32()

DEVICE constexpr uint64_t Geo_namespace::compress_null_point_longitude_geoint32 ( )

Definition at line 66 of file geo_compression_runtime.h.

Referenced by geospatial::compress_null_point().

66  {
67  // compress null point longitude: NULL ---> -2,147,483,648
68  return 0x0000000080000000ULL;
69 }
+ Here is the caller graph for this function:

◆ decompress_lattitude_coord_geoint32()

DEVICE double Geo_namespace::decompress_lattitude_coord_geoint32 ( const int32_t  compressed)
inline

Definition at line 38 of file geo_compression_runtime.h.

Referenced by decompress_coord(), anonymous_namespace{ResultSetGeoSerialization.h}::decompress_geo_coords_geoint32(), and get_bucket_key_for_range_compressed_impl().

38  {
39  // decompress latitude: -2,147,483,647..2,147,483,647 ---> -90..90
40  return static_cast<double>(compressed) *
41  4.1909515877212172e-08; // // (90.0 / 2147483647.0)
42 }
+ Here is the caller graph for this function:

◆ decompress_longitude_coord_geoint32()

DEVICE double Geo_namespace::decompress_longitude_coord_geoint32 ( const int32_t  compressed)
inline

Definition at line 32 of file geo_compression_runtime.h.

Referenced by decompress_coord(), anonymous_namespace{ResultSetGeoSerialization.h}::decompress_geo_coords_geoint32(), and get_bucket_key_for_range_compressed_impl().

32  {
33  // decompress longitude: -2,147,483,647..2,147,483,647 ---> -180..180
34  return static_cast<double>(compressed) *
35  8.3819031754424345e-08; // (180.0 / 2147483647.0)
36 }
+ Here is the caller graph for this function:

◆ is_null_point_lattitude_geoint32()

DEVICE bool Geo_namespace::is_null_point_lattitude_geoint32 ( const int32_t  compressed)
inline

Definition at line 49 of file geo_compression_runtime.h.

49  {
50  // check compressed null point latitude: -2,147,483,648 ---> NULL
51  return (*reinterpret_cast<const uint32_t*>(&compressed) == 0x80000000U);
52 }

◆ is_null_point_longitude_geoint32()

DEVICE bool Geo_namespace::is_null_point_longitude_geoint32 ( const int32_t  compressed)
inline

Definition at line 44 of file geo_compression_runtime.h.

Referenced by anonymous_namespace{ResultSetGeoSerialization.h}::is_null_point().

44  {
45  // check compressed null point longitude: -2,147,483,648 ---> NULL
46  return (*reinterpret_cast<const uint32_t*>(&compressed) == 0x80000000U);
47 }
+ Here is the caller graph for this function: