Starting with v2.1, ogr2ogr supports args X_POSSIBLE_NAMES, Y_POSSIBLE_NAMES which are strings with allowed wildcards (eg, Lon* ), or you can use field_1, field_2, etc to explicitly give the position of lat/lon.
It's explained on the driver page.  This StackExchange post shows csv to shapefile conversion and included Windows command line syntax for looping over files in a directory.

On 11/15/2022 12:58 PM, Hugh Kelley wrote:
David, this was my first thought when i saw this question as well.

however, I didn't look for very long but I haven't seen a way to tell ogr2ogr to read columns in a csv as the lat/lon and write those as points to the shapefile.  I generally write a csv to postgres as a non-spatial table and then process the lat lon columns with postgis.

 Are there arguments for ogr2ogr that can do this?

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to