Skip to main content
5 events
when toggle format what by license comment
Jan 18, 2019 at 21:07 comment added Evan Carroll You can do anything with stored procedures because they're turing complete. But this would be no fun. I doubt MySQL will ever get them. Boost doesn't yet them, and MySQL is using Boost. And, even if Boost does get them, it's not likely to be high on Oracle's priority list. A few people are working on Boost, github.com/boostorg/geometry
Jan 18, 2019 at 20:56 comment added user1960364 Sorry, perhaps polygon wasn't the right word. I know it creates a curve since it's forming around a sphere. My point was that it's still based on mathematics so there should be a way to create a stored procedure that does the same, right? Granted, it probably wouldn't be as performant, but I do believe they intent to add this functionality into the core from what I've seen in MySQL 8 thus-far.
Jan 18, 2019 at 20:45 comment added Evan Carroll Because that would create a polygon suitable for Cartesian math. You connect two points on a sphere with an arc, and a bounding box on a sphere is different from a bounding box on a 2d-projection of a sphere. You should look at a geography envelope from PostGIS stackoverflow.com/questions/26743578/… Ideally you don't have to worry about this, it would just work. But it's MySQL.
Jan 18, 2019 at 20:01 comment added user1960364 Why do you say there is "clearly no work around"? From my understanding, ST_MakeEnvelope() just takes two points and creates a polygon. I'm not very good at math, but I'm pretty sure this is a simple mathematical equation that could be placed in a stored function until MySQL gets around to implementing it. MySQL has spatial indexes and they're working on adding support for geographic SRIDs. "As of 8.0.11 there are a few spatial functions that don’t yet support geography"
Jan 18, 2019 at 16:59 history answered Evan Carroll CC BY-SA 4.0