* Guard file operations on MemoryFile.
Calling file operations on null pointer crashes Python interpreter.
* Update closed error message.
Remove special case of tell on closed file.
* Test I/O operations on closed MemoryFile.
---------
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
* Use GDAL_PAM_ENABLED=False in combo with FilePath
Resolves#2826
* Turn down logging level in Python File VSI plugin callback
* Rename test, add missing details to FilePath docstring
* Note fix for 2826
* rasterio.open returns a dataset object for all kinds of input
Resolves#2360.
* Make dataset _env an ExitStack, everywhere
* propagate keyword arguments to delegates
* Remove unused function
* Initial proof of concept for Python file-like VSI handler
* Add GDAL VSI Plugin definitions to gdal.pxi [skip ci]
* Add proof of concept pyvsi with GDAL Plugin API [skip ci]
* Add global filesystem state to PyVSI plugin
* Add close function handler to pyvsi plugin
* Move cython language definition to cython module
* Switch _pyvsi extension to use cpp compile options
* Add pyvsi_ prefix to GDAL callback functions to avoid collisions
* Add basic information to _pyvsi module docstring
* Remove ability to open PyVSIFile as writable
* Remove unnecessary code from PythonVSIFile
* Match new code style used in MemoryFile
* Fix PythonVSIFile argument passing to __init__
* Update memoryfile tests to use pytest fixtures instead of hardcoded paths
* Add read method to PythonVSIFile
* Add PythonVSIFile tests
* Fix xfail reason on pyvsi test
* Add concurrent pyvsi test
* Add flexible PythonVSIFile plugin importing for GDAL<3.0
* Remove legacy 'ext' keyword argument for PythonVSIFile interface
* Rename "PyVSI" to "FilePath" and remove unnecessary methods
* Rename other instances of pyvsi to filepath
* Rename other instances of pyvsi to filepath
* [warp_add_rpcs] initial update to reproject to support rpcs
* catch kwargs in _calculate_default_transform
* fix allocation of crs to wrong dataset (was src, now dst) in _calculate_default_transform. Specifically where we went from GDALCreateGenImgProjTransformer -> GDALCreateGenImgProjTransformer2
* pass kwargs to calculate_default_transform (to be passed to transformer
* update docstrings
* update documentation
* add debug messages for kwargs used to set Transformer options
* Don't capitalize RPC_DEM transformer option value, as it might be a path
* includes existing changes from https://github.com/mapbox/rasterio/pull/2030, better support for computation of calculate_default_transform with just gcps or rpcs
* adds testse
* Remove an empty line
Mainly to trigger a new build on travis-ci.com
* add new test file (Largely derived from RGB.byte.tif)
* Fix incorrectly encoding RPC metadata as transform options
Was checking for transformer option RPC_DEM in the RPC metadata by mistake
Co-authored-by: Sebastien Tremblay-Johnston <sebastien.tremblayjohnston@mdacorporation.com>
Co-authored-by: Sean Gillies <sean@mapbox.com>
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
* Allow arbitrary seek to support multi-part writes
Resolves#1926
The implementation of MemoryFileBase has changed quite a bit: we
are eliminating custom code and are relying more on the VSI API.
Also: memory files exist now within a dedicated directory, making it
easier to ensure that we're cleaning up auxiliary files.
* Add tests confirming the fix for #1926
* 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