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 licensingDeployment licensing
ArcGIS for Desktop Advanced
ArcGIS for Desktop StandardArcGIS for Desktop Advanced
ArcGIS for Desktop BasicArcGIS for Desktop Standard
Engine Developer KitArcGIS for Desktop Basic
Engine