Brenda Thompson Я только что внес некоторые изменения в данные, они отсутствуют с некоторыми закрывающими скобками, я надеюсь, что это решение вам поможет:)
data = {
"type": "FeatureCollection",
"name": "waypoints_geoJSONtest",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" }},
"features": [{ "type": "Feature", "properties": { "fid": 1.0, "point": "001", "time": "2020\/03\/05 16:17:11.000", "elevation": 68.171204, "notes_plan": None, "notes_lulc": None, "notes_medi": None, "notes_othe": "Inicio trayecto", "Category": None }, "geometry": { "type": "Point", "coordinates": [ -78.759113, 9.034811 ] } },{ "type": "Feature", "properties": { "fid": 2.0, "point": "002", "time": "2020\/03\/05 16:22:53.000", "elevation": 76.204994, "notes_plan": "Cuipo", "notes_lulc": None, "notes_medi": None, "notes_othe": None, "Category": "Plantas" }, "geometry": { "type": "Point", "coordinates": [ -78.759178, 9.034232 ] } }],
}
for i in data["features"]:
print(i)
Вывод:
{'type': 'Feature', 'properties': {'fid': 1.0, 'point': '001', 'time': '2020\\/03\\/05 16:17:11.000', 'elevation': 68.171204, 'notes_plan':
None, 'notes_lulc': None, 'notes_medi': None, 'notes_othe': 'Inicio trayecto', 'Category': None}, 'geometry': {'type': 'Point', 'coordinates': [-78.759113, 9.034811]}}
{'type': 'Feature', 'properties': {'fid': 2.0, 'point': '002', 'time': '2020\\/03\\/05 16:22:53.000', 'elevation': 76.204994, 'notes_plan':
'Cuipo', 'notes_lulc': None, 'notes_medi': None, 'notes_othe': None, 'Category': 'Plantas'}, 'geometry': {'type': 'Point', 'coordinates': [-78.759178, 9.034232]}}
Согласно требованиям, если вам нужен доступ к данным по индексу, используйте этот код
data = {
"type": "FeatureCollection",
"name": "waypoints_geoJSONtest",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" }},
"features": [{ "type": "Feature", "properties": { "fid": 1.0, "point": "001", "time": "2020\/03\/05 16:17:11.000", "elevation": 68.171204, "notes_plan": None, "notes_lulc": None, "notes_medi": None, "notes_othe": "Inicio trayecto", "Category": None }, "geometry": { "type": "Point", "coordinates": [ -78.759113, 9.034811 ] } },{ "type": "Feature", "properties": { "fid": 2.0, "point": "002", "time": "2020\/03\/05 16:22:53.000", "elevation": 76.204994, "notes_plan": "Cuipo", "notes_lulc": None, "notes_medi": None, "notes_othe": None, "Category": "Plantas" }, "geometry": { "type": "Point", "coordinates": [ -78.759178, 9.034232 ] } }],
}
for i in range(len(data["features"])):
print(data["features"][i])