|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.coverage.raster.io.grid.GridWriter
public class GridWriter
The GridWriter
class TODO add class documentation here.
Field Summary | |
---|---|
static String |
RASTERIO_COLUMNS
Defining the number of columns of the grid rasterwriter, to be used in the RasterIOOptions |
static String |
RASTERIO_ROWS
Defining the number of rows of the grid rasterwriter, to be used in the RasterIOOptions |
Constructor Summary | |
---|---|
GridWriter(int targetColumns,
int targetRows,
Envelope rasterEnvelope,
RasterGeoReference geoRef,
File gridFile,
RasterDataInfo dataInfo)
Create a gridfile writer with the given parameters. |
Method Summary | |
---|---|
boolean |
canWrite(AbstractRaster raster,
RasterIOOptions options)
Check if the raster writer is able to write the given raster. |
Set<String> |
getSupportedFormats()
|
protected Envelope |
getTileEnvelope(int column,
int row)
Calculates the envelope for a tile at a given position in the grid. |
protected int |
getTileId(int column,
int row)
Calculates the id for a tile at a given position in the grid. |
int |
getTileRasterHeight()
|
int |
getTileRasterWidth()
|
void |
leaveStreamOpen(boolean yesNo)
Signals the gridfile reader that it should (not) close the stream after a read. |
void |
setTileRasterHeight(int tileRasterHeight)
|
void |
setTileRasterWidth(int tileRasterWidth)
|
void |
write(AbstractRaster raster,
File gridFile,
RasterIOOptions options)
Write the raster into file. |
void |
write(AbstractRaster raster,
OutputStream out,
RasterIOOptions options)
Write the raster into strem. |
void |
write(AbstractRaster raster,
RasterIOOptions options)
Write the given raster to the previously defined gridfile. |
void |
writeEntireFile(ByteBuffer newBytes)
|
File |
writeMetadataFile(RasterIOOptions options)
Writes the metadata file for this grid file. |
boolean |
writeTile(int column,
int row,
ByteBuffer tileBuffer)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RASTERIO_COLUMNS
public static final String RASTERIO_ROWS
Constructor Detail |
---|
public GridWriter(int targetColumns, int targetRows, Envelope rasterEnvelope, RasterGeoReference geoRef, File gridFile, RasterDataInfo dataInfo) throws IOException
targetColumns
- the number of tiles in the width of the file (columns)targetRows
- the number of tiles in the height of the file (rows)rasterEnvelope
- the Envelope of the total grid file.geoRef
- the geo reference of the grid file.gridFile
- write to the given file.dataInfo
- information about the data written to the grid file.
IOException
Method Detail |
---|
public final int getTileRasterWidth()
public final void setTileRasterWidth(int tileRasterWidth)
tileRasterWidth
- the tileRasterWidth to setpublic final int getTileRasterHeight()
public final void setTileRasterHeight(int tileRasterHeight)
tileRasterHeight
- the tileRasterHeight to setpublic boolean canWrite(AbstractRaster raster, RasterIOOptions options)
RasterWriter
canWrite
in interface RasterWriter
public Set<String> getSupportedFormats()
getSupportedFormats
in interface RasterWriter
Set
of (image) formats mime/types the implementation is able to write.public void write(AbstractRaster raster, File gridFile, RasterIOOptions options) throws IOException
RasterWriter
write
in interface RasterWriter
options
- additional information for the raster writer (format, etc)
IOException
- may be thrown when the file can't be writtenpublic void write(AbstractRaster raster, OutputStream out, RasterIOOptions options) throws IOException
RasterWriter
write
in interface RasterWriter
options
- additional information for the raster writer (format, etc)
IOException
- may be thrown when the file can't be writtenpublic void write(AbstractRaster raster, RasterIOOptions options) throws IOException
raster
- to writeoptions
- can hold information about the info file etc. If null
no meta data file will be written.
Applications should make sure they call writeMetadataFile(RasterIOOptions)
IOException
public File writeMetadataFile(RasterIOOptions options) throws IOException
options
-
IOException
public void leaveStreamOpen(boolean yesNo)
yesNo
- protected Envelope getTileEnvelope(int column, int row)
column
- column , must be in the range [0 ... #columns - 1]row
- row , must be in the range [0 ... #rows - 1]
protected int getTileId(int column, int row)
column
- column, must be in the range [0 ... #columns - 1]row
- row, must be in the range [0 ... #rows - 1]
public void writeEntireFile(ByteBuffer newBytes) throws IOException
newBytes
-
IOException
public boolean writeTile(int column, int row, ByteBuffer tileBuffer) throws IOException
row
- column
- tileBuffer
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |