Does MySQL only support bounding boxes calculations instead of the real polygon geometry?

Your assumption is pretty much correct. MySQL's spatial support is ... simplistic to say the least. It does work, but you'll find very few GIS applications support it. This isn't specific to just polygons, any spatial feature is more limited in MySQL because while it does store them in the same way (WKB), there simply aren't as many functions to manipulate or interogate it.

Full details of the MySQL Spatial Extension analysis functions can be found here: http://dev.mysql.com/doc/refman/5.0/en/spatial-analysis-functions.html

Compare that to Oracle Locator (their "free" spatial extension if you have Oracle Enterprise and the $$$ to match): http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_locator.htm

And of course, PostGIS: http://postgis.net/docs/manual-2.0/reference.html

MS SQL Server has spatial too - http://msdn.microsoft.com/en-us/library/bb964708%28v=sql.105%29.aspx

That's before you start playing with things like topography's, geography's and rasters, none of which I believe MySQL supports. You can clearly see which of those four products is the least feature-complete for spatial data (Hint: MySQL). Its very subjective which is the winner; thats an eternal religious war that belongs in other threads. ;-)


You may only be doing very simple things with the data at this point, however going forward non-MySQL will give you more options if you decide to expand your spatial data processing/storage.


The accepted response is fairly outdated for the current state of the art.

MySQL 5.6 has decent support for the OGC data types on MyISAM tables. You probably don't want to use MyISAM tables though.

MySQL 5.7 has decent support for the OGC data types on innodb tables:

  • https://dev.mysql.com/doc/refman/5.7/en/spatial-types.html
  • https://www.percona.com/blog/2016/02/03/new-gis-features-in-mysql-5-7/

MySQL 8.0 improves on this quite a bit and adds support for srids and projected coordinate systems and generally gets things right:

  • https://dev.mysql.com/doc/refman/8.0/en/spatial-types.html
  • https://mysqlserverteam.com/geography-in-mysql-8-0/

Here's a comparison between 5.7 and 8.0: https://image.slidesharecdn.com/mysql-8-0-gis-are-you-ready-170203182904/95/mysql-80-gis-are-you-ready-10-638.jpg?cb=1520281401

Postgres with GIS extensions is still probably the standard for open source databases, but MySQL is fairly capable circa summer 2019.