geo_geohash_to_polygon()

Coğrafi dikdörtgen alanı temsil eden çokgeni hesaplar.

Geohash hakkında daha fazla bilgi edinin.

Syntax

geo_geohash_to_polygon(geohash)

Söz dizimi kuralları hakkında daha fazla bilgi edinin.

Parametreler

Ad Tür Gerekli Açıklama
geohash string ✔️ geo_point_to_geohash() tarafından hesaplandığı gibi bir geohash değeri. Geohash dizesi 1 ile 18 karakter arasında olmalıdır.

Döndürülenler

GeoJSON Biçiminde ve dinamik veri türünde çokgen. Geohash geçersizse sorgu null sonuç üretir.

Not

Geohash kenarları düz çizgilerdir ve jeodezik değildir. Geohash çokgeni başka bir hesaplamanın parçasıysa , geo_polygon_densify() ile bunu reddedebilirsiniz.

Örnekler

print GeohashPolygon = geo_geohash_to_polygon("dr5ru");

Çıkış

GeohashPolygon
{
"type": "Polygon",
"koordinatlar": [
[[-74.00390625, 40.7373046875], [-73.9599609375, 40.7373046875], [-73.9599609375, 40.78125], [-74.00390625, 40.78125], [-74.00390625, 40.7373046875]]]
}

Aşağıdaki örnek geohash çokgenlerinden oluşan GeoJSON geometri koleksiyonunu bir araya getirmektedir.

// Geohash GeoJSON collection
datatable(lng:real, lat:real)
[
    -73.975212, 40.789608,
    -73.916869, 40.818314,
    -73.989148, 40.743273,
]
| project geohash = geo_point_to_geohash(lng, lat, 5)
| project geohash_polygon = geo_geohash_to_polygon(geohash)
| summarize geohash_polygon_lst = make_list(geohash_polygon)
| project bag_pack(
    "type", "Feature",
    "geometry", bag_pack("type", "GeometryCollection", "geometries", geohash_polygon_lst),
    "properties", bag_pack("name", "Geohash polygons collection"))

Çıkış

Sütun1
{
"type": "Feature",
"geometry": {"type": "GeometryCollection","geometries": [
{"type": "Polygon", "coordinates": [[-74.00390625, 40.78125], [-73.9599609375, 40.78125], [-73.9599609375, 40.8251953125],[ -74.00390625, 40.8251953125], [ -74.00390625, 40.78125]]},
{"type": "Polygon", "coordinates": [[[ -73.9599609375, 40.78125], [-73.916015625, 40.78125], [-73.916015625, 40.8251953125], [-73.9599609375, 40.8251953125], [-73.9599609375, 40.78125]]]},
{"type": "Polygon", "coordinates": [[-74.00390625, 40.7373046875], [-73.9599609375, 40.7373046875], [-73.9599609375, 40.78125], [-74.00390625, 40.78125], [-74.00390625, 40.7373046875]]}]
},
"properties": {"name": "Geohash polygons collection"
}}

Aşağıdaki örnek geçersiz geohash girişi nedeniyle null bir sonuç döndürür.

print GeohashPolygon = geo_geohash_to_polygon("a");

Çıkış

GeohashPolygon