OmniSciDB  04ee39c94c
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 uint64_t compress_longitude_coord_geoint32 (const double coord)
 
DEVICE uint64_t compress_lattitude_coord_geoint32 (const double coord)
 

Function Documentation

◆ compress_lattitude_coord_geoint32()

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

Definition at line 49 of file geo_compression.h.

Referenced by Importer_NS::compress_coord().

49  {
50  // compress latitude: -90..90 ---> -2,147,483,647..2,147,483,647
51  int32_t compressed_coord = static_cast<int32_t>(coord * (2147483647.0 / 90.0));
52  return static_cast<uint64_t>(*reinterpret_cast<uint32_t*>(&compressed_coord));
53 }
+ 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 43 of file geo_compression.h.

Referenced by Importer_NS::compress_coord().

43  {
44  // compress longitude: -180..180 ---> -2,147,483,647..2,147,483,647
45  int32_t compressed_coord = static_cast<int32_t>(coord * (2147483647.0 / 180.0));
46  return static_cast<uint64_t>(*reinterpret_cast<uint32_t*>(&compressed_coord));
47 }
+ 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 37 of file geo_compression.h.

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

37  {
38  // decompress latitude: -2,147,483,647..2,147,483,647 ---> -90..90
39  return static_cast<double>(compressed) *
40  4.1909515877212172e-08; // // (90.0 / 2147483647.0)
41 }
+ 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 31 of file geo_compression.h.

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

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