Provides access to members that allow raster geometry processing.
Members
Name | Description | |
---|---|---|
Clip | Clips the input raster based on the specified envelope. | |
Flip | Flips the input raster. | |
IsPixelToMapTransSimple | Indicates if the transformation of pixel to map is simple. | |
LeastSquareFit | Computes a least squares fit for the input control points. | |
Merge | Merges the input rasters into a single dataset. | |
Mirror | Mirrors the input raster. | |
Mosaic | Mosaics the input rasters into a single dataset. | |
PointsTransform | Transforms a set of points based upon the transformation being applied to the input raster. | |
Project | Projects the input raster using specified transformation type. | |
ProjectFast | Projects the input raster using a single polynomial fit to compute the adjustment between coordinate systems. | |
Rectify | Persists the input raster to a new dataset of the specified format. | |
Register | Outputs the current transformation properties to the dataset header or auxilliary file. | |
Resample | Resamples the input raster to a new cellsize. | |
ReScale | Scales the input raster by the specified x and y scale factors. | |
Reset | Resets the input raster to its native coordinate space. | |
Rotate | Rotates the input raster around the specified pivot by an angle specified in degrees. | |
Shift | Shifts the input raster by deltaX and deltaY map units. | |
TwoPointsAdjust | Performs a Hermite transformation on the input raster based upon the 2 input control point pairs. | |
Warp | Warps the input raster based upon the input control points using the transformation type specified. |
IRasterGeometryProc.Clip Method
Clips the input raster based on the specified envelope.
Public Sub Clip ( _
ByVal ipRectangle As IEnvelope, _
ByVal pRaster As IRaster _
)
public void Clip (
IEnvelope ipRectangle,
IRaster pRaster
);
IRasterGeometryProc.Flip Method
Flips the input raster.
Public Sub Flip ( _
ByVal pRaster As IRaster _
)
public void Flip (
IRaster pRaster
);
IRasterGeometryProc.IsPixelToMapTransSimple Property
Indicates if the transformation of pixel to map is simple.
Public Function get_IsPixelToMapTransSimple ( _
ByVal pRaster As IRaster _
) As Boolean
public bool get_IsPixelToMapTransSimple (
IRaster pRaster
);
Remarks
The IsPixelToMapTransSimple property indicates whether the transformation in the Raster object is a simple transformation or not. A simple transformation is an affine transformation without rotation.
IRasterGeometryProc.LeastSquareFit Method
Computes a least squares fit for the input control points.
Public Function LeastSquareFit ( _
ByVal sourceControlPoints As IPointCollection, _
ByVal targetControlPoints As IPointCollection, _
ByVal transformType As esriGeoTransTypeEnum, _
ByVal forwardTransformation As Boolean, _
ByVal returnTransformationCoef As Boolean _
) As Object
public object LeastSquareFit (
IPointCollection sourceControlPoints,
IPointCollection targetControlPoints,
esriGeoTransTypeEnum transformType,
bool forwardTransformation,
bool returnTransformationCoef
);
Remarks
The numbers of points in the SourceControlPoints and targetControlPoints must be equal. To create a first order polynomial transformation, there should be at least 3 un-correlated points for both source and target control points. For the second order and third order polynomial transformations, the minimum number of un-correlated points are 6 and 10 respectively.
Setting the argument forwardTransformation to be true indicates the transformation will be computed from SourceControls to targetControlPoints, while setting it to be false indicates the transformation will be computed from targetControlPoints to SourceControlPoints.
Setting the argument ReturnTransformationCoef to be true indicates the returned variant will be the coefficients of the transformation polynomial, while setting it to be false indicates that the returned variant will be residual.
The returned coefficients are represented as a Nx2 array with N varies with the transformation order. The returned residual is represented as a one-dimensional array. The number of the element in the array equals the number of the control points.
IRasterGeometryProc.Merge Method
Merges the input rasters into a single dataset.
Public Function Merge ( _
ByVal saveas_name As String, _
ByVal ipWorkspace As IWorkspace, _
ByVal outRasterFormat As String, _
ByVal CellSize As Double, _
ByVal ipSR As ISpatialReference, _
ByVal pRaster As IRaster _
) As IRaster
public IRaster Merge (
string saveas_name,
IWorkspace ipWorkspace,
string outRasterFormat,
double CellSize,
ISpatialReference ipSR,
IRaster pRaster
);
Remarks
Merge only work with single band images. It is recomended to use MosaicRaster object, which handles both single band and multiple band images,to perform merge operation.
The Merge method combines multiple adjacent single band raster datasets into a single output raster dataset. Merge determines the value of an overlapping output cell from the last NoData cell input of the input rasters.
The ipRaster is a Raster object that contains two or more bands, and the Merge operation combines all the bands of this raster into a single band raster dataset on disk.
Passing Nothing to the ipSR will result in an output with an unknown spatial reference.
The OutRasterFormat can only be one of the following 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" |
USGS ASCII DEM | "DEM" |
X11 Pixmap | "XPM" |
PCRaster | "MAP" |
USGS ASCII DEM | "DEM" |
Memory Raster | "MEM" |
Geodatabase Raster | "GDB" |
IRasterGeometryProc.Mirror Method
Mirrors the input raster.
Public Sub Mirror ( _
ByVal pRaster As IRaster _
)
public void Mirror (
IRaster pRaster
);
IRasterGeometryProc.Mosaic Method
Mosaics the input rasters into a single dataset.
Public Function Mosaic ( _
ByVal saveas_name As String, _
ByVal pWorkspace As IWorkspace, _
ByVal outRasterFormat As String, _
ByVal CellSize As Double, _
ByVal pSR As ISpatialReference, _
ByVal pRaster As IRaster _
) As IRaster
public IRaster Mosaic (
string saveas_name,
IWorkspace pWorkspace,
string outRasterFormat,
double CellSize,
ISpatialReference pSR,
IRaster pRaster
);
Remarks
Mosaic only work with single band images. It is recomended to use MosaicRaster object, which handles both single band and multiple band images,to perform mosaic operation.
The Mosaic method combines multiple adjacent single band raster datasets into a single output raster dataset. Mosaic determines the value of an output call by averaging the values of the overlapping input cells.
The ipRaster is a Raster object that contains two or more raster bands, and the Mosaic operation combines all the bands of the raster into one single band raster dataset on disk.
Passing Nothing to the ipSR will result in an output with an unknown spatial reference.
The OutRasterFormat can only be one of the following 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" |
USGS ASCII DEM | "DEM" |
X11 Pixmap | "XPM" |
PCRaster | "MAP" |
USGS ASCII DEM | "DEM" |
Memory Raster | "MEM" |
Geodatabase Raster | "GDB" |
IRasterGeometryProc.PointsTransform Method
Transforms a set of points based upon the transformation being applied to the input raster.
Public Function PointsTransform ( _
ByVal inPoints As IPointCollection, _
ByVal isForward As Boolean, _
ByVal pRaster As IRaster _
) As IPointCollection
public IPointCollection PointsTransform (
IPointCollection inPoints,
bool isForward,
IRaster pRaster
);
Remarks
The PointsTransform method transforms a set of points and using the transformations currently held in the input raster. The points can be transformed forwards or backwards.
IRasterGeometryProc.Project Method
Projects the input raster using specified transformation type.
Public Sub Project ( _
ByVal pNewSR As ISpatialReference, _
ByVal PrjMethodType As esriRasterPrjMethodTypeEnum, _
ByVal resampleType As rstResamplingTypes, _
ByVal newCellsize As Double, _
ByVal pRaster As IRaster _
)
public void Project (
ISpatialReference pNewSR,
esriRasterPrjMethodTypeEnum PrjMethodType,
rstResamplingTypes resampleType,
double newCellsize,
IRaster pRaster
);
Remarks
This method is not implemented in ArcGIS 9.0
IRasterGeometryProc.ProjectFast Method
Projects the input raster using a single polynomial fit to compute the adjustment between coordinate systems.
Public Sub ProjectFast ( _
ByVal pNewSR As ISpatialReference, _
ByVal resampleType As rstResamplingTypes, _
[ByRef pCellsize As Object], _
[ByVal pRaster As IRaster] _
)
public void ProjectFast (
ISpatialReference pNewSR,
rstResamplingTypes resampleType,
ref object pCellsize,
ref IRaster pRaster
);
Remarks
The ProjectFast method projects a raster to a new spatial reference with a specified cell size. ProjectFast method does not project a raster cell by cell, instead, this method divides the whole raster into 64 x 64 pixel blocks and projects a raster based on a piecewise polynomial transformation algorithm, whereby each block is transformed using a polynomial warp. Altough this method is not as accurate as the cell by cell projection (PROJECT command in ArcGrid�), it is faster and accurate enough for most application and analysis.
IRasterGeometryProc.Rectify Method
Persists the input raster to a new dataset of the specified format.
Public Sub Rectify ( _
ByVal saveas_name As String, _
ByVal Format As String, _
ByVal pRaster As IRaster _
)
public void Rectify (
string saveas_name,
string Format,
IRaster pRaster
);
Remarks
The output formats as well as the 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" |
USGS ASCII DEM | "DEM" |
X11 Pixmap | "XPM" |
PCRaster | "MAP" |
USGS ASCII DEM | "DEM" |
IRasterGeometryProc.Register Method
Outputs the current transformation properties to the dataset header or auxilliary file.
Public Sub Register ( _
ByVal pRaster As IRaster _
)
public void Register (
IRaster pRaster
);
Remarks
To prevent the need for resampling, the Register method persists the transformation into the auxiliary file associated with the dataset on disk. The presence of this transformation on disk means that the data can be transformed on-the-fly to its correct position for display and analysis. However, because the transformation is stored in the auxiliary file, only ArcGIS, ArcObjects, and ERDAS IMAGINE will be able to use this information. Register will not correctly maintain the transformation for rasters that have been clipped. To provide compatibility with ArcGIS for Desktop Advanced Workstation, complex transformations cannot be written to GRID-format datasets.
IRasterGeometryProc.Resample Method
Resamples the input raster to a new cellsize.
Public Sub Resample ( _
ByVal resampleType As rstResamplingTypes, _
ByVal newCellsize As Double, _
ByVal pRaster As IRaster _
)
public void Resample (
rstResamplingTypes resampleType,
double newCellsize,
IRaster pRaster
);
IRasterGeometryProc.ReScale Method
Scales the input raster by the specified x and y scale factors.
Public Sub ReScale ( _
ByVal xScale As Double, _
ByVal yScale As Double, _
ByVal pRaster As IRaster _
)
public void ReScale (
double xScale,
double yScale,
IRaster pRaster
);
IRasterGeometryProc.Reset Method
Resets the input raster to its native coordinate space.
Public Sub Reset ( _
ByVal pRaster As IRaster _
)
public void Reset (
IRaster pRaster
);
Remarks
The Reset method sets the raster back to its initial state. The transformations that have been put to the raster but have not been persisted to the raster dataset will be gone after calling this method
IRasterGeometryProc.Rotate Method
Rotates the input raster around the specified pivot by an angle specified in degrees.
Public Sub Rotate ( _
ByVal pPivotPoint As IPoint, _
ByVal rotateAngle As Double, _
ByVal pRaster As IRaster _
)
public void Rotate (
IPoint pPivotPoint,
double rotateAngle,
IRaster pRaster
);
Remarks
The Rotate method rotates the raster by the angle input in degrees around the input pivot point, if specified. If no pivot point is specified, the raster is rotated around its center point. Positive rotateAngle rotates the raster counter-clockwise, while negative rotateAngle rotates the raster clockwise.
IRasterGeometryProc.Shift Method
Shifts the input raster by deltaX and deltaY map units.
Public Sub Shift ( _
ByVal deltaX As Double, _
ByVal deltaY As Double, _
ByVal pRaster As IRaster _
)
public void Shift (
double deltaX,
double deltaY,
IRaster pRaster
);
IRasterGeometryProc.TwoPointsAdjust Method
Performs a Hermite transformation on the input raster based upon the 2 input control point pairs.
Public Sub TwoPointsAdjust ( _
ByVal sourceControlPoints As IPointCollection, _
ByVal targetControlPoints As IPointCollection, _
ByVal pRaster As IRaster _
)
public void TwoPointsAdjust (
IPointCollection sourceControlPoints,
IPointCollection targetControlPoints,
IRaster pRaster
);
Remarks
The TwoPointsAdjust method computes a Hermite transformation from a pair of links and applies to the raster. A Hermite transformation can shift, rotate, and scale a raster.es a minimum number of control links. They are 3, 6, and 10 for order 1,2, and 3, respectively.
IRasterGeometryProc.Warp Method
Warps the input raster based upon the input control points using the transformation type specified.
Public Sub Warp ( _
ByVal sourceControlPoints As IPointCollection, _
ByVal targetControlPoints As IPointCollection, _
ByVal transformType As esriGeoTransTypeEnum, _
ByVal pRaster As IRaster _
)
public void Warp (
IPointCollection sourceControlPoints,
IPointCollection targetControlPoints,
esriGeoTransTypeEnum transformType,
IRaster pRaster
);
Remarks
Warp method computes a polynomial transformation based on the input links, then applies this transformation to the input raster. The polynomial transformation specified can be first, second, or third order polynomials. Each transformation order requires a minimum number of control links. They are 3, 6, and 10 for order 1,2, and 3, respectively.
Classes that implement IRasterGeometryProc
Classes | Description |
---|---|
RasterGeometryProc | A mechanism to perform raster geometric operations, such as flip, rotate, and merge on rasters. |
Remarks
The RasterGeometryProc manipulates only Raster objects, not RasterBand or RasterDataset object. This is because the Raster is transient, as are the effects of the RasterGeometryProc. This means that any transformation will also go away when the Raster object goes out of scope.
To keep the transformed data for later use, you must persist the transformation using Register or Rectify. If used on a Raster contained within a RasterLayer, processing performed by this object will be visible when the display is refreshed.
Although Merge and Mosaic take Raster object as an input, any changes to the Raster object before calling the two methods will be ignored.