The analogy of Python file objects influences the design of Rasterio dataset
objects. Datasets of a few different kinds exist and the canonical way to
obtain one is to call
rasterio.open with a path-like object or URI-like
identifier, a mode (such as “r” or “w”), and other keyword arguments.
Datasets in a computer’s filesystem are identified by paths, “file” URLs,
or instances of
pathlib.Path. The following are equivalent.
Datasets within a local zip file are identified using the “zip” scheme from Apache Commons VFS.
! is the separator between the path of the archive file and the
path within the archive file. Also note that his kind of identifier can’t be expressed using
Similarly, variables of a netCDF dataset can be accessed using “netcdf” scheme identifiers.
Datasets on the web are identifed by “http” or “https” URLs such as
Datasets within a zip file on the web
are identified using a “zip+https” scheme and paths separated by
! as above.
Datasets on AWS S3 may be identified using “s3” scheme identifiers.
Resources in other cloud storage systems will be similarly supported.