geo_h3cell_neighbors()
적용 대상: ✅Microsoft Fabric✅Azure Data Explorer✅Azure Monitor✅Microsoft Sentinel
H3 셀 인접 항목을 계산합니다.
H3 셀에 대해 자세히 알아보세요.
구문
geo_h3cell_neighbors(
h3cell)
구문 규칙에 대해 자세히 알아봅니다.
매개 변수
이름 | Type | 필수 | 설명 |
---|---|---|---|
h3cell | string |
✔️ | geo_point_to_h3cell()에서 계산한 H3 셀 토큰 값입니다. |
반품
H3 셀 인접 항목의 배열입니다. H3 셀이 유효하지 않으면 쿼리에서 null 결과를 생성합니다.
참고 항목
인접 항목이 필요한 경우 geo_h3cell_rings()를 참조하세요.
예제
다음 예제에서는 H3 셀 인접 항목을 계산합니다.
print neighbors = geo_h3cell_neighbors('862a1072fffffff')
출력
이웃 |
---|
["862a10727ffffff","862a10707ffffffff","862a1070fffffff","862a10777ffffffff","862a100dfffffff","862a100d7ffffff"] |
다음 예제에서는 인접 항목이 있는 입력 H3 셀의 배열을 계산합니다.
let h3cell = '862a1072fffffff';
print cells = array_concat(pack_array(h3cell), geo_h3cell_neighbors(h3cell))
출력
셀 |
---|
["862a1072fffffff","862a10727ffffffff","862a10707ffffffff","862a1070fffffff","862a1077ffffffff","862a100dfffffff","862a100d7ffffff"] |
다음 예제에서는 H3 셀 다각형 GeoJSON 기하 도형 컬렉션을 계산합니다.
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.00274646159,40.735376026215022],[-74.046908029686236,40.727986222489115],[-74.0606107122223664,40.696775140349033],[-74.0297244081 56682,40.672970047595463],[-73.985140983708192,40.680349049267583],[-73.971393761028622,40.7115439354393333],[-74.00274466159,40.73537602626215022]]]}, {"type":"Polygon","coordinates":[[[-74.01948383546617,40.790439140236963],[-74.064132193843633,40.783038509825],[-74.077839665342211,40.751803958414136],[-74.046908029686236,40.7279862222489115],[-74.002274646159,40.73537602626215022],[-73.988522328408948,40.76659438212254],[-74.019448383546617,40.790439140236963]]]}, {"type":"Polygon","coordinates":[[[-74.077839665342211,40.751803958414136],[-74.1224794808745,40.7443835878283888],[-74.1361375042681,40.713156370029125],[-74.1052004095288,40.689365648097258],[-74.060610712223664,40.6967751403449033],[-74.046908029686236,40.727986222489115],[-74.077839665342211,40.751803958414136]]]}, {"type":"Polygon","coordinates":[[[-74.060610712223664,40.696775140349033],[-74.1052004095288,40.689365648097258],[-74.118853750491638,40.658161927046628],[-74.0879619670209,40.6343838242229609],[-74.0434228384933,40.641782462872115],[-74.029724408156682,40.672970047595463],[-74.060610712223664,40.696775140343449033]]]}, {"type":"Polygon","coordinates":[[[-73.985140983708192,40.680349049267583],[-74.029724408156682,40.672970047595463],[-74.04342283844933,40.641782462872115],[-74.012581189358343,40.617990065981623],[-73.96804780120749,40.625358290164748],[-73.954305509472675,40.656529678451555],[-73.985140983708192,40.680349049267583]]]}, {"type":"Polygon","coordinates":[[[-73.926766604813565,40.718903205013063],[-73.97139376102862,40.71154393543933],[-73.985140983708192,40.68034949267583],[-73.95430550947 2675,40.656529678451555],[-73.909728515658443,40.663878222244435],[-73.895936872069854,40.69505685239637],[-73.926766604813565,40.718903205013063]]]}, {"type":"Polygon","coordinates":[[[-73.943844904976629,40.773964402038523],[-73.988522328408948,40.766594382212254],[-74.002274466159,40.735376026215022],[-73.971393761028622,40.71154393543934393939393933],[-73.926766604813565,40.718903205013063],[-73.912969923470314,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)
출력
polygon |
---|
{ "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 |