Function |
Mysql Spatial Extension |
PostGIS |
Spatial index |
MyISAM only supports R-Tree indexing, InnoDB does not support |
Gist Tree Index (variant of R-Tree) |
Type of space supported |
Only two-D data |
Two-dimensional, three-dimensional and curve |
Space Operation function |
Finite space function |
Basic realization of OGC standard defined space operation function |
For example: To find points within a blue polygon, the MySQL space extension can only detect points within the smallest outsourced rectangle (red box), and PostGIS can detect points within a freeform polygon. #FormatImgID_0 # |
Space projection |
does not support |
supports a variety of common projection coordinate systems |
For example: To find the distance between two points. MySQL spatial can only compute Euclidean space distances, while PostGIS can calculate real space distances under different projection coordinates. |
Transaction support |
does not support |
PostGIS provides a range of long transaction support that can effectively support complex spatial analysis functions |
Query efficiency |
Load speed: MySQL > PostGIS (Transaction) Spatial index creation: MySQL < PostGIS (diff split Algo) Query: MySQL PostGIS (different nature of the query results, vary) |
GIS system use |
Use less |
Use more, such as OpenStreetMap database background is Postgresql+postgis |
Summary: If you only do some simple GIS or lbs application, the spatial extensions provided by MySQL can be basically satisfied. But if the required functionality is more complex, MySQL spatial extensions may not be able to provide enough functionality, and Postgresql+postgis may be more appropriate.