|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectNewGridCoverageReference
public final class NewGridCoverageReference
A structure which contain the information to be added in the Coverage Database for a new coverage reference. The information provided in this class match closely the layout of the coverage database.
Instances of this class are created by Layer.addCoverageReferences(Collection,
CoverageDatabaseController) and dispatched to CoverageDatabaseListeners. The
listeners can modify the field values before
the insertion in the database occurs.
CoverageDatabaseListener
| coverage/geotk-coverage-sql (download) | View source code for this class |
| Field Summary | |
|---|---|
DateRange[] |
dateRanges
The date range, or null if none. |
String |
extension
The filename extension (not including the leading dot), or null if none. |
String |
filename
The filename, not including the path and extension. |
String |
format
The name of the coverage format. |
AffineTransform |
gridToCRS
The grid to CRS transform, which maps always the pixel upper left corner. |
int |
horizontalSRID
The horizontal CRS identifier. |
Rectangle |
imageBounds
The image bounds. |
int |
imageIndex
The zero-based index of the image to be inserted in the database. |
File |
path
The path to the coverage file (not including the filename), or null if the filename
has no parent directory. |
List<GridSampleDimension> |
sampleDimensions
The sample dimensions for coverages associated with the format, or an empty list if undefined. |
int |
verticalSRID
The vertical CRS identifier, ignored if verticalValues is null. |
double[] |
verticalValues
The vertical coordinate values, or null if none. |
| Method Summary | |
|---|---|
String[] |
getAlternativeFormats()
Returns a list of formats which may be used as an alternative to format. |
File |
getFile()
Returns the path to the coverage file as "path/filename. |
boolean |
isFormatDefined()
Returns true if the format is already defined in the database,
or false if this is a new format. |
void |
refresh()
Recomputes some attributes in this NewGridCoverageReference. |
String |
toString()
Returns a string representation for debugging purpose. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final File path
null if the filename
has no parent directory. The full path to the input file is
"path/filename.extension".
filename,
extension,
getFile()public final String filename
path,
extension,
getFile()public final String extension
null if none.
path,
filename,
getFile()public int imageIndex
imageIndex is
dateRanges[0].imageIndex + 1 is
dateRanges[1].imageIndex + n
is dateRanges[n] where n =
dateRanges.length - 1.
public String format
"Formats" table. Note that this is not necessarily the same name than the
image format name.
This field is initialized to the format which seems the best fit. A list of
alternative formats can be obtained by getAlternativeFormats().
isFormatDefined(),
getAlternativeFormats(),
refresh()public final List<GridSampleDimension> sampleDimensions
Each GridSampleDimension specifies how to convert pixel values to geophysics values,
or conversely. Their type (geophysics or not) is format dependent. For example coverages
read from PNG files will typically store their data as integer values (non-geophysics),
while coverages read from ASCII files will often store their pixel values as real numbers
(geophysics values).
The content of this list can be modified in-place.
refresh()public final Rectangle imageBounds
If the (x,y) origin is different than (0,0), then it will be interpreted as the
translation to apply on the grid before to apply the gridToCRS
transform at reading time.
This field is never null. However users can modify it before the
new entry is inserted in the database.
public final AffineTransform gridToCRS
imageBounds.
This field is never null. However users can modify it before the
new entry is inserted in the database.
public int horizontalSRID
"spatial_ref_sys" PostGIS table. The value may be 0 if this
class found no information about the horizontal SRID.
public int verticalSRID
verticalValues is null.
When not ignored, this shall be the value of a primary key in the
"spatial_ref_sys" PostGIS table. The value may be 0 if this
class found no information about the vertical SRID.
public double[] verticalValues
null if none.
public DateRange[] dateRanges
null if none. This array usually contains only one element,
but more than one time range is allowed if the image file contains data at many times.
In the later case, the sequence of date ranges is associated to the sequence of
image indices, i.e.:
dateRanges[0] is the temporal extent of the image at index imageIndex.dateRanges[1] is the temporal extent of the image at index imageIndex + 1.dateRanges[n] is the temporal extent of the image at index
imageIndex + n where n = dateRanges.length - 1.
| Method Detail |
|---|
public File getFile()
null if filename is null.path,
filename,
extension
public String[] getAlternativeFormats()
throws CoverageStoreException
format.
This method can be invoked from Graphical User Interface wanting to provide a
choice to user.
format.
CoverageStoreException - If an error occurred while fetching the list of
alternative formats from the database.
public boolean isFormatDefined()
throws CoverageStoreException
true if the format is already defined in the database,
or false if this is a new format.
true if the current format is defined in the database.
CoverageStoreException - If an error occurred while reading from the database.format
public void refresh()
throws CoverageStoreException
NewGridCoverageReference. This method can be
invoked after one of the following attributes changed:
The current implementation recomputes the following attributes. Note that this list may be expanded in a future version.
CoverageStoreException - If an error occurred while reading from the database.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||