Bug #100502 | spatial-geojson-functions | ||
---|---|---|---|
Submitted: | 12 Aug 2020 8:46 | Modified: | 14 Aug 2020 14:11 |
Reporter: | Taras Taras | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S2 (Serious) |
Version: | 8.0 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | spatial, st_geomfromgeojson |
[12 Aug 2020 8:46]
Taras Taras
[12 Aug 2020 9:20]
MySQL Verification Team
Thank you for the bug report.
[14 Aug 2020 14:11]
Paul DuBois
Posted by developer: Revised example: This example shows the parsing result for a simple GeoJSON object. Observe that the order of coordinates depends on the SRID used. mysql> SET @json = '{ "type": "Point", "coordinates": [102.0, 0.0]}'; mysql> SELECT ST_AsText(ST_GeomFromGeoJSON(@json)); +--------------------------------------+ | ST_AsText(ST_GeomFromGeoJSON(@json)) | +--------------------------------------+ | POINT(0 102) | +--------------------------------------+ mysql> SELECT ST_SRID(ST_GeomFromGeoJSON(@json)); +------------------------------------+ | ST_SRID(ST_GeomFromGeoJSON(@json)) | +------------------------------------+ | 4326 | +------------------------------------+ mysql> SELECT ST_AsText(ST_SRID(ST_GeomFromGeoJSON(@json),0)); +-------------------------------------------------+ | ST_AsText(ST_SRID(ST_GeomFromGeoJSON(@json),0)) | +-------------------------------------------------+ | POINT(102 0) | +-------------------------------------------------+