Is bulk conversion from csv to shapefile possible with ogr2ogr? I can do it file by file when I first create dbf file, then using vrt file I create shapefile. But using command
for /R %f in (*.csv) do ogr2ogr -t_srs EPSG:4326 -f "ESRI Shapefile" "%~dpnf.shp" "%f
I am able to get only the dbf and prj file, but not qpj, shp nor shx files. I have hundreds of csv files in one folder I would like to convert to shapefiles, but I'm on half way to achieve this.
Edit
For a single file I first created .dbf file: ogr2ogr -f "ESRI Shapefile" all8.dbf all8.csv
Then, I created all8.vrt file:
<OGRVRTDataSource>
<OGRVRTLayer name="all8">
<SrcDataSource>all8.csv</SrcDataSource>
<SrcLayer>all8</SrcLayer>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="Longitude" y="Latitude"/>
</OGRVRTLayer>
</OGRVRTDataSource>
And finally run: ogr2ogr -f "ESRI Shapefile" all8 all8.vrt
I also tried to replace "all8" in .vrt file with "*" (to create multiple shapefiles using only one .vrt file), but that did'nt work.