Bug #90769 | ST_PolyFromText validate error. | ||
---|---|---|---|
Submitted: | 6 May 2018 10:33 | Modified: | 7 May 2018 6:27 |
Reporter: | Lee Eric | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: GIS | Severity: | S2 (Serious) |
Version: | 8 | OS: | CentOS (7.3) |
Assigned to: | CPU Architecture: | x86 | |
Tags: | spatial, ST_PolyFromText, validate |
[6 May 2018 10:33]
Lee Eric
[6 May 2018 13:44]
MySQL Verification Team
Thank you for the bug report. Please provide the complete test case (create table, insert data and then update). Thanks.
[6 May 2018 14:12]
Lee Eric
create database and insert data
Attachment: test.sql (application/octet-stream, text), 2.87 KiB.
[6 May 2018 14:16]
Lee Eric
if you want to test. Just create a table with a polygon column and srid is 4326. Insert the data like ST_PolyFromText('POLYGON((-180 -90,180 -90,180 90,-180 90,-180 -90)). The error will show.
[6 May 2018 14:18]
Lee Eric
I check the define of wkt. the point format is "x y". But I test mysql8, it looks like "y x".
[7 May 2018 6:27]
Norvald Ryeng
Hi, The test case tries to create the polygon with: ST_PolyFromText('POLYGON((-180 -90,180 -90,180 90,-180 90,-180 -90))',4326) SRID 4326 is a geographic spatial reference system with axis order latitude-longitude, not longitude-latitude. Therefore, coordinates are also expected in that order, i.e., "POLYGON((lat1 lon1, lat2 lon2, ...)). For more details, see https://mysqlserverteam.com/axis-order-in-spatial-reference-systems/.