mysql将geojson字符串字段保存成MultiPolygon类型字段
不说废话,直接上代码:
update table_name set the_geom = st_geomfromgeojson ( CONCAT ( '{"type": "MultiPolygon", "coordinates": ', geojson, '}' ) ) where geojson is not null;
说明:geojson是保存geojson格式的字段。
mysql将geojson字符串字段保存成MultiPolygon类型字段
不说废话,直接上代码:
update table_name set the_geom = st_geomfromgeojson ( CONCAT ( '{"type": "MultiPolygon", "coordinates": ', geojson, '}' ) ) where geojson is not null;
说明:geojson是保存geojson格式的字段。
本文由 用户 于 2023-09-07 发布在 夸智网,如有疑问,请联系我们。
本文链接:https://www.kuazhi.com/post/567216.html
发表评论