MySQL currently supports the spatial datasets. To enable Spatial datasets support, MySQL utilize the MySQL spatial extension. With this spatial extension, MySQL database has capabilities to generate, analyze and store the geographic features such as:
- Data types for representing spatial features
- Functions for manipulating the spatial data
- Spatial indexing feature that will improve access time to a large dataset
Well, that is the theory and it’s quite promising. We could have several options to store our spatial dataset into the database. The PostgreSQL with it’s PostGIS extension also provides great performance to store spatial dataset. But, for MySQL users, you could face some errors or misconfigure database that blocks you from uploading your dataset to the MySQL database.
Is MySQL Spatial Data Has Any Good?
I would expect that MySQL has a good performance in handling the Spatial database. I have been using it for years to store my non-spatial datasets and it has been working great. But, on my first attempt to export my spatial data to MySQL Server, I got some frustrating errors. And the worse thing is that I could not find a good tutorial or guide to solve my problems.
Common Problems
I was trying to load or export my spatial data to MySQL Server using MySQL Workbench. When I tried to load spatial data using the built-in menu in Workbench, I got the following error. It says that ogr2info and ogr2ogr tool is not present.
Well, at this point, I can’t do anything except trying to find out how to get the ogr2ogr works on my Windows 10, where I run Workbench. Visiting the official MySQL spatial data documentation doesn’t help much.
Joaquim
October 11, 2018Hello,
Try to install the GDAL application like you can see in this link:
https://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows
After install GDAL and add the PATHs in the Environment Variables, restart the PC and try to import the shapefiles using the Workbench “Load spatial data”.
Regards
admin
October 12, 2018Thanks bro.
I will update my article with this information.