Re: Problem with AAIGrid overwrite

Sean Gillies
 

Amine,

I'm unable to reproduce this with rasterio 1.1.0. The following script can be executed over and over again and the shade.asc file is overwritten with no error and no messages.

import rasterio

with rasterio.open("/Users/seang/code/rasterio/tests/data/shade.tif") as tif:
    profile = tif.profile
    profile["driver"] = "AAIGrid"
    with rasterio.open("/tmp/shade.asc", "w", **profile) as asc:
        asc.write(tif.read())

It might actually be a permissions issue on your computer.


On Fri, Nov 29, 2019 at 7:38 AM Amine Aboufirass <amine.aboufirass@...> wrote:
Dear All,

For one project I am reading and writing these test raster datasets as ASCII grids. I have found that overwriting these grids is impossible and I get the following error:

ERROR 1: Deleting test_data/out.asc failed:
Permission denied

This is quite annoying because for my testing I need to overwrite and delete files repeatedly. I have to keep deleting them again before I run my application each time and this is quite time consuming.

I have the impression this is related to the GDAL creation options but I am not sure. Could someone please enlighten me? Thanks.

Regards,

Amine



--
Sean Gillies

Join main@rasterio.groups.io to automatically receive all group messages.