8 Commits

Author SHA1 Message Date
Sean Gillies
b3b01e07e6 Add a test of using an LZW-compressed tiff in memoryfile 2017-05-25 15:46:59 +02:00
Sean Gillies
c47604df08 Add a test of MemoryFile failure with not-bytes 2017-02-02 17:39:19 +01:00
Sean Gillies
24a07e4f63 Removal of is_zip(), variable renaming, improved docstrings 2017-02-02 17:23:03 +01:00
Sean Gillies
e27ae34698 Add read-only ZipMemoryFile and more tests 2017-02-01 10:55:45 +01:00
Sean Gillies
3909ae704c MemoryFile() can take a file object parameter
And its open() method can take a path, allowing access to a
raster within a zipfile, such as a VRT.
2017-01-31 23:59:43 +01:00
Sean Gillies
99975e8397 Lightweight context managers around file objects and memory files
Resolves #964
2017-01-30 15:05:03 +01:00
Sean Gillies
f948aeba09 Two new tests to assist feature discussion in #964 2017-01-25 12:02:51 +01:00
Sean Gillies
42c3f36db0 MemoryFile (#915)
* Implementation of MemoryFile.write

* Complete initial impl of MemoryFile and tests

* Adjustment in tests and read() for lack of bytes in Python 2.

* Relax file size assertion, skip tests for GDAL<2.0

* Write a __len__ backed by VSIGetMemFileBuffer()

* Remove leftover except clause

* Add a 'closed' attribute to MemoryFile.

And various code improvements suggested by @brendan-ward.

* Rename check() to exists() and remove entry from pxd

* Revert change to DatasetBase, use case handled in MemoryFile
2016-10-24 16:20:59 +02:00