How can i insert a geo co-ordinates data inside a polygon field in mysql , Here is a sample query am using for test
INSERT INTO `zones` (`polygon`) VALUES
('POLYGON(34.44 33.56,32.22 31.34,30.23 26.33,34.44 33.56)')
I keep getting this error when i try to submit the query #1416 - Cannot get geometry object from data you send to the GEOMETRY field
1条答案
按热度按时间jchrr9hc1#
You need to convert the string to proper statial typ in your case
ST_GeomFromText
fiddle