A
A
AnotherAnkor2016-05-05 23:45:03
MySQL
AnotherAnkor, 2016-05-05 23:45:03

How to cast json to geojson in mysql?

In geojson the polygon array looks like this

SET @g = 'POLYGON((0 0.10 0.10 10.0 10.0 0),(5 5.7 5.7 7.5 7, 5 5))';

The same array in regular json looks different.
Is there a standard mysql function to cast json to geojson?
And if not, do you have one?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Tikhomirov, 2016-05-06
@Acuna

Alas, as far as I know, the muscle can only store data in json, so you need to store it in it, and you need to get it for work and convert it to geojson in php. There is a good library for this:
https://github.com/bmcbride/PHP-Database-GeoJSON/b...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question