[gdal-dev] Re: Hoe to convert ERDAS imagine(.img) files to ARC
info ASCII files viceversa
Vincent Schut
schut at sarvision.nl
Tue May 18 05:19:28 EDT 2010
I've never used C#, mainly use python, but guess the process will be
similar.
The idea is that you:
1) open your source dataset (the img file)
2) instantiate the arcinfo ascii driver (gdal.GetDriverByName in python
to get a driver instance)
3) use the driver instance to create a new file with the correct
parameters (size, #bands, datatype)
4) copy the metadata (projection, geotransform) from the input to the
output file
5) read data from the input file
6) write data to the output file
Depending on the size of the file and the amount of memory, you might
need to read/write in a loop per chunk or line instead of reading the
whole shebang at once and writing after that.
About the details (in C#) I can't help you, you'll have to digg a bit
yourself. Maybe there are some C# examples included in the gdal source code?
Good luck!
Vincent.
On 05/18/2010 11:05 AM, mail2vajram wrote:
> yeah..
> I saw that utility in the fwtools\bin folder.
> But it gives some error,when i added the reference to my C# project.
> Actually i need to do this task programatically. This class is available in
> any other dll
> can u tell me please.
>
> thank you........
>
More information about the gdal-dev
mailing list