I have a csv file containing lon,lat coordinates. I want to create a vector layer (points with the lon/lat coordinates) using ogr2ogr.
I did the following:
ogr2ogr -f "ESRI Shapefile" "vector.shp" "coords.csv" -oo X_POSSIBLE_NAMES=lon* -oo Y_POSSIBLE_NAMES=lat* -a_srs EPSG:4326 -nlt POINT -skipfailures
The result is a shapefile with no geometry values. Do I have to define anything else in the above command?
A sample of the coords.csv is as following:
Lon_rounde Lat_rounde ISO3 Year GNFR_Secto SourceType CH4 -17.05 32.675 PRT 2015 A A 57.69167458
I also tried to use the whole name of lon, lat (with the same result) :
> ogr2ogr -f "ESRI Shapefile" "vector.shp" "coords.csv" -oo > X_POSSIBLE_NAMES= Lon_rounde -oo Y_POSSIBLE_NAMES=Lat_rounde -a_srs > EPSG:4326 -nlt POINT -skipfailures