OmniSciDB  8a228a1076
Geo_namespace Namespace Reference

Namespaces

 anonymous_namespace{geo_types.cpp}
 

Classes

class  GeoBase
 
class  GeoGeometry
 
class  GeoGeometryCollection
 
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 69 of file geo_compression_runtime.h.

Referenced by geospatial::compress_coord().

69  {
70  // compress latitude: -90..90 ---> -2,147,483,647..2,147,483,647
71  int32_t compressed_coord = static_cast<int32_t>(coord * (2147483647.0 / 90.0));
72  return static_cast<uint64_t>(*reinterpret_cast<uint32_t*>(&compressed_coord));
73 }
+ 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 63 of file geo_compression_runtime.h.

Referenced by geospatial::compress_coord().

63  {
64  // compress longitude: -180..180 ---> -2,147,483,647..2,147,483,647
65  int32_t compressed_coord = static_cast<int32_t>(coord * (2147483647.0 / 180.0));
66  return static_cast<uint64_t>(*reinterpret_cast<uint32_t*>(&compressed_coord));
67 }
+ 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 80 of file geo_compression_runtime.h.

Referenced by geospatial::compress_null_point().

80  {
81  // compress null point latitude: NULL ---> -2,147,483,648
82  return 0x0000000080000000ULL;
83 }
+ 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 75 of file geo_compression_runtime.h.

Referenced by geospatial::compress_null_point().

75  {
76  // compress null point longitude: NULL ---> -2,147,483,648
77  return 0x0000000080000000ULL;
78 }
+ 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 47 of file geo_compression_runtime.h.

Referenced by decompress_coord(), geospatial::decompress_geo_coords_geoint32(), and get_bucket_key_for_range_compressed_impl().

47  {
48  // decompress latitude: -2,147,483,647..2,147,483,647 ---> -90..90
49  return static_cast<double>(compressed) *
50  4.1909515877212172e-08; // // (90.0 / 2147483647.0)
51 }
+ 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 41 of file geo_compression_runtime.h.

Referenced by decompress_coord(), geospatial::decompress_geo_coords_geoint32(), and get_bucket_key_for_range_compressed_impl().

41  {
42  // decompress longitude: -2,147,483,647..2,147,483,647 ---> -180..180
43  return static_cast<double>(compressed) *
44  8.3819031754424345e-08; // (180.0 / 2147483647.0)
45 }
+ 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 58 of file geo_compression_runtime.h.

58  {
59  // check compressed null point latitude: -2,147,483,648 ---> NULL
60  return (*reinterpret_cast<const uint32_t*>(&compressed) == 0x80000000U);
61 }

◆ is_null_point_longitude_geoint32()

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

Definition at line 53 of file geo_compression_runtime.h.

Referenced by geospatial::is_null_point().

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