OmniSciDB
a5dc49c757
|
#include "QueryEngine/ExtensionFunctions/h3lib/include/faceijk.h"
#include "QueryEngine/ExtensionFunctions/h3lib/include/geoCoord.h"
#include "QueryEngine/ExtensionFunctions/h3lib/include/h3Index.h"
#include "QueryEngine/ExtensionFunctions/h3lib/include/vec3d.h"
Go to the source code of this file.
Macros | |
#define | M_SQRT7 2.6457513110645905905016157536392604257102 |
Functions | |
DEVICE const | GeoCoordArray (faceCenterGeo, NUM_ICOSA_FACES) |
icosahedron face centers in lat/lon radians More... | |
static DEVICE const | Vec3dArray (faceCenterPoint, NUM_ICOSA_FACES) |
icosahedron face centers in x/y/z on the unit sphere More... | |
static DEVICE const | FaceOrientIJK2DArray (faceNeighbors, NUM_ICOSA_FACES, 4) |
Definition of which faces neighbor each other. More... | |
EXTENSION_INLINE int | isResClassIII (int res) |
EXTENSION_NOINLINE bool | _geoToFaceIjk (const GeoCoord(g), int res, FaceIJK(h)) |
EXTENSION_NOINLINE bool | _geoToHex2d (const GeoCoord(g), int res, int *face, Vec2d(v)) |
EXTENSION_NOINLINE bool | _hex2dToGeo (const Vec2d(v), int face, int res, int substrate, GeoCoord(g)) |
EXTENSION_NOINLINE bool | _faceIjkToGeo (const FaceIJK(h), int res, GeoCoord(g)) |
EXTENSION_NOINLINE int | _adjustOverageClassII (FaceIJK(fijk), int res, int pentLeading4, int substrate) |
Variables | |
static DEVICE const double | faceAxesAzRadsCII [NUM_ICOSA_FACES][3] |
icosahedron face ijk axes as azimuth in radians from face center to vertex 0/1/2 respectively More... | |
static DEVICE const int | maxDimByCIIres [] |
direction from the origin face to the destination face, relative to the origin face's coordinate system, or -1 if not adjacent. More... | |
static DEVICE const int | unitScaleByCIIres [] |
unit scale distance table More... | |
#define M_SQRT7 2.6457513110645905905016157536392604257102 |
square root of 7
Definition at line 36 of file faceijk.hpp.
Referenced by _geoToHex2d(), and _hex2dToGeo().
EXTENSION_NOINLINE int _adjustOverageClassII | ( | FaceIJK(fijk) | , |
int | res, | ||
int | pentLeading4, | ||
int | substrate | ||
) |
Generates the cell boundary in spherical coordinates for a pentagonal cell given by a FaceIJK address at a specified resolution.
h | The FaceIJK address of the pentagonal cell. |
res | The H3 resolution of the cell. |
start | The first topological vertex to return. |
length | The number of topological vertexes to return. |
g | The spherical coordinates of the cell boundary. Get the vertices of a pentagon cell as substrate FaceIJK addresses |
fijk | The FaceIJK address of the cell. |
res | The H3 resolution of the cell. This may be adjusted if necessary for the substrate grid resolution. |
fijkVerts | Output array for the vertices Generates the cell boundary in spherical coordinates for a cell given by a FaceIJK address at a specified resolution. |
h | The FaceIJK address of the cell. |
res | The H3 resolution of the cell. |
start | The first topological vertex to return. |
length | The number of topological vertexes to return. |
g | The spherical coordinates of the cell boundary. Get the vertices of a cell as substrate FaceIJK addresses |
fijk | The FaceIJK address of the cell. |
res | The H3 resolution of the cell. This may be adjusted if necessary for the substrate grid resolution. |
fijkVerts | Output array for the vertices Adjusts a FaceIJK address in place so that the resulting cell address is relative to the correct icosahedral face. |
fijk | The FaceIJK address of the cell. |
res | The H3 resolution of the cell. |
pentLeading4 | Whether or not the cell is a pentagon with a leading digit 4. |
substrate | Whether or not the cell is in a substrate grid. |
Definition at line 864 of file faceijk.hpp.
References _ijkAdd(), _ijkNormalize(), _ijkRotate60ccw(), _ijkRotate60cw(), _ijkScale(), _ijkSub(), _setIJK(), CCWROT_60_INDEX, CoordIJK, CoordIJK_clone, CoordIJK_ptr, FACE_EDGE, FACE_INDEX, I_INDEX, IJ, J_INDEX, JK, K_INDEX, KI, maxDimByCIIres, NEW_FACE, NO_OVERAGE, run_benchmark_import::res, and unitScaleByCIIres.
Referenced by _h3ToFaceIjk().
EXTENSION_NOINLINE bool _faceIjkToGeo | ( | const | FaceIJKh, |
int | res, | ||
GeoCoord(g) | |||
) |
Determines the center point in spherical coordinates of a cell given by a FaceIJK address at a specified resolution.
h | The FaceIJK address of the cell. |
res | The H3 resolution of the cell. |
g | The spherical coordinates of the cell center point. |
Definition at line 495 of file faceijk.hpp.
References _hex2dToGeo(), _ijkToHex2d(), FACE_INDEX, and Vec2d.
Referenced by _h3ToGeo().
EXTENSION_NOINLINE bool _geoToFaceIjk | ( | const | GeoCoordg, |
int | res, | ||
FaceIJK(h) | |||
) |
Encodes a coordinate on the sphere to the FaceIJK address of the containing cell at the specified resolution.
g | The spherical coordinates to encode. |
res | The desired H3 resolution for the encoding. |
h | The FaceIJK address of the containing cell at resolution res. |
Definition at line 362 of file faceijk.hpp.
References _geoToHex2d(), _hex2dToCoordIJK(), FACE_INDEX, and Vec2d.
Referenced by geoToH3().
EXTENSION_NOINLINE bool _geoToHex2d | ( | const | GeoCoordg, |
int | res, | ||
int * | face, | ||
Vec2d(v) | |||
) |
Encodes a coordinate on the sphere to the corresponding icosahedral face and containing 2D hex coordinates relative to that face center.
g | The spherical coordinates to encode. |
res | The desired H3 resolution for the encoding. |
face | The icosahedral face containing the spherical coordinates. |
v | The 2D hex coordinates of the cell containing the point. |
Definition at line 382 of file faceijk.hpp.
References _geoAzimuthRads(), _geoToVec3d(), _pointSquareDist(), _posAngleRads(), EPSILON, f(), faceAxesAzRadsCII, isResClassIII(), M_AP7_ROT_RADS, M_SQRT7, NUM_ICOSA_FACES, run_benchmark_import::res, RES0_U_GNOMONIC, Vec3d, X_INDEX, and Y_INDEX.
Referenced by _geoToFaceIjk().
EXTENSION_NOINLINE bool _hex2dToGeo | ( | const | Vec2dv, |
int | face, | ||
int | res, | ||
int | substrate, | ||
GeoCoord(g) | |||
) |
Determines the center point in spherical coordinates of a cell given by 2D hex coordinates on a particular icosahedral face.
v | The 2D hex coordinates of the cell. |
face | The icosahedral face upon which the 2D hex coordinate system is centered. |
res | The H3 resolution of the cell. |
substrate | Indicates whether or not this grid is actually a substrate grid relative to the specified resolution. |
g | The spherical coordinates of the cell center point. |
Definition at line 442 of file faceijk.hpp.
References _geoAzDistanceRads(), _posAngleRads(), _v2dMag(), EPSILON, faceAxesAzRadsCII, GeoCoordCopy, isResClassIII(), M_AP7_ROT_RADS, M_SQRT7, run_benchmark_import::res, RES0_U_GNOMONIC, X_INDEX, and Y_INDEX.
Referenced by _faceIjkToGeo().
|
static |
Definition of which faces neighbor each other.
DEVICE const GeoCoordArray | ( | faceCenterGeo | , |
NUM_ICOSA_FACES | |||
) |
icosahedron face centers in lat/lon radians
EXTENSION_INLINE int isResClassIII | ( | int | res | ) |
Returns whether or not a resolution is a Class III grid. Note that odd resolutions are Class III and even resolutions are Class II.
res | The H3 resolution. |
Definition at line 350 of file faceijk.hpp.
Referenced by _faceIjkToH3(), _geoToHex2d(), _h3ToFaceIjk(), _h3ToFaceIjkWithInitializedFijk(), and _hex2dToGeo().
|
static |
icosahedron face centers in x/y/z on the unit sphere
|
static |
icosahedron face ijk axes as azimuth in radians from face center to vertex 0/1/2 respectively
Definition at line 89 of file faceijk.hpp.
Referenced by _geoToHex2d(), and _hex2dToGeo().
|
static |
direction from the origin face to the destination face, relative to the origin face's coordinate system, or -1 if not adjacent.
overage distance table
Definition at line 302 of file faceijk.hpp.
Referenced by _adjustOverageClassII().
|
static |
unit scale distance table
Definition at line 323 of file faceijk.hpp.
Referenced by _adjustOverageClassII().