How to create an AdjustXform for georeferencing images


Summary This example creates an AdjustXform from two sets of control points. Adjust transformation is one of the methods that can be used in georeferencing images. After creation, the AdjustXform can be set to a raster to perform image georeferencing.

Creating an AdjustXform for georeferencing images

Use the following code example in your application :
[Java]
static IAdjustXform createAdjustXform(IPointCollection sourcePoints,
    IPointCollection targetPoints, ISpatialReference sr)throws Exception{
    //this example creates an AdjustXform
    IAdjustXform adjustXF = new AdjustXform();

    //set control points and the polynomial order used
    adjustXF.defineFromControlPoints(sourcePoints, targetPoints);
    adjustXF.setPolynomialApproximation(2);

    //using interpolation to do the adjustment
    adjustXF.setNaturalNeighbor(true);

    //you can also define the spatial reference of the xform
    adjustXF.setSpatialReferenceByRef(sr);
    return adjustXF;
}


See Also:

How to perform geodata transformation on a raster




Development licensing Deployment licensing
ArcInfo
ArcEditor ArcInfo
ArcView ArcEditor
Engine Developer Kit ArcView
Engine Runtime