Georeferencing a raster using polynomial transformation
Using the following code example in your application:
[Java]
static void georeferenceRaster(IRasterDataset2 rasterDataset, IPointCollection
sourcePoints, IPointCollection targetPoints)throws Exception{
// sourcePoints: represents source control points
// targetPoints: represents target control points
IRasterGeometryProc rasterPropc = new RasterGeometryProc();
IRaster raster = rasterDataset.createDefaultRaster();
//set the transformatin
rasterPropc.warp(sourcePoints, targetPoints,
esriGeoTransTypeEnum.esriGeoTransPolyOrder1, raster);
//There are two ways to get the georeferenced result: to save the transformation with the input raster dataset
rasterPropc.register(raster);
//or save to another new raster dataset
rasterPropc.rectify("c:/temp/georeferencing_output.img", "IMAGINE Image", raster)
;
}
Development licensing | Deployment licensing |
---|---|
ArcInfo | ArcInfo |
ArcEditor | ArcEditor |
ArcView | ArcView |
Engine Developer Kit | Engine Runtime |