Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

geopoint from json mysql function

Press CTRL+C to copy mysql> SET @json = '{ "type": "Point", "coordinates": [102.0, 0.0]}';
mysql> SELECT ST_AsText(ST_GeomFromGeoJSON(@json));
+--------------------------------------+
| ST_AsText(ST_GeomFromGeoJSON(@json)) |
+--------------------------------------+
| POINT(102 0)                         |
+--------------------------------------+
Source by dev.mysql.com #
 
PREVIOUS NEXT
Tagged: #geopoint #json #mysql #function
ADD COMMENT
Topic
Name
2+3 =