1

I know I can convert multiple shapefiles to other formats like described in this question. Also, I know that I can merge multiple shapefiles into one when I have a PostGIS database like described on this other question. However, I haven't found any information about merging multiple shapefiles in the command line. Is it possible? Or do I need to have a PostgreSQL with PostGIS to accomplish that?

raylight
  • 1,241
  • 4
  • 19
  • Easy if you have the same columns for all your shapefiles. You can use ogrmerge.py with -single option https://gdal.org/programs/ogrmerge.html – ThomasG77 Apr 28 '21 at 20:17
  • 1
    Thanks, I managed to merge them by putting all the shapefiles inside the same folder and using the command ogrmerge.py -single *.shp -o finalResultFolder/merge.shp – raylight Apr 28 '21 at 20:29

1 Answers1

4

It's quite easy if you have the same columns for all your shapefiles and GDAL/OGR installed and know how to use shell commands.

In this case, you can use ogrmerge.py with -single option. Complete documentation with some examples is available at http://gdal.org/programs/ogrmerge.html

ThomasG77
  • 30,725
  • 1
  • 53
  • 93