Is there a way to extract the minimum and maximum x and y values separately from a polygon value in MariaDB (I'm using 10.5.8 with no extensions)?
Eg:
set @poly = ST_GeomFromText('POLYGON((1.2 1.2,2 1,2 0,1 0,1.2 1.2))');
What I want is to extract the top (max_y), bottom (min_y), left (min_x), and right (max_x) values separately. So for example here "top" is 1.2, "bottom" is 0, "left" is 1, and "right" is 2.
I can get a "minimum bounding rectangle" containing the polygon, which might help, but I don't know how to extract the individual X and Y coordinates:
select ST_Envelope(@poly);
# POLYGON ((1 0, 2 0, 2 1.2, 1 1.2, 1 0))
What I'd like is something like
select ST_MinX(@poly);
# 1