This article is currently incomplete.

MariaDB starting with 10.2.4

ST_AsGeoJSON was added in MariaDB 10.2.4

Syntax

Description

Returns the given geometry as a GeoJSON element.

Examples

SELECT ST_AsGeoJSON(ST_GeomFromText('POINT(5.3 7.2)'));
+-------------------------------------------------+
| ST_AsGeoJSON(ST_GeomFromText('POINT(5.3 7.2)')) |
+-------------------------------------------------+
| {"type": "Point", "coordinates": [5.3, 7.2]}    |
+-------------------------------------------------+

See also

Comments

Comments loading...