I have a folder called CSV, in it there are several CSV files with coordinates and attributes.

  1. I want to convert all files in a CSV folder into shapefiles
  2. New created shapefiles should have original CSV file name
  3. All newly created shapefiles should be placed in another folder called SHP.
  4. Once all shapefiles created, merge all shapefiles into one (could go over a GB)

For this, I tried to play around with ogr2ogr, had a bit of success but could’t go further.

For example, one web page shows to create (1) Create a dbf file (2) Create a vrt file (3) Create the shapefile by using ogr2ogr.

I can recreate what it says but I can’t workout how to point a folder i.e. CSV and convert all files in that into shapefiles.

Once I could accomplish above then, I would like a simple ogr2oge like command to merge all shapefiles into one shapefile.

Another point: Is there any way to use just text.bat file for above processes instead of OSGeo4W shell?

  • 1
    Please ask only one question per Question, as emphasized by the Tour. Coding questions should include the code in the body of the question, along with a complete description of the error. – Vince Dec 21 '19 at 4:07

I use script from here to batch convert from csv to shp. It required python 3x and the library like pandas geopandas fiona and shapely.

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