|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.model.cv.CV_Coverage_Impl
org.deegree_impl.model.gc.GC_GridCoverage_Impl
Represent the basic implementation which provides access to grid coverage data.
A GC_GridCoverage
implementation may provide the ability to update
grid values.
Field Summary | |
private static Cache |
cache
|
private PT_Envelope |
envImg
|
private GC_GridGeometry |
gridGeometry
|
private GC_GridPacking |
gridPacking
|
private GeoTransform |
gt
|
private boolean |
isEditable
|
private GC_GridGeometry[] |
overviewGridGeometry
|
private GC_GridCoverage[] |
overviews
|
Fields inherited from class org.deegree_impl.model.cv.CV_Coverage_Impl |
descriptor, dimensionNames, envelope, metadata, numSources, sampleDimensions |
Constructor Summary | |
GC_GridCoverage_Impl(CVDescriptor descriptor,
boolean isEditable)
initialzies a simple CV_Coverage with an image, coordinate reference system, an envelope describing the spatial extension of of the coverage and the coverages metadata. |
Method Summary | |
private Level |
filterRange(RangeParamList rangeParams,
java.util.List rangeCollector)
Return the Level matching the ranges given in the request. |
private java.awt.image.BufferedImage |
getBufferedImage(GM_Envelope env,
int width,
int height,
int imageType,
Tile[] tiles,
RangeParamList rangeParams,
java.util.List usedRanges)
reads a grid coverage from image sources and returns it as BufferedImage |
boolean[] |
getDataBlockAsBoolean(GC_GridRange gridRange)
Return a sequence of boolean values for a block. |
byte[] |
getDataBlockAsByte(GC_GridRange gridRange)
Return a sequence of byte values for a block. |
int[] |
getDataBlockAsInteger(GC_GridRange gridRange)
Return a sequence of int values for a block. |
PT_Envelope |
getGridCoverageSize()
|
GC_GridGeometry |
getGridGeometry()
Information for the grid coverage geometry. |
GC_GridPacking |
getGridPacking()
Information for the packing of grid coverage values. |
int |
getNumOverviews()
Number of predetermined overviews for the grid. |
int[] |
getOptimalDataBlockSizes()
Optimal size to use for each dimension when accessing grid values. |
GC_GridCoverage |
getOverview(int overviewIndex)
Returns a pre-calculated overview for a grid coverage. |
GC_GridGeometry |
getOverviewGridGeometry(int overviewIndex)
Return the grid geometry for an overview. |
byte[] |
getPackedDataBlock(GC_GridRange gridRange)
Return a block of grid coverage data for all sample dimensions. |
CV_PaletteInterpretation |
getPaletteInterpretation()
returns the paletteinterpretation of the grid coverages bands |
java.lang.Object |
getRaster(GM_Envelope env)
returns a part of the GridCoverage defined by the submitted bounding box (coordinates at the gc's CRS) as BufferedImage |
java.lang.Object |
getRaster(GM_Envelope env,
int width,
int height)
returns a part of the GridCoverage defined by the submitted bounding box (coordinates at the gc's CRS) |
java.lang.Object |
getRaster(GM_Envelope env,
int width,
int height,
int imageType,
RangeParamList rangeParams)
returns a part of the GridCoverage defined by the submitted bounding box (coordinates at the gc's CRS) as BufferedImage |
CV_SampleDimensionType |
getSampleDimensionType()
|
double |
getScale(GM_Envelope env,
int width,
int height)
returns the scale of the requested gc |
double[] |
getValueBlockAsDouble(GC_GridRange gridRange)
Return a sequence of double values for a block. |
boolean |
isDataEditable()
Returns true if grid data can be edited. |
void |
setDataBlockAsBoolean(GC_GridRange gridRange,
boolean[] values)
Set a block of boolean values for all sample dimensions. |
void |
setDataBlockAsByte(GC_GridRange gridRange,
byte[] values)
Set a block of byte values for all sample dimensions. |
void |
setDataBlockAsDouble(GC_GridRange gridRange,
double[] values)
Set a block of double values for all sample dimensions. |
void |
setDataBlockAsInteger(GC_GridRange gridRange,
int[] values)
Set a block of bint values for all sample dimensions. |
void |
setPackedDataBlock(GC_GridRange gridRange,
byte[] values)
Set a block of grid coverage data for all sample dimensions. |
Methods inherited from class org.deegree_impl.model.cv.CV_Coverage_Impl |
evaluate, evaluateAsBoolean, evaluateAsByte, evaluateAsDouble, evaluateAsInteger, getCoordinateSystem, getDimensionNames, getEnvelope, getMetadataNames, getMetadataValue, getNumSampleDimensions, getNumSources, getSampleDimension, getSource, getTiles, setSampleDimension |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opengis.cv.CV_Coverage |
evaluate, evaluateAsBoolean, evaluateAsByte, evaluateAsDouble, evaluateAsInteger, getCoordinateSystem, getDimensionNames, getEnvelope, getMetadataNames, getMetadataValue, getNumSampleDimensions, getNumSources, getSampleDimension, getSource |
Field Detail |
private static Cache cache
private GC_GridGeometry gridGeometry
private GC_GridPacking gridPacking
private GeoTransform gt
private PT_Envelope envImg
private GC_GridGeometry[] overviewGridGeometry
private GC_GridCoverage[] overviews
private boolean isEditable
Constructor Detail |
public GC_GridCoverage_Impl(CVDescriptor descriptor, boolean isEditable) throws java.rmi.RemoteException
descriptor
- descrition of the GCisEditable
- indicates if the grid coverages data can be editedMethod Detail |
public CV_PaletteInterpretation getPaletteInterpretation()
public CV_SampleDimensionType getSampleDimensionType()
public boolean isDataEditable() throws java.rmi.RemoteException
true
if grid data can be edited.
isDataEditable
in interface GC_GridCoverage
true
if grid data can be edited.
java.rmi.RemoteException
- if a remote method call failed.public void setPackedDataBlock(GC_GridRange gridRange, byte[] values) throws java.rmi.RemoteException
getDataBlock
for details on how to pack the values.
The requested grid range must satisfy the following rules for each dimension
of the grid coverage:
For byte padding rules seeMin grid coordinate <= grid range minimum <= grid range maximum <= maximum grid coordinate
getDataBlock
.
setPackedDataBlock
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.values
- Sequence of grid values for the given region.
java.rmi.RemoteException
- if a remote method call failed.public void setDataBlockAsInteger(GC_GridRange gridRange, int[] values) throws java.rmi.RemoteException
setDataBlockAsInteger
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.values
- Sequence of grid values for the given region.
java.rmi.RemoteException
- if a remote method call failed.public void setDataBlockAsDouble(GC_GridRange gridRange, double[] values) throws java.rmi.RemoteException
setDataBlockAsDouble
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.values
- Sequence of grid values for the given region.
java.rmi.RemoteException
- if a remote method call failed.public void setDataBlockAsByte(GC_GridRange gridRange, byte[] values) throws java.rmi.RemoteException
setDataBlockAsByte
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.values
- Sequence of grid values for the given region.
java.rmi.RemoteException
- if a remote method call failed.public void setDataBlockAsBoolean(GC_GridRange gridRange, boolean[] values) throws java.rmi.RemoteException
The number of values must equal:Min grid coordinate <= grid range minimum <= grid range maximum <= maximum grid coordinate
Where(Max1 Min1 + 1) * (Max2 Min2 + 1)... * (Maxn Minn + 1) * numberSampleDimensions
setDataBlockAsBoolean
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.values
- Sequence of grid values for the given region.
java.rmi.RemoteException
- if a remote method call failed.public double[] getValueBlockAsDouble(GC_GridRange gridRange) throws java.rmi.RemoteException
getValueBlockAsDouble
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.
java.rmi.RemoteException
- if a remote method call failed.public byte[] getPackedDataBlock(GC_GridRange gridRange) throws java.rmi.RemoteException
The sequence of bytes returned will match the data type of the dimension. For example, a grid with one 16 bit unsigned (CV_16BIT_U) sample dimension will return 2 bytes for every cell in the block.Min grid coordinate <= grid range minimum <= grid range maximum <= maximum grid coordinate
For PixelInterleaved | For grids with multiple sample dimensions, padding occurs between pixels for each change in dimension type. |
For LineInterleaved | Padding occurs at the end of each row or column (depending on the valueSequence of the grid). |
For BandSequencial | Padding occurs at the end of every sample dimension. |
valueInBytePacking
.
For grid values bigger than 8 bits, the order of their bytes is given by the
value defined in byteInValuePacking
.
getPackedDataBlock
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.
java.rmi.RemoteException
- if a remote method call failed.public GC_GridGeometry getOverviewGridGeometry(int overviewIndex) throws java.rmi.RemoteException
getOverviewGridGeometry
in interface GC_GridCoverage
overviewIndex
- Overview index for which to retrieve grid geometry. Indices start at 0.
java.rmi.RemoteException
- if a remote method call failed.public GC_GridCoverage getOverview(int overviewIndex) throws java.rmi.RemoteException
numberOverviews-1
.
The overviews are ordered from highest (index 0)
to lowest (numberOverviews -1) resolution.
Overview grid coverages will have overviews which are the overviews for
the grid coverage with lower resolution than the overview.
For example, a 1 meter grid coverage with 3, 9, and 27 meter overviews
will be ordered as follows:
Index | resolution |
0 | 3 |
1 | 9 |
2 | 27 |
Index | resolution |
0 | 9 |
1 | 27 |
getOverview
in interface GC_GridCoverage
overviewIndex
- Index of grid coverage overview to retrieve. Indexes start at 0.
java.rmi.RemoteException
- if a remote method call failed.public int[] getOptimalDataBlockSizes() throws java.rmi.RemoteException
getOptimalDataBlockSizes
in interface GC_GridCoverage
java.rmi.RemoteException
- if a remote method call failed.public int getNumOverviews() throws java.rmi.RemoteException
getNumOverviews
in interface GC_GridCoverage
java.rmi.RemoteException
- if a remote method call failed.public GC_GridPacking getGridPacking() throws java.rmi.RemoteException
getGridPacking
in interface GC_GridCoverage
java.rmi.RemoteException
- if a remote method call failed.public GC_GridGeometry getGridGeometry() throws java.rmi.RemoteException
getGridGeometry
in interface GC_GridCoverage
java.rmi.RemoteException
- if a remote method call failed.public int[] getDataBlockAsInteger(GC_GridRange gridRange) throws java.rmi.RemoteException
getDataBlockAsInteger
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.
java.rmi.RemoteException
- if a remote method call failed.public byte[] getDataBlockAsByte(GC_GridRange gridRange) throws java.rmi.RemoteException
getDataBlockAsByte
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.
java.rmi.RemoteException
- if a remote method call failed.public PT_Envelope getGridCoverageSize()
public boolean[] getDataBlockAsBoolean(GC_GridRange gridRange) throws java.rmi.RemoteException
getDataBlockAsBoolean
in interface GC_GridCoverage
gridRange
- Grid range for block of data to be accessed.
java.rmi.RemoteException
- if a remote method call failed.public java.lang.Object getRaster(GM_Envelope env) throws java.io.IOException
env
- bounding box of the area to extracted
java.io.IOException
public java.lang.Object getRaster(GM_Envelope env, int width, int height, int imageType, RangeParamList rangeParams) throws java.io.IOException, CoverageCreationException
env
- bounding box of the area to extractedwidth
- width of the returned rasterheight
- height of the returned rasterimageType
- (color model) type of the image will only be used if the
result is a BufferedImage @see java.awt.image.BufferedImage
java.io.IOException
CoverageCreationException
private Level filterRange(RangeParamList rangeParams, java.util.List rangeCollector)
rangeParams
- a Map of RangeParam; key is the namerangeCollector
- will be filled with the selected ranges
private java.awt.image.BufferedImage getBufferedImage(GM_Envelope env, int width, int height, int imageType, Tile[] tiles, RangeParamList rangeParams, java.util.List usedRanges) throws java.io.IOException
java.io.IOException
public java.lang.Object getRaster(GM_Envelope env, int width, int height) throws java.io.IOException
env
- bounding box of the area to extractedwidth
- width of the returned rasterheight
- height of the returned raster
java.io.IOException
public double getScale(GM_Envelope env, int width, int height)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |