4

I want to import GeoJSON data into MySQL to compare performance with other databases. Is there any way I can import following data into MySQL. And if it possible, how to create table for such records.

{"type":"FeatureCollection","features":[{"type":"Feature","geometry":
{"type":"Point","coordinates":[-122.085823,37.386337]},"properties":
{"id":"1","name":"Frankie Johnnie & Luigo Too","address":"939 W El Camino Real, Mountain View, CA"}},
{"type":"Feature","geometry":{"type":"Point","coordinates":[-122.083237,37.387138]},
"properties":{"id":"2","name":"Amici's East Coast Pizzeria","address":"790 Castro St, Mountain View, CA"}},
{"type":"Feature","geometry":{},"properties":{"id":""}},
{"type":"Feature","geometry":{},"properties":{"id":""}}]}

1 Answer 1

3

MySQL databases don't really support GeoJSON as such, they follow the model put forward by OGC which follows the WKT format.

Having said that you could put your GeoJSON in a json field although thats probably not ideal as you lose access to the spatial analysis functions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.