Skip to main content
edited title
Link
blah238
  • 36k
  • 8
  • 97
  • 205

Why to close a dataset in GDAL Python?

Source Link
ustroetz
  • 8.1k
  • 11
  • 73
  • 120

Why to close a dataset in GDAL Python?

I see quite often in Python GDAL code that people close datasets at the end of their script. Why does it makes sense to close a dataset in Python GDAL? Are there any consequences if I don't do it?

import gdal # open dataset ds = gdal.Open('test.tif') # close dataset ds = None