geo_h3cell_neighbors()
適用対象: ✅Microsoft Fabric✅Azure データ エクスプローラー✅Azure Monitor✅Microsoft Sentinel
H3 セルの近隣を計算します。
詳細については、H3 セルに関するページを参照してください。
構文
geo_h3cell_neighbors(
h3cell)
構文規則について詳しく知る。
パラメーター
件名 | タイプ | Required | 説明 |
---|---|---|---|
h3cell | string |
✔️ | geo_point_to_h3cell()によって計算された H3 Cell トークン値。 |
返品
H3 セル隣接の配列。 H3 セルが無効な場合、クエリによって null の結果が生成されます。
Note
複数の近隣ノードが必要な場合は、 geo_h3cell_rings()を参照してください。
例
次の例では、H3 セルの近傍を計算します。
print neighbors = geo_h3cell_neighbors('862a1072fffffff')
出力
近隣 |
---|
["862a10727ffffff","862a10707ffffff","862a1070fffffff","862a1077ffffffff","862a100dfffffff","862a100d7ffffff"] |
次の例では、隣接する入力 H3 セルの配列を計算します。
let h3cell = '862a1072fffffff';
print cells = array_concat(pack_array(h3cell), geo_h3cell_neighbors(h3cell))
出力
セル |
---|
["862a1072fffffff","862a10727ffffff","862a10707ffffff","862a10 70fffffff","862a10777ffffff","862a100dfffffff","862a100d7ffffff"] |
次の例では、GeoJSON ジオメトリ コレクションの H3 セルポリゴンを計算します。
let h3cell = '862a1072fffffff';
print cells = array_concat(pack_array(h3cell), geo_h3cell_neighbors(h3cell))
| mv-expand cells to typeof(string)
| project polygons = geo_h3cell_to_polygon(cells)
| summarize arr = make_list(polygons)
| project geojson = bag_pack("type", "Feature","geometry", bag_pack("type", "GeometryCollection", "geometries", arr), "properties", bag_pack("name", "polygons"))
出力
geojson |
---|
{"type": "Feature","geometry": {"type": "GeometryCollection","geometries": [ {"type":"Polygon","coordinates":[[[-74.0022744646159,40.735376026215022],[-74.046908029686236,1 40.727986222489115],[-74.06061071223664,40.696775140349033],[-74.029724408 156682,40.672970047595463],[-73.985140983708192,40.680349049267583],[-73.97 1393761028622,40.71154393543933],[-74.0022744646159,40.735376026215022]]}, {"type":"Polygon","coordinates":[[[-74.019448383546617,40.790439140236963],[-74.064132193843633,40.783038509825],[-74.077839665342211,40.751803958414136],[-74.0469080296 86236,40.727986222489115],[-74.0022744646159,40.735376026215022][-73.98852 2328408948,40.766594382212254],[-74.019448383546617,40.790439140236963]]}, {"type":"Polygon","coordinates":[[[-74.077839665342211,40.751803958414136],[-74.1224794808745,74 40.744383587828388],[-74.1361375042681,40.713156370029125],[-74.10520040952 88,40.689365648097258],[-74.06061071223664,40.69677514034903],[-74.046908029686236,40.727986222489115],[-74.077839665342211,40.751803958414136]]}, {"type":"Polygon","coordinates":[[[-74.060610712223664,40.696775140349033],[-74.1052004095288,4 0.689365648097258],[-74.118853750491638,40.658161927046628],[-74.0879619670 209,40.63438382429609],[-74.043422283844933,40.641782462872115],[-74.029724408156682,40.672970047595463],[-74.06061071223664,40.696775140349033]]}, {"type":"Polygon","coordinates":[[[-73.985140983708192,40.680349049267583],[-74.029724408156682,74 40.672970047595463],[-74.043422283844933,40.641782462872115],[-74.0125811893 58343,40.617990065981623],[-73.968047801220749,40.625358290164748],[-73.954305509472675,40.656529678451555],[-73.985140983708192,40.680349049267583]]}, {"type":"Polygon","coordinates":[[[-73.926766604813565,40.718903205013063],[-73.97139376102862,40.71154393543933,[-73.985140983708192,40.680349049267583],[-73.9543055094 72675,40.65652967845155],[-73.909728515658443,40.6638782224435],[-73.895936872069854,40.69505685239637],[-73.926766604813565,40.718903205013063]]}, {"type":"Polygon","coordinates":[[[-73.943844904976629,40.773964402038523],[-73.988522328408948,], 40.766594382212254],[-74.0022744646159,40.735376026215022],[-73.971393761028622,40.71154393543933],[-73.926766604813565,40.718903205013063],[-73.912969 923470314,40.750105305345329],[-73.943844904976629,40.773964402038523]]}]}, "properties": {"name": "polygons"}} |
次の例では、H3 セルとその隣接セルを表す多角形の和集合を計算します。
let h3cell = '862a1072fffffff';
print cells = array_concat(pack_array(h3cell), geo_h3cell_neighbors(h3cell))
| mv-expand cells to typeof(string)
| project polygons = geo_h3cell_to_polygon(cells)
| summarize arr = make_list(polygons)
| project polygon = geo_union_polygons_array(arr)
出力
多角形 |
---|
{ "type": "Polygon", "coordinates": [[[ -73.926766604813565, 40.718903205013063],[ -73.912969923470314, 40.750105305345329],[ -73.943844904976629, 40.773964402038523],[ -73.988522328408948, 40.766594382212254],[ -74.019448383546617, 40.79043914023697],[ -74.064132193843633, 40.783038509825005],[ -74.077839665342211, 40.751803958414136],[ -74.1224794808745, 40.744383587828388],[ -74.1361375042681, 40.713156370029125],[ -74.1052004095288, 40.689365648097251],[ -74.118853750491638,40.658161927046628],[ -74.0879619670209, 40.6343838242296],[ -74.043422283844933, 40.641782462872115],[ -74.012581189358343, 40.617990065981623],[ -73.968047801220749, 40.625358290164755],[ -73.954305509472675, 40.656529678451555],[ -73.909728515658443, 40.663878222244442],[ -73.895936872069854, 40.695056852396377],[ -73.926766604813565, 40.718903205013063]]]} |
次の例では、H3 セル トークンの入力が無効であるため、true が返されます。
print invalid = isnull(geo_h3cell_neighbors('abc'))
出力
無効 |
---|
1 |