|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gdal.gdal.MajorObject
org.gdal.gdal.Driver
public class Driver
Class Driver is an uninstanciable class providing various methods for a format specific driver.
The Driver class is a binding for the C++ GDALDriver class.
An instance of this class is created for each supported format, and manages information about the format. This roughly corresponds to a file format, though some drivers may be gateways to many formats through a secondary multi-library.
Drivers are loaded and registered with the gdal.AllRegister() method
Method Summary | |
---|---|
Dataset |
Create(String name,
int xsize,
int ysize)
Create a new dataset with this driver. |
Dataset |
Create(String name,
int xsize,
int ysize,
int nBands)
Create a new dataset with this driver. |
Dataset |
Create(String name,
int xsize,
int ysize,
int nBands,
int eType)
Create a new dataset with this driver. |
Dataset |
Create(String name,
int xsize,
int ysize,
int nBands,
int eType,
String[] options)
Create a new dataset with this driver. |
Dataset |
Create(String name,
int xsize,
int ysize,
int nBands,
int eType,
Vector options)
Create a new dataset with this driver. |
Dataset |
Create(String name,
int xsize,
int ysize,
int nBands,
String[] options)
Create a new dataset with this driver. |
Dataset |
CreateCopy(String name,
Dataset src_ds)
Create a copy of a dataset. |
Dataset |
CreateCopy(String name,
Dataset src_ds,
int strict)
Create a copy of a dataset. |
Dataset |
CreateCopy(String name,
Dataset src_ds,
int strict,
String[] options)
Create a copy of a dataset. |
Dataset |
CreateCopy(String name,
Dataset src_ds,
int strict,
Vector options)
Create a copy of a dataset. |
Dataset |
CreateCopy(String name,
Dataset src_ds,
int strict,
Vector options,
ProgressCallback callback)
Create a copy of a dataset. |
Dataset |
CreateCopy(String name,
Dataset src_ds,
String[] options)
Create a copy of a dataset. |
Dataset |
CreateCopy(String name,
Dataset src_ds,
Vector options)
Create a copy of a dataset. |
void |
delete()
Deprecated. Do not do anything... |
int |
Delete(String name)
Delete named dataset. |
void |
Deregister()
Deregister the driver. |
String |
getHelpTopic()
Return the URL to the help that describes the driver That URL is relative to the GDAL documentation directory. |
String |
getLongName()
Return the long name of a driver For the GeoTIFF driver, this is "GeoTIFF" |
String |
getShortName()
Return the short name of a driver. |
int |
Register()
Register a driver for use. |
int |
Rename(String newName,
String oldName)
Rename a dataset. |
Methods inherited from class org.gdal.gdal.MajorObject |
---|
GetDescription, GetMetadata_Dict, GetMetadata_Dict, GetMetadata_List, GetMetadata_List, GetMetadataItem, GetMetadataItem, SetDescription, SetMetadata, SetMetadata, SetMetadata, SetMetadata, SetMetadata, SetMetadata, SetMetadataItem, SetMetadataItem |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void delete()
delete
in class MajorObject
public Dataset Create(String name, int xsize, int ysize, int nBands, int eType, String[] options)
That function will try to validate the creation option list passed to the driver with the GDALValidateCreationOptions() method. This check can be disabled by defining the configuration option GDAL_VALIDATE_CREATION_OPTIONS=NO.
At the end of dataset manipulation, the delete() method must be called on the returned dataset otherwise data might not be properly flushed to the disk.
name
- the name of the dataset to create.xsize
- width of created raster in pixels.ysize
- height of created raster in pixels.nBands
- number of bands.eType
- type of raster.options
- list of driver specific control parameters (may be null)
public Dataset Create(String name, int xsize, int ysize, int nBands, String[] options)
Create(String name, int xsize, int ysize, int nBands, int eType, String[] options)
public Dataset CreateCopy(String name, Dataset src_ds, int strict, String[] options)
CreateCopy(String name, Dataset src_ds, int strict, java.util.Vector options, ProgressCallback callback)
public Dataset CreateCopy(String name, Dataset src_ds, Vector options)
CreateCopy(String name, Dataset src_ds, int strict, java.util.Vector options, ProgressCallback callback)
public Dataset CreateCopy(String name, Dataset src_ds, String[] options)
CreateCopy(String name, Dataset src_ds, int strict, java.util.Vector options, ProgressCallback callback)
public String getShortName()
For the GeoTIFF driver, this is "GTiff"
public String getLongName()
public String getHelpTopic()
For the GeoTIFF driver, this is "frmt_gtiff.html"
public Dataset Create(String name, int xsize, int ysize, int nBands, int eType, Vector options)
Create(String name, int xsize, int ysize, int nBands, int eType, String[] options)
public Dataset Create(String name, int xsize, int ysize, int nBands, int eType)
Create(String name, int xsize, int ysize, int nBands, int eType, String[] options)
public Dataset Create(String name, int xsize, int ysize, int nBands)
Create(String name, int xsize, int ysize, int nBands, int eType, String[] options)
public Dataset Create(String name, int xsize, int ysize)
Create(String name, int xsize, int ysize, int nBands, int eType, String[] options)
public Dataset CreateCopy(String name, Dataset src_ds, int strict, Vector options, ProgressCallback callback)
Note that many sequential write once formats (such as JPEG and PNG) don't implement the Create() method but do implement this CreateCopy() method. If the driver doesn't implement CreateCopy(), but does implement Create() then the default CreateCopy() mechanism built on calling Create() will be used.
It is intended that CreateCopy() will often be used with a source dataset which is a virtual dataset allowing configuration of band types, and other information without actually duplicating raster data (see the VRT driver). This is what is done by the gdal_translate utility for example.
That function will try to validate the creation option list passed to the driver with the GDALValidateCreationOptions() method. This check can be disabled by defining the configuration option GDAL_VALIDATE_CREATION_OPTIONS=NO.
At the end of dataset manipulation, the delete() method must be called on the returned dataset otherwise data might not be properly flushed to the disk.
name
- the name for the new dataset.src_ds
- the dataset being duplicated.strict
- 1 if the copy must be strictly equivelent, or more
normally 0 indicating that the copy may adapt as needed for the
output format.options
- additional format dependent options controlling
creation of the output file.callback
- for reporting algorithm progress. May be null
public Dataset CreateCopy(String name, Dataset src_ds, int strict, Vector options)
CreateCopy(String name, Dataset src_ds, int strict, java.util.Vector options, ProgressCallback callback)
public Dataset CreateCopy(String name, Dataset src_ds, int strict)
CreateCopy(String name, Dataset src_ds, int strict, java.util.Vector options, ProgressCallback callback)
public Dataset CreateCopy(String name, Dataset src_ds)
CreateCopy(String name, Dataset src_ds, int strict, java.util.Vector options, ProgressCallback callback)
public int Delete(String name)
It is unwise to have open dataset handles on this dataset when it is deleted.
name
- name of dataset to delete.
public int Rename(String newName, String oldName)
It is unwise to have open dataset handles on this dataset when it is being renamed.
newName
- new name for the dataset.oldName
- old name for the dataset.
public int Register()
If this driver is already registered, then no change is made, and the index of the existing driver is returned. Otherwise the driver list is extended, and the new driver is added at the end.
public void Deregister()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |