Added driver format argument to _delete_dataset_if_exists#3366
Added driver format argument to _delete_dataset_if_exists#3366snowman2 merged 3 commits intorasterio:mainfrom
_delete_dataset_if_exists#3366Conversation
|
Sounds good to me, @normanb ! I don't know what's up with the failing tests in test_rio_transform.py. |
|
Thanks @sgillies! I have recreated the issue with test_rio_transform.py So Fails as per the test suite I will dig into it. |
|
Freezing the click CLI runner seemed to fix some bugs e.g. |
|
I ran And only got one failing test which didn't match the failures above. From looking at other PRs it isn't just this PR that broke the CI? How do you want to progress? It seems like fixing the CI is a PR by itself. Any ideas on things I should try? |
|
@normanb Yes, the workflows are decomposing. I would let them go if I were you. I hope that I'll get some paid time to work on them, some day. |
|
Superseded by #3473 |
A short PR to improve performance and solve an issue with deleting datasets prior to write.
_delete_dataset_if_existscurrently callsopen_datasetwhich triggers a driver scan within GDAL. If the user has specified aformatthen this should be used to check if the dataset exists. A driver scan also causes some performance overhead.Not specifying a format can cause a different exception to be thrown which is then not caught in
_delete_dataset_if_exists.An example (I will link the PR) is the support for
vsiazwith the GDAL TileDB driver. Creating an array withvsiazdirectly, e.g./vsiaz/myarraywill fail if the format is not specified as the driver scan will throw an error as other drivers will be tried. It is not possible to download a portion of/vsiaz/myarrayas it is not a single file and hence the checks for headers and file extensions do not apply in GDALIdentify.