| This class represents the parameters passed to an ArcSDERasterReader each
time an image is read.
Some parameters from the parent class are interpreted strictly in this class.
Required parameters during a read:
- An open and connected
SeConnection used to suck out data from
ArcSDE for this image read operation.(setConnection())
- A
HashMap with
Integer keys equal to the
SeObjectId.longValue() of each
SeRasterBand which is to be read.
Values for each key should be the integer value of the band in the output
image to which the given SeRasterBand should be copied.
For
example, if your ArcSDE Raster contains four bands with
SeRasterBand.getId().longValue()s of 234,235,236 and 237, and you wish to map
those bands to the R,G,B and A bands in your ARGB image, you should create a
map as follows: Map m = new HashMap(); m.put(new Integer(234),
new Integer(1)); m.put(new Integer(234), new Integer(2));
m.put(new Integer(234), new Integer(3)); m.put(new Integer(234), new
Integer(0)); Note that the band indexes you choose will depend on
the type of BufferedImage you're writing to. A BufferedImage of type
BufferedImage.TYPE_INT_ARGB has its bands in the order "Alpha (0), Red (1),
Green (2), Blue (3)". A BufferedImage of type BufferedImage.TYPE_3BYTE_BGR
has its bands in the order "Blue (0), Green (1), Red (2)".
- A (possibly null)
BufferedImage , passed in via the
'setDestination()' method. Make sure your bandmapper and this image contain
the same number of bands, and that you've mapped your output appropriately.
If you leave this parameter null, a BufferedImage.TYPE_INT_ARGB will
be created, of exactly the size to cover your requested source region
- An int[] of requested source bands from ArcSDE, set via
setSourceBands(). ArcSDE expects the int[] to have the same size as the
number of bands you're requesting. The first band should be numbered '1', the
second '2', etc. So, to request the second, third and fourth bands in a
raster, use a setSourceBands() call like the following:
param.setSourceBands(new int[] { 2, 3, 4 }); A source band with the
value of zero won't work! start with 1!
- A
Rectangle defining the source area of the raster level you
wish to render. This is expressed as though the entire raster level was one
big seamless image of size wxh, with the origin in the upper left corner. So,
to request a tiny bit of the raster level, simply set your sourceRegion
accordingly and only the proper bit of the raster will be loaded.
author: sfarber |