rasterio.path module

Dataset paths, identifiers, and filenames

class rasterio.path.ParsedPath(path, archive, scheme)

Bases: rasterio.path.Path

Result of parsing a dataset URI/Path

path

Parsed path. Includes the hostname and query string in the case of a URI.

Type

str

archive

Parsed archive path.

Type

str

scheme

URI scheme such as “https” or “zip+s3”.

Type

str

archive
classmethod from_uri(uri)
property is_local

Test if the path is a local URI

property is_remote

Test if the path is a remote, network URI

property name

The parsed path’s original URI

path
scheme
class rasterio.path.Path

Bases: object

Base class for dataset paths

class rasterio.path.UnparsedPath(path)

Bases: rasterio.path.Path

Encapsulates legacy GDAL filenames

path

The legacy GDAL filename.

Type

str

property name

The unparsed path’s original path

path
rasterio.path.parse_path(path)

Parse a dataset’s identifier or path into its parts

Parameters

path (str or path-like object) – The path to be parsed.

Returns

Return type

ParsedPath or UnparsedPath

Notes

When legacy GDAL filenames are encountered, they will be returned in a UnparsedPath.

rasterio.path.vsi_path(path)

Convert a parsed path to a GDAL VSI path

Parameters

path (Path) – A ParsedPath or UnparsedPath object.

Returns

Return type

str