top of page
CerebroSQL

ST_POINTFROMGEOHASH

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

ST_PointFromGeoHash(geohash_str, srid)

Returns a POINT value containing the decoded geohash value, given a
geohash string value.

The X and Y coordinates of the point are the longitude in the range
[?180, 180] and the latitude in the range [?90, 90], respectively.

The srid argument is an 32-bit unsigned integer.

The remarks in the description of ST_LatFromGeoHash() regarding the
maximum number of characters processed from the geohash_str argument
also apply to ST_PointFromGeoHash().

ST_PointFromGeoHash() handles its arguments as described in the
introduction to this section.

URL: https://dev.mysql.com/doc/refman/8.0/en/spatial-geohash-functions.html

Example

mysql> SET @gh = ST_GeoHash(45,-20,10);
mysql> SELECT ST_AsText(ST_PointFromGeoHash(@gh,0));
+---------------------------------------+
| ST_AsText(ST_PointFromGeoHash(@gh,0)) |
+---------------------------------------+
| POINT(45 -20) |
+---------------------------------------+

bottom of page