def supports_vsi(driver): """ Returns True if driver supports GDAL's VSI*L API Parameters ---------- driver : str Returns ------- bool """ virutal_io = _get_metadata_item(driver, MetadataItem.VIRTUAL_IO) return virutal_io is not None and virutal_io.upper() == "YES"
def extension(driver): """ Returns file extension of driver Parameters ---------- driver : str Returns ------- str File extensions or None if not specified by driver """ return _get_metadata_item(driver, MetadataItem.EXTENSION)
def supported_sub_field_types(driver): """ Returns supported sub field types Parameters ---------- driver : str Returns ------- list List with supported field types or None if not specified by driver """ field_types_str = _get_metadata_item(driver, MetadataItem.CREATION_FIELD_DATA_SUB_TYPES) if field_types_str is None: return None return [field_type for field_type in field_types_str.split(" ") if len(field_type) > 0]
def extensions(driver): """ Returns file extensions supported by driver Parameters ---------- driver : str Returns ------- list List with file extensions or None if not specified by driver """ exts = _get_metadata_item(driver, MetadataItem.EXTENSIONS) if exts is None: return None return [ext for ext in exts.split(" ") if len(ext) > 0]
def layer_creation_options(driver): """ Returns layer creation options for driver Parameters ---------- driver : str Returns ------- dict Layer creation options """ xml = _get_metadata_item(driver, MetadataItem.LAYER_CREATION_OPTION_LIST) if xml is None: return {} if len(xml) == 0: return {} return _parse_options(xml)
def dataset_open_options(driver): """ Returns dataset open options for driver Parameters ---------- driver : str Returns ------- dict Dataset open options """ xml = _get_metadata_item(driver, MetadataItem.DATASET_OPEN_OPTIONS) if xml is None: return {} if len(xml) == 0: return {} return _parse_options(xml)