com.esri.arcgis.carto
Class RasterLayerExport

java.lang.Object
  extended by com.esri.arcgis.carto.RasterLayerExport
All Implemented Interfaces:
IRasterLayerExport, IRasterLayerExport2, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class RasterLayerExport
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IRasterLayerExport, IRasterLayerExport2

A helper class to export raster data from a raster layer.

Description

The RasterLayerExport object allows you to export a raster layer to a raster dataset by applying the spatial reference, extent, or the raster renderer information. Exporting a raster layer by imposing a raster renderer allows you to persist a raster dataset with properly stretched pixel values that you see from the raster layer in ArcMap.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
RasterLayerExport()
          Constructs a RasterLayerExport using ArcGIS Engine.
RasterLayerExport(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RasterLayerExport theRasterLayerExport = (RasterLayerExport) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 IRasterDataset export(IWorkspace pWorkspace, String newname, String format)
          Executes the raster layer exporting.
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 void setExtent(IEnvelope rhs1)
          The extent of the raster to be exported.
 void setForce2RGB(boolean rhs1)
          Indicates whether to force exported raster to be RGB.
 void setRasterLayerByRef(IRasterLayer rhs1)
          The raster layer to be exported.
 void setSize(int cx, int cy)
          Sets the number of columns and rows of the exported raster.
 void setSpatialReferenceByRef(ISpatialReference rhs1)
          The coordinate system of the exported raster.
 void setStorageDefByRef(IRasterStorageDef rhs1)
          The raster storage definition for exported raster dataset.
 
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

RasterLayerExport

public RasterLayerExport()
                  throws IOException,
                         UnknownHostException
Constructs a RasterLayerExport using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

RasterLayerExport

public RasterLayerExport(Object obj)
                  throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RasterLayerExport theRasterLayerExport = (RasterLayerExport) obj;

Construct a RasterLayerExport using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to RasterLayerExport.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

setRasterLayerByRef

public void setRasterLayerByRef(IRasterLayer rhs1)
                         throws IOException,
                                AutomationException
The raster layer to be exported.

Remarks

The RasterLayer property is used to set the input RasterLayer to the RasterLayerExport object; this is a required property. Normally, a raster layer is associated with a raster renderer by default. You can change the raster renderer to what you need. If you donít want to use the raster renderer to filter the pixel values during the export, remove the raster renderer from the raster layer before passing it to the RasterLayerExport object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setRasterLayerByRef in interface IRasterLayerExport
Parameters:
rhs1 - A reference to a com.esri.arcgis.carto.IRasterLayer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setExtent

public void setExtent(IEnvelope rhs1)
               throws IOException,
                      AutomationException
The extent of the raster to be exported.

Remarks

The Extent property is used to specify the extent used in the export. If it not specified, the whole extent of the raster layer will be used.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setExtent in interface IRasterLayerExport
Parameters:
rhs1 - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSize

public void setSize(int cx,
                    int cy)
             throws IOException,
                    AutomationException
Sets the number of columns and rows of the exported raster.

Remarks

The SetSize method is used to set the column and row of the output raster. The ForceRGB property indicates to export a raster dataset with red, green and blue bands.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSize in interface IRasterLayerExport
Parameters:
cx - The cx (in)
cy - The cy (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setForce2RGB

public void setForce2RGB(boolean rhs1)
                  throws IOException,
                         AutomationException
Indicates whether to force exported raster to be RGB.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setForce2RGB in interface IRasterLayerExport
Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSpatialReferenceByRef

public void setSpatialReferenceByRef(ISpatialReference rhs1)
                              throws IOException,
                                     AutomationException
The coordinate system of the exported raster.

Remarks

The SpatialReference is used to set the spatial reference of the output raster. If it not specified, the output will take the spatial reference from the RasterLayer. If the spatial reference specified is different from that in the RasterLayer, reprojection will accur on the fly.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSpatialReferenceByRef in interface IRasterLayerExport
Parameters:
rhs1 - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

export

public IRasterDataset export(IWorkspace pWorkspace,
                             String newname,
                             String format)
                      throws IOException,
                             AutomationException
Executes the raster layer exporting.

Remarks

Export method can export to the following raster formats. 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"

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
export in interface IRasterLayerExport
Parameters:
pWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
newname - The newname (in)
format - The format (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRasterDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStorageDefByRef

public void setStorageDefByRef(IRasterStorageDef rhs1)
                        throws IOException,
                               AutomationException
The raster storage definition for exported raster dataset.

Remarks

The StorageDef method allows to specify the storage properties for the output dataset (most applicable for a geodatabase raster output) such as compression, pyramid resampling method etc.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setStorageDefByRef in interface IRasterLayerExport2
Parameters:
rhs1 - A reference to a com.esri.arcgis.geodatabase.IRasterStorageDef (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.