Class RasterGeometryProcClass

Namespace
ESRI.ArcGIS.DatasourcesRaster
Assembly
ESRI.Server.DatasourcesRaster.dll
[ClassInterface(ClassInterfaceType.None)]
[Guid("2B473C40-B18E-11D3-A650-0008C7DF88A8")]
public class RasterGeometryProcClass : RasterGeometryProc, IRasterGeometryProc, IRasterGeometryProc3, ISupportErrorInfo
Inheritance
RasterGeometryProcClass
Implements
Inherited Members

Constructors

RasterGeometryProcClass()

public RasterGeometryProcClass()

Explicit Interface Implementations

Clip(IEnvelope, IRaster)

Clips the input raster based on the specified envelope.

virtual void Clip(IEnvelope ipRectangle, IRaster pRaster)

Parameters

ipRectangle IEnvelope
pRaster IRaster

Flip(IRaster)

Flips the input raster.

virtual void Flip(IRaster pRaster)

Parameters

pRaster IRaster

GetRasterXFormByIndex(IRaster, int, bool, int, ref esriGeoTransTypeEnum, ref object)

Gets the polynomial order and the polynomial coefficients of the indexed transformation.

virtual void GetRasterXFormByIndex(IRaster pRaster, int band, bool forward, int Index, ref esriGeoTransTypeEnum Order, ref object pVar)

Parameters

pRaster IRaster
band int
forward bool
Index int
Order esriGeoTransTypeEnum
pVar object

Remarks

GetRasterXFormByIndex method returns the transformation coefficients and the order of transformation on a specified raster band. The transformation coefficients are returned as a variant, which is an n x 2 array where n varies with the transformation order. First order transformation returns a 3 x 2 array, second order and third order transformations return 6 x 2 and 10 x 2 arrays, respectively.

GetRasterXFormCount(IRaster, int)

Gets the number of transformations.

virtual int GetRasterXFormCount(IRaster pRaster, int band)

Parameters

pRaster IRaster
band int

Returns

int

Remarks

The GetRasterXFormCount method returns the number of geometric transformations on a specified raster band.

GetRasterXFormOrderByIndex(IRaster, int, int)

Gets the polynomial order of the indexed transformation.

virtual esriGeoTransTypeEnum GetRasterXFormOrderByIndex(IRaster pRaster, int band, int Index)

Parameters

pRaster IRaster
band int
Index int

Returns

esriGeoTransTypeEnum

Remarks

The GetRasterXFormOrderByIndex method returns the order of a specified geometric transformation on a raster band.

IRasterGeometryProc3_Clip(IEnvelope, IRaster)

Clips the input raster based on the specified envelope.

virtual void IRasterGeometryProc3_Clip(IEnvelope pRectangle, IRaster pRaster)

Parameters

pRectangle IEnvelope
pRaster IRaster

IRasterGeometryProc3_Flip(IRaster)

Flips the input raster.

virtual void IRasterGeometryProc3_Flip(IRaster pRaster)

Parameters

pRaster IRaster

IRasterGeometryProc3_IsPixelToMapTransSimple[IRaster]

Indicates if the transformation of pixel to map is simple.

virtual bool IRasterGeometryProc3_IsPixelToMapTransSimple[IRaster pRaster] { get; }

Parameters

pRaster IRaster

Returns

bool

IRasterGeometryProc3_LeastSquareFit(IPointCollection, IPointCollection, esriGeoTransTypeEnum, bool, bool)

Computes a least squares fit for the input control points.

virtual object IRasterGeometryProc3_LeastSquareFit(IPointCollection sourceControlPoints, IPointCollection targetControlPoints, esriGeoTransTypeEnum transformType, bool forwardTransformation, bool returnTransformationCoef)

Parameters

sourceControlPoints IPointCollection
targetControlPoints IPointCollection
transformType esriGeoTransTypeEnum
forwardTransformation bool
returnTransformationCoef bool

Returns

object

IRasterGeometryProc3_Merge(string, IWorkspace, string, double, ISpatialReference, IRaster)

Merges the input rasters into a single dataset.

virtual IRaster IRasterGeometryProc3_Merge(string saveas_name, IWorkspace pWorkspace, string outRasterFormat, double CellSize, ISpatialReference pSR, IRaster pRaster)

