merge_shps¶
-
pydriosm.reader.
merge_shps
(paths_to_shp_files, path_to_merged_dir, method='pyshp')¶ Merge multiple shapefiles.
- Parameters
paths_to_shp_files (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
method (str) – the method used to merge/save shapefiles; options include:
'pyshp'
(default) and'geopandas'
(or'gpd'
) ifmethod='geopandas'
, this function relies on geopandas.GeoDataFrame.to_file(); otherwise, it by default uses shapefile.Writer()
Note
If
method
is set to be'geopandas'
(or'gpd'
), it requires availability of the package GeoPandas.See also
The example for the function
merge_layer_shps()
.