gdal.Dataset
A set of associated raster bands and/or vector layers, usually from one file.
// raster dataset:
dataset = gdal.open('file.tif');
bands = dataset.bands;
// vector dataset:
dataset = gdal.open('file.shp');
layers = dataset.layers;`
Table of Contents
Methods
buildOverviews
-
resampling
-
overviews
-
bands
Builds dataset overviews.
Parameters:
-
resampling
String"NEAREST"
,"GAUSS"
,"CUBIC"
,"AVERAGE"
,"MODE"
,"AVERAGE_MAGPHASE"
or"NONE"
-
overviews
Integer[] -
[bands]
Integer[] optionalNote: Generation of overviews in external TIFF currently only supported when operating on all bands.
close
()
Closes the dataset to further operations.
Execute an SQL statement against the data store.
Parameters:
-
statement
StringSQL statement to execute.
-
[spatial_filter=null]
gdal.Geometry optionalGeometry which represents a spatial filter.
-
[dialect=null]
String optionalAllows control of the statement dialect. If set to
null
, the OGR SQL engine will be used, except for RDBMS drivers that will use their dedicated SQL engine, unless"OGRSQL"
is explicitely passed as the dialect. Starting with OGR 1.10, the"SQLITE"
dialect can also be used.
Returns:
flush
()
Flushes all changes to disk.
getFileList
()
String[]
Fetch files forming dataset.
Returns a list of files believed to be part of this dataset. If it returns an empty list of files it means there is believed to be no local file system files associated with the dataset (for instance a virtual dataset).
Returns an empty array for vector datasets if GDAL version is below 2.0
Returns:
getGCPProjection
()
String
Get output projection for GCPs.
Returns:
getGCPs
()
Object[]
Fetches GCPs.
Returns:
getMetadata
-
domain
Fetch metadata.
Parameters:
-
[domain]
String optional
Returns:
setGCPs
-
gcps
-
projection
Sets GCPs.
Parameters:
-
gcps
Object[] -
projection
String
testCapability
-
capability
Determines if the dataset supports the indicated operation.
Parameters:
-
capability
String(see capability list)