Parameters

saveas_name string
pWorkspace IWorkspace
outRasterFormat string
CellSize double
pSR ISpatialReference
pRaster IRaster

Returns

IRaster

IRasterGeometryProc3_Mirror(IRaster)

Mirrors the input raster.

virtual void IRasterGeometryProc3_Mirror(IRaster pRaster)

Parameters

pRaster IRaster

IRasterGeometryProc3_Mosaic(string, IWorkspace, string, double, ISpatialReference, IRaster)

Mosaics the input rasters into a single dataset.

virtual IRaster IRasterGeometryProc3_Mosaic(string saveas_name, IWorkspace pWorkspace, string outRasterFormat, double CellSize, ISpatialReference pSR, IRaster pRaster)

Parameters

saveas_name string
pWorkspace IWorkspace
outRasterFormat string
CellSize double
pSR ISpatialReference
pRaster IRaster

Returns

IRaster

IRasterGeometryProc3_PointsTransform(IPointCollection, bool, IRaster)

Transforms a set of points based upon the transformation being applied to the input raster.

virtual IPointCollection IRasterGeometryProc3_PointsTransform(IPointCollection inPoints, bool isForward, IRaster pRaster)

Parameters

inPoints IPointCollection
isForward bool
pRaster IRaster

Returns

IPointCollection

IRasterGeometryProc3_Project(ISpatialReference, esriRasterPrjMethodTypeEnum, rstResamplingTypes, double, IRaster)

Projects the input raster using specified transformation type.

virtual void IRasterGeometryProc3_Project(ISpatialReference pNewSR, esriRasterPrjMethodTypeEnum PrjMethodType, rstResamplingTypes resampleType, double newCellsize, IRaster pRaster)

Parameters

pNewSR ISpatialReference
PrjMethodType esriRasterPrjMethodTypeEnum
resampleType rstResamplingTypes
newCellsize double
pRaster IRaster

IRasterGeometryProc3_ProjectFast(ISpatialReference, rstResamplingTypes, ref object, IRaster)

Projects the input raster using a single polynomial fit to compute the adjustment between coordinate systems.

virtual void IRasterGeometryProc3_ProjectFast(ISpatialReference pNewSR, rstResamplingTypes resampleType, ref object CellSize, IRaster pRaster)

Parameters

pNewSR ISpatialReference
resampleType rstResamplingTypes
CellSize object
pRaster IRaster

IRasterGeometryProc3_ReScale(double, double, IRaster)

Scales the input raster by the specified x and y scale factors.

virtual void IRasterGeometryProc3_ReScale(double xScale, double yScale, IRaster pRaster)

Parameters

xScale double
yScale double
pRaster IRaster

IRasterGeometryProc3_Rectify(string, string, IRaster)

Persists the input raster to a new dataset of the specified format.

virtual void IRasterGeometryProc3_Rectify(string saveas_name, string Format, IRaster pRaster)

Parameters

saveas_name string
Format string
pRaster IRaster

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"

IRasterGeometryProc3_Register(IRaster)

Outputs the current transformation properties to the dataset header or auxilliary file.

virtual void IRasterGeometryProc3_Register(IRaster pRaster)

Parameters

pRaster IRaster

IRasterGeometryProc3_Resample(rstResamplingTypes, double, IRaster)

Resamples the input raster to a new cellsize.

virtual void IRasterGeometryProc3_Resample(rstResamplingTypes resampleType, double newCellsize, IRaster pRaster)

Parameters

resampleType rstResamplingTypes
newCellsize double
pRaster IRaster

IRasterGeometryProc3_Reset(IRaster)

Resets the input raster to its native coordinate space.

virtual void IRasterGeometryProc3_Reset(IRaster pRaster)

Parameters

pRaster IRaster

IRasterGeometryProc3_Rotate(IPoint, double, IRaster)

Rotates the input raster around the specified pivot by an angle specified in degrees.

virtual void IRasterGeometryProc3_Rotate(IPoint ipPivotPoint, double rotateAngle, IRaster pRaster)

Parameters

ipPivotPoint IPoint
rotateAngle double
pRaster IRaster

IRasterGeometryProc3_Shift(double, double, IRaster)

