I have an ASCII file with the following columns : ID, longitude, latitude, value

Is it possible to use OGR (ogr2ogr or ogrinfo) in command line in order to open the ASCII file and convert it to a shapefile (in WGS84) using the point coordinates (X field=longtitude, Y field=latitude) ?

What I want to do is similar with what QGIS does when opening an ascii file with "Delimited Text" and defining the geometry (point coordinates).

I want to do that for a high number of files so I want to know if this is possible in OGR.


What you have is basically comma-separated values, so you can use GDAL's csv driver. You can find its documentation at https://www.gdal.org/drv_csv.html , see especially the section "Building point geometries".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.