kenzimoha240166

Raster Georeferencing problem

Discussion created by kenzimoha240166 on Nov 1, 2010
Latest reply on Nov 2, 2010 by kenzimoha240166
Hie,

I developped an ArcGIS Engine Application that make a georeferencing of Raster using GCP from a  another Raster or by introducing XY coordinates.

Everything goes fine the worlfile is created the Raster is Georeferenced. but if i trie to delete and reload the same raster in the MapControl it's not displayed at the good place. if I exit the application and rerun it works fine.

i tried to assign "Nothing" to the variable pRasterProc (:iRasterGeometryProc) 

1.apply the transformation
-------------------------

        pRasterGProc = New RasterGeometryProc

        Select Case DGVGeoRef.RowCount
            Case 2
                pRasterGProc.TwoPointsAdjust(pSourcePoints, pTargetPoints, pRaster)
            Case 3, 4, 5
                pRasterGProc.Warp(pSourcePoints, pTargetPoints,
                                             esriGeoTransTypeEnum.esriGeoTransPolyOrder1, pRaster)
            Case 6, 7, 8, 9
                pRasterGProc.Warp(pSourcePoints, pTargetPoints,
                                             esriGeoTransTypeEnum.esriGeoTransPolyOrder2, pRaster)
            Case Else
                pRasterGProc.Warp(pSourcePoints, pTargetPoints,
                                             esriGeoTransTypeEnum.esriGeoTransPolyOrder3, pRaster)
        End Select

2. Create the word file
----------------------
        pRasterGProc.Register(pRaster)
        pRasterGProc = Nothing

Outcomes