Shifts the input raster by deltaX and deltaY map units.

virtual void IRasterGeometryProc3_Shift(double deltaX, double deltaY, IRaster pRaster)

Parameters

deltaX double
deltaY double
pRaster IRaster

IRasterGeometryProc3_TwoPointsAdjust(IPointCollection, IPointCollection, IRaster)

Performs a Hermite transformation on the input raster based upon the 2 input control point pairs.

virtual void IRasterGeometryProc3_TwoPointsAdjust(IPointCollection sourceControlPoints, IPointCollection targetControlPoints, IRaster pRaster)

Parameters

sourceControlPoints IPointCollection
targetControlPoints IPointCollection
pRaster IRaster

IRasterGeometryProc3_Warp(IPointCollection, IPointCollection, esriGeoTransTypeEnum, IRaster)

Warps the input raster based upon the input control points using the transformation type specified.

virtual void IRasterGeometryProc3_Warp(IPointCollection sourceControlPoints, IPointCollection targetControlPoints, esriGeoTransTypeEnum transformType, IRaster pRaster)

Parameters

sourceControlPoints IPointCollection
targetControlPoints IPointCollection
transformType esriGeoTransTypeEnum
pRaster IRaster

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.

InterfaceSupportsErrorInfo(ref Guid)

virtual void InterfaceSupportsErrorInfo(ref Guid riid)

Parameters

riid Guid

IsPixelToMapTransSimple[IRaster]

Indicates if the transformation of pixel to map is simple.

virtual bool IsPixelToMapTransSimple[IRaster pRaster] { get; }

Parameters

pRaster IRaster

Returns

bool

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.

LeastSquareFit(IPointCollection, IPointCollection, esriGeoTransTypeEnum, bool, bool)

Computes a least squares fit for the input control points.

virtual object LeastSquareFit(IPointCollection sourceControlPoints, IPointCollection targetControlPoints, esriGeoTransTypeEnum transformType, bool forwardTransformation, bool returnTransformationCoef)

Parameters

sourceControlPoints IPointCollection
targetControlPoints IPointCollection
transformType esriGeoTransTypeEnum
forwardTransformation bool
returnTransformationCoef bool

Returns

object

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.

Merge(string, IWorkspace, string, double, ISpatialReference, IRaster)

Merges the input rasters into a single dataset.

virtual IRaster Merge(string saveas_name, IWorkspace ipWorkspace, string outRasterFormat, double CellSize, ISpatialReference ipSR, IRaster pRaster)

Parameters

saveas_name string
ipWorkspace IWorkspace
outRasterFormat string
CellSize double
ipSR ISpatialReference
pRaster IRaster

Returns

IRaster

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"

 

 

Mirror(IRaster)

Mirrors the input raster.

virtual void Mirror(IRaster pRaster)

Parameters

pRaster IRaster

Mosaic(string, IWorkspace, string, double, ISpatialReference, IRaster)

Mosaics the input rasters into a single dataset.

virtual IRaster Mosaic(string saveas_name, IWorkspace pWorkspace, string outRasterFormat, double CellSize, ISpatialReference pSR, IRaster pRaster)

Parameters

saveas_name string
pWorkspace IWorkspace
outRasterFormat string
CellSize double
pSR ISpatialReference
pRaster IRaster

Returns

IRaster

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"

 

 

 

PointsMap2PixelTransform(IPointCollection, bool, IRaster)

Performs the map to pixel transformation.

virtual IPointCollection PointsMap2PixelTransform(IPointCollection pInPoints, bool isForward, IRaster pRaster)

Parameters

pInPoints IPointCollection
isForward bool
pRaster IRaster

Returns

IPointCollection

Remarks

The PointsMap2PixelTransform method takes all the transformations on a Raster, and then performs transformations between map space and pixel space. This method works better for rasters with square cell size.

PointsTransform(IPointCollection, bool, IRaster)

Transforms a set of points based upon the transformation being applied to the input raster.

virtual IPointCollection PointsTransform(IPointCollection inPoints, bool isForward, IRaster pRaster)

Parameters

inPoints IPointCollection
isForward bool
pRaster IRaster

Returns

IPointCollection

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.

