copy

Contents

copy#

copy(src_path: str | CloudPath | Path, dst_path: str | CloudPath | Path) CloudPath | Path[source]#

Copy vector (handles shapefiles additional files)

Parameters:
  • src_path (AnyPathStrType) – Source Path

  • dst_path (AnyPathStrType) – Destination Path (file or folder)

Returns:

Path to copied vector

Return type:

AnyPathType

Example

>>> new_aoi_path = copy("in/aoi.shp", "out/aoi.shp")
>>> new_aoi_path
PosixPath('out/aoi.shp')
>>> list(new_aoi_path.parent.glob("*"))
[PosixPath('out/aoi.dbf'), PosixPath('out/aoi.prj'), PosixPath('out/aoi.shp'), PosixPath('out/aoi.shx')]