我有一个要转换为 GeoJson 的 csv 文件。
lon,lat,val,id
-97.1589432,25.9642008,0,2690
-97.1682294,25.9761856,0,2691
-97.1775156,25.9881704,0,2692
我运行以下 ogr2ogr 命令
ogr2ogr -f GEOJson geo_result.json source.csv
我得到了这个结果
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "lon": "-97.1589432", "lat": "25.9642008", "val": "0", "id": "2690" }, "geometry": null },
{ "type": "Feature", "properties": { "lon": "-97.1682294", "lat": "25.9761856", "val": "0", "id": "2691" }, "geometry": null },
{ "type": "Feature", "properties": { "lon": "-97.1775156", "lat": "25.9881704", "val": "0", "id": "2692" }, "geometry": null }
]
}
为什么几何为空?我如何告诉 ogr2ogr 哪些值是纬度和经度?