我有一个json字符串,其中包含来自google maps api(方向服务坐标,旅行模式等)的字段。我想将我的json字符串格式化为geojson,以便将其转换为shapefile。我怎么能这样做?
我有一个json字符串的例子:
{
"travelMode": [
[
"WALKING"
],
[
"WALKING"
]
],
"startLat": 48.1493978,
"startLng": 11.56919229999994,
"endLat": 48.1509212,
"endLng": 11.564903700000059,
"waypoints": [],
"paths": [
[
[
{
"k": 48.14940000000001,
"B": 11.56919
},
{
"k": 48.14954,
"B": 11.569280000000001
},
{
"k": 48.1497,
"B": 11.569360000000001
}
]
],
[
[
{
"k": 48.1497,
"B": 11.569360000000001
},
{
"k": 48.14976,
"B": 11.569120000000002
},
{
"k": 48.14985,
"B": 11.56877
},
{
"k": 48.149860000000004,
"B": 11.56872
},
{
"k": 48.14992,
"B": 11.568510000000002
},
{
"k": 48.150130000000004,
"B": 11.56779
},
{
"k": 48.15019,
"B": 11.567580000000001
},
{
"k": 48.15021,
"B": 11.567530000000001
},
{
"k": 48.150400000000005,
"B": 11.56681
},
{
"k": 48.150760000000005,
"B": 11.56544
},
{
"k": 48.150920000000006,
"B": 11.564900000000002
}
]
]
]
}