mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 10:10:50 +00:00
Changes after review of #8034
This commit is contained in:
parent
0042c8271e
commit
0bc1c6d91d
@ -74,10 +74,10 @@ public:
|
|||||||
const UInt8 res = col_res->getUInt(row);
|
const UInt8 res = col_res->getUInt(row);
|
||||||
|
|
||||||
GeoCoord coord;
|
GeoCoord coord;
|
||||||
coord.lon = H3_EXPORT(degsToRads)(lon);
|
coord.lon = degsToRads(lon);
|
||||||
coord.lat = H3_EXPORT(degsToRads)(lat);
|
coord.lat = degsToRads(lat);
|
||||||
|
|
||||||
H3Index hindex = H3_EXPORT(geoToH3)(&coord, res);
|
H3Index hindex = geoToH3(&coord, res);
|
||||||
|
|
||||||
dst_data[row] = hindex;
|
dst_data[row] = hindex;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
const int resolution = col_hindex->getUInt(row);
|
const int resolution = col_hindex->getUInt(row);
|
||||||
|
|
||||||
// Numerical constant is 180 degrees / pi / Earth radius, Earth radius is from h3 sources
|
// Numerical constant is 180 degrees / pi / Earth radius, Earth radius is from h3 sources
|
||||||
Float64 res = 8.99320592271288084e-6 * H3_EXPORT(edgeLengthM)(resolution);
|
Float64 res = 8.99320592271288084e-6 * edgeLengthM(resolution);
|
||||||
|
|
||||||
dst_data[row] = res;
|
dst_data[row] = res;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
{
|
{
|
||||||
const int resolution = col_hindex->getUInt(row);
|
const int resolution = col_hindex->getUInt(row);
|
||||||
|
|
||||||
Float64 res = H3_EXPORT(edgeLengthM)(resolution);
|
Float64 res = edgeLengthM(resolution);
|
||||||
|
|
||||||
dst_data[row] = res;
|
dst_data[row] = res;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
{
|
{
|
||||||
const UInt64 hindex = col_hindex->getUInt(row);
|
const UInt64 hindex = col_hindex->getUInt(row);
|
||||||
|
|
||||||
UInt8 res = H3_EXPORT(h3GetResolution)(hindex);
|
UInt8 res = h3GetResolution(hindex);
|
||||||
|
|
||||||
dst_data[row] = res;
|
dst_data[row] = res;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
{
|
{
|
||||||
const UInt64 hindex = col_hindex->getUInt(row);
|
const UInt64 hindex = col_hindex->getUInt(row);
|
||||||
|
|
||||||
UInt8 is_valid = H3_EXPORT(h3IsValid)(hindex) == 0 ? 0 : 1;
|
UInt8 is_valid = h3IsValid(hindex) == 0 ? 0 : 1;
|
||||||
|
|
||||||
dst_data[row] = is_valid;
|
dst_data[row] = is_valid;
|
||||||
}
|
}
|
||||||
|
@ -63,9 +63,9 @@ public:
|
|||||||
const H3Index origin_hindex = col_hindex->getUInt(row);
|
const H3Index origin_hindex = col_hindex->getUInt(row);
|
||||||
const int k = col_k->getInt(row);
|
const int k = col_k->getInt(row);
|
||||||
|
|
||||||
const auto vec_size = H3_EXPORT(maxKringSize)(k);
|
const auto vec_size = maxKringSize(k);
|
||||||
hindex_vec.resize(vec_size);
|
hindex_vec.resize(vec_size);
|
||||||
H3_EXPORT(kRing)(origin_hindex, k, hindex_vec.data());
|
kRing(origin_hindex, k, hindex_vec.data());
|
||||||
|
|
||||||
dst_data.reserve(dst_data.size() + vec_size);
|
dst_data.reserve(dst_data.size() + vec_size);
|
||||||
for (auto hindex : hindex_vec)
|
for (auto hindex : hindex_vec)
|
||||||
|
Loading…
Reference in New Issue
Block a user