OmniSciDB
a5dc49c757
|
#include "../Shared/funcannotations.h"
#include <cstdint>
#include <cmath>
#include <cstdlib>
#include "heavydbTypes.h"
#include "ExtensionFunctionsArray.hpp"
#include "ExtensionFunctionsArrayTesting.hpp"
#include "ExtensionFunctionsGeo.hpp"
#include "ExtensionFunctionsTesting.hpp"
#include "ExtensionFunctionsText.hpp"
#include "ExtensionFunctionsTextTesting.hpp"
#include "QueryEngine/ExtensionFunctions/h3lib/include/h3Index.h"
Go to the source code of this file.
Functions | |
EXTENSION_NOINLINE double | Acos (const double x) |
EXTENSION_NOINLINE double | Asin (const double x) |
EXTENSION_NOINLINE double | Atan (const double x) |
EXTENSION_NOINLINE double | Atanh (const double x) |
EXTENSION_NOINLINE double | Atan2 (const double y, const double x) |
EXTENSION_NOINLINE double | Ceil (double x) |
EXTENSION_NOINLINE float | Ceil__ (float x) |
EXTENSION_NOINLINE int16_t | Ceil__1 (int16_t x) |
EXTENSION_NOINLINE int32_t | Ceil__2 (int32_t x) |
EXTENSION_NOINLINE int64_t | Ceil__3 (int64_t x) |
EXTENSION_NOINLINE double | Cos (const double x) |
EXTENSION_NOINLINE double | Cosh (const double x) |
EXTENSION_NOINLINE double | Cot (const double x) |
EXTENSION_NOINLINE double | degrees (double x) |
EXTENSION_NOINLINE double | Exp (double x) |
EXTENSION_NOINLINE double | Floor (double x) |
EXTENSION_NOINLINE float | Floor__ (float x) |
EXTENSION_NOINLINE int16_t | Floor__1 (int16_t x) |
EXTENSION_NOINLINE int32_t | Floor__2 (int32_t x) |
EXTENSION_NOINLINE int64_t | Floor__3 (int64_t x) |
EXTENSION_NOINLINE double | ln (const double x) |
EXTENSION_NOINLINE double | ln__ (const float x) |
EXTENSION_NOINLINE double | Log (const double x) |
EXTENSION_NOINLINE double | Log__ (const float x) |
EXTENSION_NOINLINE double | Log10 (const double x) |
EXTENSION_NOINLINE double | Log10__ (const float x) |
EXTENSION_NOINLINE double | pi () |
EXTENSION_NOINLINE double | power (const double x, const double y) |
EXTENSION_NOINLINE double | radians (const double x) |
EXTENSION_NOINLINE double | Round (const double x, const int32_t y) |
EXTENSION_NOINLINE float | Round__ (const float x, const int32_t y) |
EXTENSION_NOINLINE int16_t | Round__1 (const int16_t x, const int32_t y) |
EXTENSION_NOINLINE int32_t | Round__2 (const int32_t x, const int32_t y) |
EXTENSION_NOINLINE int64_t | Round__3 (const int64_t x, const int32_t y) |
EXTENSION_NOINLINE int64_t | Round__4 (const int64_t x, const int32_t y0, const int32_t scale) |
EXTENSION_NOINLINE double | Round2_to_digit (const double x, const int32_t y) |
EXTENSION_NOINLINE double | round_to_digit (const double x, const int32_t y) |
EXTENSION_NOINLINE double | Sin (const double x) |
EXTENSION_NOINLINE double | Sinh (const double x) |
EXTENSION_NOINLINE double | Sqrt (const double x) |
EXTENSION_NOINLINE double | Tan (const double x) |
EXTENSION_NOINLINE double | Tanh (const double x) |
EXTENSION_NOINLINE double | Tan__ (const float x) |
EXTENSION_NOINLINE double | Truncate (const double x, const int32_t y) |
EXTENSION_NOINLINE float | Truncate__ (const float x, const int32_t y) |
EXTENSION_NOINLINE int16_t | Truncate__1 (const int16_t x, const int32_t y) |
EXTENSION_NOINLINE int32_t | Truncate__2 (const int32_t x, const int32_t y) |
EXTENSION_NOINLINE int64_t | Truncate__3 (const int64_t x, const int32_t y) |
EXTENSION_NOINLINE bool | is_nan (const double x) |
EXTENSION_NOINLINE bool | is_nan__ (const float x) |
EXTENSION_NOINLINE bool | is_inf (const double x) |
EXTENSION_NOINLINE bool | is_inf__ (const float x) |
EXTENSION_NOINLINE double | conv_4326_900913_x (const double x) |
EXTENSION_NOINLINE double | conv_4326_900913_y (const double y) |
EXTENSION_NOINLINE double | distance_in_meters (const double fromlon, const double fromlat, const double tolon, const double tolat) |
Computes the distance, in meters, between two WGS-84 positions. More... | |
EXTENSION_NOINLINE double | distance_in_meters__ (const float fromlon, const float fromlat, const float tolon, const float tolat) |
EXTENSION_NOINLINE double | approx_distance_in_meters (const float fromlon, const float fromlat, const float tolon, const float tolat) |
EXTENSION_NOINLINE float | rect_pixel_bin (const double val, const double min, const double max, const int32_t numbins, const int32_t dimensionsize) |
EXTENSION_NOINLINE float | rect_pixel_bin_x (const double valx, const double minx, const double maxx, const double rectwidth, const double offsetx, const int32_t imgwidth) |
EXTENSION_NOINLINE float | rect_pixel_bin_y (const double valy, const double miny, const double maxy, const double rectheight, const double offsety, const int32_t imgheight) |
EXTENSION_NOINLINE int32_t | rect_pixel_bin_packed (const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double rectwidth, const double rectheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight) |
EXTENSION_NOINLINE float | reg_hex_horiz_pixel_bin_x (const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight) |
EXTENSION_NOINLINE float | reg_hex_horiz_pixel_bin_y (const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight) |
EXTENSION_NOINLINE int32_t | reg_hex_horiz_pixel_bin_packed (const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight) |
EXTENSION_NOINLINE float | reg_hex_vert_pixel_bin_x (const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight) |
EXTENSION_NOINLINE float | reg_hex_vert_pixel_bin_y (const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight) |
EXTENSION_NOINLINE int32_t | reg_hex_vert_pixel_bin_packed (const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight) |
EXTENSION_NOINLINE double | convert_meters_to_merc_pixel_width (const double meters, const double lon, const double lat, const double min_lon, const double max_lon, const int32_t img_width, const double min_width) |
EXTENSION_NOINLINE double | convert_meters_to_merc_pixel_height (const double meters, const double lon, const double lat, const double min_lat, const double max_lat, const int32_t img_height, const double min_height) |
EXTENSION_INLINE bool | is_point_in_merc_view (const double lon, const double lat, const double min_lon, const double max_lon, const double min_lat, const double max_lat) |
EXTENSION_NOINLINE bool | is_point_size_in_merc_view (const double lon, const double lat, const double meters, const double min_lon, const double max_lon, const double min_lat, const double max_lat) |
EXTENSION_NOINLINE double Acos | ( | const double | x | ) |
Definition at line 42 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double approx_distance_in_meters | ( | const float | fromlon, |
const float | fromlat, | ||
const float | tolon, | ||
const float | tolat | ||
) |
Definition at line 465 of file ExtensionFunctions.hpp.
References distance_in_meters__().
EXTENSION_NOINLINE double Asin | ( | const double | x | ) |
Definition at line 47 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Atan | ( | const double | x | ) |
Definition at line 52 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Atan2 | ( | const double | y, |
const double | x | ||
) |
Definition at line 62 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Atanh | ( | const double | x | ) |
Definition at line 57 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Ceil | ( | double | x | ) |
Definition at line 67 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE float Ceil__ | ( | float | x | ) |
Definition at line 72 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int16_t Ceil__1 | ( | int16_t | x | ) |
Definition at line 77 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int32_t Ceil__2 | ( | int32_t | x | ) |
Definition at line 82 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int64_t Ceil__3 | ( | int64_t | x | ) |
Definition at line 87 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double conv_4326_900913_x | ( | const double | x | ) |
Definition at line 402 of file ExtensionFunctions.hpp.
Referenced by conv_4326_900913(), convert_meters_to_merc_pixel_width(), and import_export::RasterImporter::getProjectedPixelCoords().
EXTENSION_NOINLINE double conv_4326_900913_y | ( | const double | y | ) |
Definition at line 407 of file ExtensionFunctions.hpp.
Referenced by conv_4326_900913(), convert_meters_to_merc_pixel_height(), and import_export::RasterImporter::getProjectedPixelCoords().
EXTENSION_NOINLINE double convert_meters_to_merc_pixel_height | ( | const double | meters, |
const double | lon, | ||
const double | lat, | ||
const double | min_lat, | ||
const double | max_lat, | ||
const int32_t | img_height, | ||
const double | min_height | ||
) |
Definition at line 1086 of file ExtensionFunctions.hpp.
References conv_4326_900913_y().
EXTENSION_NOINLINE double convert_meters_to_merc_pixel_width | ( | const double | meters, |
const double | lon, | ||
const double | lat, | ||
const double | min_lon, | ||
const double | max_lon, | ||
const int32_t | img_width, | ||
const double | min_width | ||
) |
Definition at line 1060 of file ExtensionFunctions.hpp.
References conv_4326_900913_x().
EXTENSION_NOINLINE double Cos | ( | const double | x | ) |
Definition at line 92 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Cosh | ( | const double | x | ) |
Definition at line 97 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Cot | ( | const double | x | ) |
Definition at line 102 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double degrees | ( | double | x | ) |
Definition at line 107 of file ExtensionFunctions.hpp.
References M_PI.
Referenced by degsToRads().
EXTENSION_NOINLINE double distance_in_meters | ( | const double | fromlon, |
const double | fromlat, | ||
const double | tolon, | ||
const double | tolat | ||
) |
Computes the distance, in meters, between two WGS-84 positions.
The result is equal to EARTH_RADIUS_IN_METERS*ArcInRadians(from,to)
ArcInRadians is equal to Distance(from,to)/EARTH_RADIUS_IN_METERS
= 2*asin(sqrt(h(d/EARTH_RADIUS_IN_METERS )))
where:
h(x)=sin²(x/2)
code attribution: http://blog.julien.cayzac.name/2008/10/arc-and-distance-between-two-points-on.html
The haversine formula gives: h(d/R) = h(from.lat-to.lat)+h(from.lon-to.lon)+cos(from.lat)*cos(to.lat)
Definition at line 433 of file ExtensionFunctions.hpp.
Referenced by GeoRaster< T, Z >::calculate_bins_and_scales(), length_linestring(), ST_Distance_Point_LineString_Geodesic(), and ST_Distance_Point_Point_Geodesic().
EXTENSION_NOINLINE double distance_in_meters__ | ( | const float | fromlon, |
const float | fromlat, | ||
const float | tolon, | ||
const float | tolat | ||
) |
Definition at line 449 of file ExtensionFunctions.hpp.
Referenced by approx_distance_in_meters().
EXTENSION_NOINLINE double Exp | ( | double | x | ) |
Definition at line 112 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Floor | ( | double | x | ) |
Definition at line 117 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE float Floor__ | ( | float | x | ) |
Definition at line 122 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int16_t Floor__1 | ( | int16_t | x | ) |
Definition at line 127 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int32_t Floor__2 | ( | int32_t | x | ) |
Definition at line 132 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int64_t Floor__3 | ( | int64_t | x | ) |
Definition at line 137 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE bool is_inf | ( | const double | x | ) |
Definition at line 392 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE bool is_inf__ | ( | const float | x | ) |
Definition at line 397 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE bool is_nan | ( | const double | x | ) |
Definition at line 382 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE bool is_nan__ | ( | const float | x | ) |
Definition at line 387 of file ExtensionFunctions.hpp.
EXTENSION_INLINE bool is_point_in_merc_view | ( | const double | lon, |
const double | lat, | ||
const double | min_lon, | ||
const double | max_lon, | ||
const double | min_lat, | ||
const double | max_lat | ||
) |
Definition at line 1111 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE bool is_point_size_in_merc_view | ( | const double | lon, |
const double | lat, | ||
const double | meters, | ||
const double | min_lon, | ||
const double | max_lon, | ||
const double | min_lat, | ||
const double | max_lat | ||
) |
Definition at line 1120 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double ln | ( | const double | x | ) |
Definition at line 142 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double ln__ | ( | const float | x | ) |
Definition at line 147 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Log | ( | const double | x | ) |
Definition at line 152 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Log10 | ( | const double | x | ) |
Definition at line 162 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Log10__ | ( | const float | x | ) |
Definition at line 167 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Log__ | ( | const float | x | ) |
Definition at line 157 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double pi | ( | ) |
Definition at line 172 of file ExtensionFunctions.hpp.
References M_PI.
Referenced by geotransform_4326_to_900913().
EXTENSION_NOINLINE double power | ( | const double | x, |
const double | y | ||
) |
Definition at line 177 of file ExtensionFunctions.hpp.
Referenced by anonymous_namespace{misc.h}::inversePowersOfImpl(), anonymous_namespace{misc.h}::power(), and anonymous_namespace{misc.h}::powersOfImpl().
EXTENSION_NOINLINE double radians | ( | const double | x | ) |
Definition at line 182 of file ExtensionFunctions.hpp.
References M_PI.
Referenced by radsToDegs().
EXTENSION_NOINLINE float rect_pixel_bin | ( | const double | val, |
const double | min, | ||
const double | max, | ||
const int32_t | numbins, | ||
const int32_t | dimensionsize | ||
) |
deprecated
Definition at line 485 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int32_t rect_pixel_bin_packed | ( | const double | valx, |
const double | minx, | ||
const double | maxx, | ||
const double | valy, | ||
const double | miny, | ||
const double | maxy, | ||
const double | rectwidth, | ||
const double | rectheight, | ||
const double | offsetx, | ||
const double | offsety, | ||
const int32_t | imgwidth, | ||
const int32_t | imgheight | ||
) |
Definition at line 545 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE float rect_pixel_bin_x | ( | const double | valx, |
const double | minx, | ||
const double | maxx, | ||
const double | rectwidth, | ||
const double | offsetx, | ||
const int32_t | imgwidth | ||
) |
Definition at line 497 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE float rect_pixel_bin_y | ( | const double | valy, |
const double | miny, | ||
const double | maxy, | ||
const double | rectheight, | ||
const double | offsety, | ||
const int32_t | imgheight | ||
) |
Definition at line 521 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int32_t reg_hex_horiz_pixel_bin_packed | ( | const double | valx, |
const double | minx, | ||
const double | maxx, | ||
const double | valy, | ||
const double | miny, | ||
const double | maxy, | ||
const double | hexwidth, | ||
const double | hexheight, | ||
const double | offsetx, | ||
const double | offsety, | ||
const int32_t | imgwidth, | ||
const int32_t | imgheight | ||
) |
Definition at line 748 of file ExtensionFunctions.hpp.
References f().
EXTENSION_NOINLINE float reg_hex_horiz_pixel_bin_x | ( | const double | valx, |
const double | minx, | ||
const double | maxx, | ||
const double | valy, | ||
const double | miny, | ||
const double | maxy, | ||
const double | hexwidth, | ||
const double | hexheight, | ||
const double | offsetx, | ||
const double | offsety, | ||
const int32_t | imgwidth, | ||
const int32_t | imgheight | ||
) |
Definition at line 596 of file ExtensionFunctions.hpp.
References f().
EXTENSION_NOINLINE float reg_hex_horiz_pixel_bin_y | ( | const double | valx, |
const double | minx, | ||
const double | maxx, | ||
const double | valy, | ||
const double | miny, | ||
const double | maxy, | ||
const double | hexwidth, | ||
const double | hexheight, | ||
const double | offsetx, | ||
const double | offsety, | ||
const int32_t | imgwidth, | ||
const int32_t | imgheight | ||
) |
Definition at line 674 of file ExtensionFunctions.hpp.
References f().
EXTENSION_NOINLINE int32_t reg_hex_vert_pixel_bin_packed | ( | const double | valx, |
const double | minx, | ||
const double | maxx, | ||
const double | valy, | ||
const double | miny, | ||
const double | maxy, | ||
const double | hexwidth, | ||
const double | hexheight, | ||
const double | offsetx, | ||
const double | offsety, | ||
const int32_t | imgwidth, | ||
const int32_t | imgheight | ||
) |
Definition at line 980 of file ExtensionFunctions.hpp.
References f().
EXTENSION_NOINLINE float reg_hex_vert_pixel_bin_x | ( | const double | valx, |
const double | minx, | ||
const double | maxx, | ||
const double | valy, | ||
const double | miny, | ||
const double | maxy, | ||
const double | hexwidth, | ||
const double | hexheight, | ||
const double | offsetx, | ||
const double | offsety, | ||
const int32_t | imgwidth, | ||
const int32_t | imgheight | ||
) |
Definition at line 830 of file ExtensionFunctions.hpp.
References f().
EXTENSION_NOINLINE float reg_hex_vert_pixel_bin_y | ( | const double | valx, |
const double | minx, | ||
const double | maxx, | ||
const double | valy, | ||
const double | miny, | ||
const double | maxy, | ||
const double | hexwidth, | ||
const double | hexheight, | ||
const double | offsetx, | ||
const double | offsety, | ||
const int32_t | imgwidth, | ||
const int32_t | imgheight | ||
) |
Definition at line 904 of file ExtensionFunctions.hpp.
References f().
EXTENSION_NOINLINE double Round | ( | const double | x, |
const int32_t | y | ||
) |
Definition at line 187 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Round2_to_digit | ( | const double | x, |
const int32_t | y | ||
) |
Definition at line 289 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE float Round__ | ( | const float | x, |
const int32_t | y | ||
) |
Definition at line 201 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int16_t Round__1 | ( | const int16_t | x, |
const int32_t | y | ||
) |
Definition at line 215 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int32_t Round__2 | ( | const int32_t | x, |
const int32_t | y | ||
) |
Definition at line 236 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int64_t Round__3 | ( | const int64_t | x, |
const int32_t | y | ||
) |
Definition at line 257 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int64_t Round__4 | ( | const int64_t | x, |
const int32_t | y0, | ||
const int32_t | scale | ||
) |
Definition at line 272 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double round_to_digit | ( | const double | x, |
const int32_t | y | ||
) |
Definition at line 295 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Sin | ( | const double | x | ) |
Definition at line 301 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Sinh | ( | const double | x | ) |
Definition at line 306 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Sqrt | ( | const double | x | ) |
Definition at line 311 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Tan | ( | const double | x | ) |
Definition at line 316 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Tan__ | ( | const float | x | ) |
Definition at line 326 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Tanh | ( | const double | x | ) |
Definition at line 321 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE double Truncate | ( | const double | x, |
const int32_t | y | ||
) |
Definition at line 331 of file ExtensionFunctions.hpp.
Referenced by com.mapd.calcite.parser.HeavyDBSqlOperatorTable::addUDF().
EXTENSION_NOINLINE float Truncate__ | ( | const float | x, |
const int32_t | y | ||
) |
Definition at line 338 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int16_t Truncate__1 | ( | const int16_t | x, |
const int32_t | y | ||
) |
Definition at line 345 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int32_t Truncate__2 | ( | const int32_t | x, |
const int32_t | y | ||
) |
Definition at line 362 of file ExtensionFunctions.hpp.
EXTENSION_NOINLINE int64_t Truncate__3 | ( | const int64_t | x, |
const int32_t | y | ||
) |
Definition at line 372 of file ExtensionFunctions.hpp.