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
I found that the application remember the content of the workspace as it's loaded the first time before georeferencing.
I need to refresh the workspace's content for the application.
the problem : i'm using the ESRI "AddData" Button Control of the AxToolBar and i have no access the proprieties of the control.
Any Help Please