我有一个 GeoJSON 功能集合,它只是旅行的线串。我想为每个功能添加列表和字典。添加到每个要素的数据对于每个要素都不同,但存储顺序与路径相同。如何将此数据作为属性添加到功能集?
type(data)
>>> geojson.feature.FeatureCollection
data[1] #Example of what the data looks like
{'type': 'Feature',
'geometry': {'type': 'LineString',
'coordinates': [[-94.579644, 39.102126],
[-64.579644, 29.102126],
[-64.52684, 29.112103],
[-64.52684, 29.112103]]},
'properties': {'name': 'Route #1'}}
我要添加的数据示例如下。我希望这次旅行的 Trip_ID 成为上述功能集中的属性。
type(Trip_ID)
...list
trip_id[1]
'149b16a4-f1ee-40ce-a165-5326196a1307'
谢谢!