Catégories :

Fonctions géospatiales, Fonctions de conversion

ST_GEOGPOINTFROMGEOHASH

Returns a GEOGRAPHY object for the Point that represents the center of a geohash.

Voir aussi :

ST_GEOHASH, ST_GEOGFROMGEOHASH

Syntaxe

ST_GEOGPOINTFROMGEOHASH( <geohash> )

Arguments

geohash

L’argument doit être un geohash.

Renvoie

The function returns a value of type GEOGRAPHY that represents the Point that is the center of the geohash.

Exemples

L’exemple suivant renvoie l’objet GEOGRAPHY pour le point au centre d’un geohash :

SELECT ST_GEOGPOINTFROMGEOHASH('9q9j8ue2v71y5zzy0s4q')
    AS geography_center_point_of_geohash;
+-----------------------------------+
| GEOGRAPHY_CENTER_POINT_OF_GEOHASH |
|-----------------------------------|
| {                                 |
|   "coordinates": [                |
|     -1.223060999999999e+02,       |
|     3.755416200000003e+01         |
|   ],                              |
|   "type": "Point"                 |
| }                                 |
+-----------------------------------+