SHP.merge_shps¶
- classmethod SHP.merge_shps(shp_pathnames, path_to_merged_dir, engine='pyshp', **kwargs)[source]¶
Merge multiple shapefiles.
- Parameters:
shp_pathnames (list) – list of paths to shapefiles (in .shp format)
path_to_merged_dir (str) – path to a directory where the merged files are to be saved
engine (str) – the open-source package that is used to merge/save shapefiles; options include:
'pyshp'(default) and'geopandas'(or'gpd') whenengine='geopandas', this function relies on geopandas.GeoDataFrame.to_file(); otherwise, it by default uses shapefile.Writer()
Note
When
engine='geopandas'(orengine='gpd'), the implementation of this function requires that GeoPandas is installed.
See also
Examples for
merge_layers().