我有一组坐标需要采用 Geojson 格式但没有双引号,我也仅限于在此数据集上进行选择。这行代码
json_extract_array(st_asgeojson(st_makeline( array_agg(st_geogpoint(locs.lon, locs.lat) order by locs.date))),'$.coordinates') as geo
给我这个
[
"[-8.6359,40.6371716666667]",
"[-8.63589166666667,40.637165]",
"[-8.63589333333333,40.6371583333333]",
"[-8.63589,40.637165]",
"[-8.63588833333333,40.6371716666667]",
"[-8.635885,40.6371766666667]",
"[-8.63588166666667,40.63718]"
]
我需要它变成这样
[
[-8.6359,40.6371716666667],
[-8.63589166666667,40.637165],
[-8.63589333333333,40.6371583333333],
[-8.63589,40.637165],
[-8.63588833333333,40.6371716666667],
[-8.635885,40.6371766666667],
[-8.63588166666667,40.63718]
]