geo_geohash_to_central_point()

Calcola le coordinate geospaziali che rappresentano il centro di un'area rettangolare geohash.

Altre informazioni su geohash.

Sintassi

geo_geohash_to_central_point(geohash)

Altre informazioni sulle convenzioni di sintassi.

Parametri

Nome Tipo Obbligatoria Descrizione
geohash string ✔️ Valore geohash calcolato da geo_point_to_geohash().. La stringa geohash deve essere compresa tra 1 e 18 caratteri.

Restituisce

I valori delle coordinate geospaziali in Formato GeoJSON e di un tipo di dati dinamico . Se il geohash non è valido, la query produrrà un risultato Null.

Nota

Il formato GeoJSON specifica la longitudine prima e latitudine seconda.

Esempio

print point = geo_geohash_to_central_point("sunny")
| extend coordinates = point.coordinates
| extend longitude = coordinates[0], latitude = coordinates[1]

Output

point Coordinate longitudine latitudine
{
"type": "Point",
"coordinate": [
42.47314453125,
23.70849609375
]
}
[
42.47314453125,
23.70849609375
]
42.47314453125 23.70849609375

Nell'esempio seguente viene restituito un risultato Null a causa dell'input geohash non valido.

print geohash = geo_geohash_to_central_point("a")

Output

geohash

È possibile usare il valore geohash per creare un URL di collegamento profondo per Bing Mappe puntando al punto centrale geohash:

// Use string concatenation to create Bing Map deep-link URL from a geo-point
let point_to_map_url = (_point:dynamic, _title:string) 
{
    strcat('https://www.bing.com/maps?sp=point.', _point.coordinates[1] ,'_', _point.coordinates[0], '_', url_encode(_title)) 
};
// Convert geohash to center point, and then use 'point_to_map_url' to create Bing Map deep-link
let geohash_to_map_url = (_geohash:string, _title:string)
{
    point_to_map_url(geo_geohash_to_central_point(_geohash), _title)
};
print geohash = 'sv8wzvy7'
| extend url = geohash_to_map_url(geohash, "You are here")

Output

geohash url
sv8wzvy7 https://www.bing.com/maps?sp=point.32.15620994567871_34.80245590209961_You+are+here