MySQL Forums
Forum List  »  GIS

MySQL 8: ST_Interects works very strange
Posted by: Борис Мартиросов
Date: August 31, 2020 02:48AM

Hi!
Since upgrading from Mysql 5.7 to 8.0.
I'm totally confused on how spatial functions work!
Look:
SELECT
st_intersects(
ST_GeomFromText(
'POLYGON((-90 -179, -90 180, 90 180, 90 -179, -90 -179))', 4326),
st_geomfromtext('POINT(44.041870130401 42.869292509262)', 4326)
) as result

returns result = 0! Which is wrong IMO.

but SELECT
st_intersects(
ST_GeomFromText('POLYGON((-90 -179, -90 180, 90 180, 90 -179, -90 -179))', 0),
st_geomfromtext('POINT(44.041870130401 42.869292509262)', 0)
) as result
gives result = 1.

How come? And How sholud I fix my query for it to work correctly with 4326 SRID?

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL 8: ST_Interects works very strange
937
August 31, 2020 02:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.