Re: How to use to overwrite existing GPKG file?

Sean Gillies

Because a geopackage file can contain multiple layers, opening a layer in "w" mode does not overwrite the entire .gpkg file. If you want to overwrite a layer, you need to pass "overwrite=True" to For example:

>>> with"/tmp/coutwildrnp.gpkg", "w", driver="GPKG", crs=crs, schema=schema, layer="coutwildrnp", overwrite=True) as col:
...     col.write(feat)
>>> with"/tmp/coutwildrnp.gpkg", layer="coutwildrnp") as col:
...     len(col)

On Thu, Jun 6, 2019 at 7:05 AM <joe.huang@...> wrote:
I'm trying to overwrite a temporary file with fiona,open, but it throws an error. Is there a way to get around this?

Sean Gillies

Join to automatically receive all group messages.