File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ def write_metadata(
4343 raise FileExistsError (
4444 "Metadata already exists, and overwrite is False. Nothing will be written"
4545 )
46- if overwrite :
47- remove_metadata (gdb = gdb , layer = layer )
4846
4947 xml_data = metadata .to_xml ()
5048 md = xml_data .decode ("utf-8" ) if isinstance (xml_data , bytes ) else xml_data
@@ -79,7 +77,7 @@ def remove_metadata(gdb: Path, layer: str) -> None:
7977
8078
8179# TODO: refactor this for speed. Requirement to rezip is slow for large GDBs.
82- # With a 76MB zipped gdb, performance: unzip: 0.92s, gdal: 0.67s, rezip: 7.36s
80+ # With a 76MB zipped gdb, performance: unzip: 0.92s, gdal: 0.67s, rezip: 7.36ss
8381def _edit_layer_metadata_inplace (
8482 gdb : Path ,
8583 layer : str ,
@@ -132,6 +130,5 @@ def _edit_md(
132130 z .write (
133131 filename = file , arcname = file .relative_to (uncompressed_gdb .parent )
134132 )
135-
136133 else :
137134 _edit_md (gdb = gdb , layer = layer , metadata = metadata )
You can’t perform that action at this time.
0 commit comments