Project(ISpatialReference, esriRasterPrjMethodTypeEnum, rstResamplingTypes, double, IRaster)

Projects the input raster using specified transformation type.

virtual void Project(ISpatialReference pNewSR, esriRasterPrjMethodTypeEnum PrjMethodType, rstResamplingTypes resampleType, double newCellsize, IRaster pRaster)

Parameters

pNewSR ISpatialReference
PrjMethodType esriRasterPrjMethodTypeEnum
resampleType rstResamplingTypes
newCellsize double
pRaster IRaster

Remarks

This method is not implemented in ArcGIS 9.0

ProjectFast(ISpatialReference, rstResamplingTypes, ref object, IRaster)

Projects the input raster using a single polynomial fit to compute the adjustment between coordinate systems.

virtual void ProjectFast(ISpatialReference pNewSR, rstResamplingTypes resampleType, ref object pCellsize, IRaster pRaster)

Parameters

pNewSR ISpatialReference
resampleType rstResamplingTypes
pCellsize object
pRaster IRaster

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.

PutRasterXForm(IRaster, bool, esriGeoTransTypeEnum, ref object)

Sets a polynomial transformation to the Raster.

virtual void PutRasterXForm(IRaster pRaster, bool clean, esriGeoTransTypeEnum Order, ref object pVar)

Parameters

pRaster IRaster
clean bool
Order esriGeoTransTypeEnum
pVar object

Remarks

The PutRasterXForm method appends a polynomial transformation to a raster. You can also clean the existing transformations on the raster by setting parameter clean to be true. Since calling this method does not automatically update the cell size and extent of the raster like other geometric operations (Shift, Rotate, etc.) do, Rectify or SaveAs will not persist the transformations to a raster dataset directly. Therefore, this method is not recommended for ourside developers.

ReScale(double, double, IRaster)

Scales the input raster by the specified x and y scale factors.

virtual void ReScale(double xScale, double yScale, IRaster pRaster)

Parameters

xScale double
yScale double
pRaster IRaster

Rectify(string, string, IRaster)

Persists the input raster to a new dataset of the specified format.

virtual void Rectify(string saveas_name, string Format, IRaster pRaster)

Parameters

saveas_name string
Format string
pRaster IRaster

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"

Register(IRaster)

Outputs the current transformation properties to the dataset header or auxilliary file.

virtual void Register(IRaster pRaster)

Parameters

pRaster IRaster

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.

Resample(rstResamplingTypes, double, IRaster)

Resamples the input raster to a new cellsize.

virtual void Resample(rstResamplingTypes resampleType, double newCellsize, IRaster pRaster)

Parameters

resampleType rstResamplingTypes
newCellsize double
pRaster IRaster

Reset(IRaster)

Resets the input raster to its native coordinate space.

virtual void Reset(IRaster pRaster)

Parameters

pRaster IRaster

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

Rotate(IPoint, double, IRaster)

Rotates the input raster around the specified pivot by an angle specified in degrees.

virtual void Rotate(IPoint pPivotPoint, double rotateAngle, IRaster pRaster)

Parameters

pPivotPoint IPoint
rotateAngle double
pRaster IRaster

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.

Shift(double, double, IRaster)

Shifts the input raster by deltaX and deltaY map units.

virtual void Shift(double deltaX, double deltaY, IRaster pRaster)

Parameters

deltaX double
deltaY double
pRaster IRaster

TwoPointsAdjust(IPointCollection, IPointCollection, IRaster)

Performs a Hermite transformation on the input raster based upon the 2 input control point pairs.

virtual void TwoPointsAdjust(IPointCollection sourceControlPoints, IPointCollection targetControlPoints, IRaster pRaster)

Parameters

sourceControlPoints IPointCollection
targetControlPoints IPointCollection
pRaster IRaster

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.

Warp(IPointCollection, IPointCollection, esriGeoTransTypeEnum, IRaster)

Warps the input raster based upon the input control points using the transformation type specified.

virtual void Warp(IPointCollection sourceControlPoints, IPointCollection targetControlPoints, esriGeoTransTypeEnum transformType, IRaster pRaster)

Parameters

sourceControlPoints IPointCollection
targetControlPoints IPointCollection
transformType esriGeoTransTypeEnum
pRaster IRaster

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.