|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.carto.RenderedRaster
public class RenderedRaster
A raster that is rendered using a renderer.
Constructor Summary | |
---|---|
RenderedRaster()
Constructs a RenderedRaster using ArcGIS Engine. |
|
RenderedRaster(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. RenderedRaster theRenderedRaster = (RenderedRaster) obj; |
Method Summary | |
---|---|
void |
add(IRasterBand element,
int index)
Adds a RasterBand to the band collection. |
void |
appendBand(IRasterBand element)
Appends a RasterBand to the band collection. |
void |
appendBands(IRasterBandCollection bands)
Appends a collection of RasterBands to the band collection. |
boolean |
canSaveAs(String format)
Checks if it's can be saved as a new persistent Dataset of a given format. |
void |
clear()
Removes all the elements in the collection. |
IRasterCursor |
createCursor()
Allocates a Raster Cursor for fast raster scanning. |
IPixelBlock |
createPixelBlock(IPnt size)
Allocates a PixelBlock of requested size. |
boolean |
equals(Object o)
Compare this object with another |
IRasterBand |
getBandByName(String name)
A RasterBand given its name. |
int |
getBandIndex(String name)
The index of a RasterBand given its name. |
IEnumRasterBand |
getBands()
All the bands in the collection as an interface to the RasterBands enumerator object. |
static String |
getClsid()
getClsid. |
int |
getCount()
The number of bands in the collection. |
IEnvelope |
getExtent()
The extent of the Raster. |
IName |
getFullName()
The full name. |
int |
getHeight()
Height in pixels. |
ILayer |
getLayer()
The source layer. |
Object |
getNoDataValue()
Data value used to indicate invalid or excluded data. |
int |
getPixelType()
Data type of the pixels. |
IRaster |
getRaster()
The source raster. |
IRasterRenderer |
getRenderer()
The raster renderer. |
int |
getResampleMethod()
Interpolation method used when reading pixels. |
ISpatialReference |
getSpatialReference()
SpatialReference of the Raster. |
int |
getWidth()
Width in pixels. |
int |
hashCode()
the hashcode for this object |
void |
init(String layerFile)
Initializes using a layer file. |
boolean |
isForceRGB()
Indicates if RGB output is required (forced). |
boolean |
isInteger()
Indicates if the data is integer. |
boolean |
isRGB32()
Indicates if alpha channel is to be added. |
IRasterBand |
item(int bandIndex)
Returns a RasterBand given its index. |
IPnt |
meanCellSize()
Returns the approximate cell size of the raster. |
void |
read(IPnt tlc,
IPixelBlock block)
Read a block of pixels starting from the top left corner. |
void |
remove(int index)
Removes an element from the collection. |
IDataset |
saveAs(String new_name,
IWorkspace worksp,
String format)
Creates a new persistent RasterDataset with the bands in the collection. |
IRasterDataset |
saveAsRasterDataset(String name,
IWorkspace workspace,
String format,
IRasterStorageDef storageDef)
Creates a new persistent Raster Dataset of a given format and specified storage definition. |
void |
setExtent(IEnvelope ppExtent)
The extent of the Raster. |
void |
setForceRGB(boolean pForceRGB)
Indicates if RGB output is required (forced). |
void |
setHeight(int pVal)
Height in pixels. |
void |
setNoDataValue(Object pVal)
Data value used to indicate invalid or excluded data. |
void |
setPixelType(int pVal)
Data type of the pixels. |
void |
setRaster(IRaster ppRaster)
The source raster. |
void |
setRendererByRef(IRasterRenderer ppRenderer)
The raster renderer. |
void |
setResampleMethod(int val)
Interpolation method used when reading pixels. |
void |
setRGB32(boolean pRGB32)
Indicates if alpha channel is to be added. |
void |
setSpatialReference(ISpatialReference ppSpref)
SpatialReference of the Raster. |
void |
setWidth(int pVal)
Width in pixels. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public RenderedRaster() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic RenderedRaster(Object obj) throws IOException
RenderedRaster theRenderedRaster = (RenderedRaster) obj;
obj
to RenderedRaster
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void read(IPnt tlc, IPixelBlock block) throws IOException, AutomationException
read
in interface IRaster
tlc
- A reference to a com.esri.arcgis.geodatabase.IPnt (in)block
- A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPixelBlock createPixelBlock(IPnt size) throws IOException, AutomationException
CreatePixelBlock method only initializes the properties of a pixel block, such as dimension, pixel type etc. Read method of this interface should be used to read pixels into the pixel block.
createPixelBlock
in interface IRaster
size
- A reference to a com.esri.arcgis.geodatabase.IPnt (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterCursor createCursor() throws IOException, AutomationException
createCursor
in interface IRaster
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getResampleMethod() throws IOException, AutomationException
getResampleMethod
in interface IRaster
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setResampleMethod(int val) throws IOException, AutomationException
setResampleMethod
in interface IRaster
val
- A com.esri.arcgis.geodatabase.rstResamplingTypes constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void init(String layerFile) throws IOException, AutomationException
init
in interface IRenderedRaster
layerFile
- The layerFile (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IName getFullName() throws IOException, AutomationException
getFullName
in interface IRenderedRaster
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isForceRGB() throws IOException, AutomationException
isForceRGB
in interface IRenderedRaster
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setForceRGB(boolean pForceRGB) throws IOException, AutomationException
setForceRGB
in interface IRenderedRaster
pForceRGB
- The pForceRGB (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILayer getLayer() throws IOException, AutomationException
getLayer
in interface IRenderedRaster
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRaster getRaster() throws IOException, AutomationException
getRaster
in interface IRenderedRaster2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRaster(IRaster ppRaster) throws IOException, AutomationException
setRaster
in interface IRenderedRaster2
ppRaster
- A reference to a com.esri.arcgis.geodatabase.IRaster (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterRenderer getRenderer() throws IOException, AutomationException
getRenderer
in interface IRenderedRaster2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRendererByRef(IRasterRenderer ppRenderer) throws IOException, AutomationException
setRendererByRef
in interface IRenderedRaster2
ppRenderer
- A reference to a com.esri.arcgis.carto.IRasterRenderer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isRGB32() throws IOException, AutomationException
isRGB32
in interface IRenderedRaster2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRGB32(boolean pRGB32) throws IOException, AutomationException
setRGB32
in interface IRenderedRaster2
pRGB32
- The pRGB32 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void add(IRasterBand element, int index) throws IOException, AutomationException
This method is only applicable to work with a Raster, not with a RasterDataset.
add
in interface IRasterBandCollection
element
- A reference to a com.esri.arcgis.datasourcesraster.IRasterBand (in)index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getCount() throws IOException, AutomationException
getCount
in interface IRasterBandCollection
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clear() throws IOException, AutomationException
This method is only applicable to work with a Raster, not with a RasterDataset.
clear
in interface IRasterBandCollection
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void remove(int index) throws IOException, AutomationException
This method is only applicable to work with a Raster, not with a RasterDataset.
remove
in interface IRasterBandCollection
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getBandIndex(String name) throws IOException, AutomationException
getBandIndex
in interface IRasterBandCollection
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterBand getBandByName(String name) throws IOException, AutomationException
getBandByName
in interface IRasterBandCollection
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumRasterBand getBands() throws IOException, AutomationException
getBands
in interface IRasterBandCollection
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterBand item(int bandIndex) throws IOException, AutomationException
item
in interface IRasterBandCollection
bandIndex
- The bandIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDataset saveAs(String new_name, IWorkspace worksp, String format) throws IOException, AutomationException
The SaveAs method can create a raster dataset in Imagine, TIFF, GRID, JPEG2000, JPEG, BMP, GIF, PNG, PCI Raster, USGS ASCII DEM, X11 Pixmap, Memory Raster and geodatabase raster.
The format strings used for the supported formats are below, and they are case sensitive:
Format Name | String Used |
---|---|
Imagine | "IMAGINE Image" |
TIFF | "TIFF" |
GRID | "GRID" |
JPEG | "JPG" |
JP2000 | "JP2" |
BMP | "BMP" |
PNG | "PNG" |
GIF | "GIF" |
PCI Raster | "PIX" |
X11 Pixmap | "XPM" |
PCRaster | "MAP" |
Memory Raster | "MEM" |
HDF4 | "HDF4" |
BIL | "BIL" |
BIP | "BIP" |
BSQ | "BSQ" |
Idrisi Raster Format | "RST" |
ENVI Raster Format | "ENVI" |
Geodatabase Raster | "GDB" |
The format string "TIFF" creates a TIFF file with ".tif" extension. ArcGIS also supports TIFF format with ".tiff" and ".tff" extensions. A format string "TIF" creates a TIFF file with ".tiff" extention and a format string "TFF" creates a TIFF file with ".tff" extension.
Note, SaveAs will return a RasterDataset, to prevent from SaveAs holding the output, .NET ReleaseCOMObject needs to be called to release the referene to the output raster dataset:
System.Runtime.InteropServices.Marshal.ReleaseComObject(outRasterDS);
saveAs
in interface IRasterBandCollection
saveAs
in interface ISaveAs
new_name
- The new_name (in)worksp
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)format
- The format (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void appendBand(IRasterBand element) throws IOException, AutomationException
This method is only applicable to work with a Raster, not with a RasterDataset.
appendBand
in interface IRasterBandCollection
element
- A reference to a com.esri.arcgis.datasourcesraster.IRasterBand (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void appendBands(IRasterBandCollection bands) throws IOException, AutomationException
This method is only applicable to work with a Raster, not with a RasterDataset.
appendBands
in interface IRasterBandCollection
bands
- A reference to a com.esri.arcgis.datasourcesraster.IRasterBandCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getWidth() throws IOException, AutomationException
getWidth
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setWidth(int pVal) throws IOException, AutomationException
setWidth
in interface IRasterProps
pVal
- The pVal (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getHeight() throws IOException, AutomationException
getHeight
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setHeight(int pVal) throws IOException, AutomationException
setHeight
in interface IRasterProps
pVal
- The pVal (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getPixelType() throws IOException, AutomationException
getPixelType
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPixelType(int pVal) throws IOException, AutomationException
setPixelType
in interface IRasterProps
pVal
- A com.esri.arcgis.geodatabase.rstPixelType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getNoDataValue() throws IOException, AutomationException
getNoDataValue
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setNoDataValue(Object pVal) throws IOException, AutomationException
setNoDataValue
in interface IRasterProps
pVal
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPnt meanCellSize() throws IOException, AutomationException
meanCellSize
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isInteger() throws IOException, AutomationException
isInteger
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISpatialReference getSpatialReference() throws IOException, AutomationException
getSpatialReference
in interface IRasterProps
getSpatialReference
in interface IGeoDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSpatialReference(ISpatialReference ppSpref) throws IOException, AutomationException
setSpatialReference
in interface IRasterProps
ppSpref
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getExtent() throws IOException, AutomationException
getExtent
in interface IRasterProps
getExtent
in interface IGeoDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setExtent(IEnvelope ppExtent) throws IOException, AutomationException
setExtent
in interface IRasterProps
ppExtent
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canSaveAs(String format) throws IOException, AutomationException
canSaveAs
in interface ISaveAs
format
- The format (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterDataset saveAsRasterDataset(String name, IWorkspace workspace, String format, IRasterStorageDef storageDef) throws IOException, AutomationException
The pStorageDef argument specified the storage parameters, compression type, compression quality, tile size, ect. The parameters apply to certain output raster format, if the output raster format doesn't support the storage parameter specified, the settings are ignored.
The format strings used for the supported formats are below, and they are case sensitive:
Format Name | String Used |
---|---|
Imagine | "IMAGINE Image" |
TIFF | "TIFF" |
GRID | "GRID" |
JPEG | "JPG" |
JP2000 | "JP2" |
BMP | "BMP" |
PNG | "PNG" |
GIF | "GIF" |
PCI Raster | "PIX" |
X11 Pixmap | "XPM" |
PCRaster | "MAP" |
Memory Raster | "MEM" |
HDF4 | "HDF4" |
BIL | "BIL" |
BIP | "BIP" |
BSQ | "BSQ" |
Idrisi Raster Format | "RST" |
ENVI Raster Format | "ENVI" |
Geodatabase Raster | "GDB" |
saveAsRasterDataset
in interface ISaveAs2
name
- The name (in)workspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)format
- The format (in)storageDef
- A reference to a com.esri.arcgis.geodatabase.IRasterStorageDef (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |