[Gdal-dev] GdalCreate

Tamas Szekeres szekerest at gmail.com
Fri Apr 27 12:39:28 EDT 2007


Mikah,

I would suggest to make a test with the current SVN-trunk or the FWTools 1.3.0
http://test.gdal.org/fwtools/FWTools130.exe

If the problem still persists please submit a ticket:
http://trac.osgeo.org/gdal/newticket

by describing the problem and adding the sample data.

Best regards,

Tamas


2007/4/26, MIKAH JAMES TRENT <mjtrent at wisc.edu>:
> Hi,
> I am using the 'swigged' version of Gdal in C-Sharp.  I am struggling with the GdalCreate command.
>
> Here is a summary of my code:
>
>            Driver dv;
>            Dataset ds;
> //this command gets the driver
>             dv = gdal.GetDriverByName(format_dictionary[ext]);
> //this command does what????
>             ds = dv.Create(path, x_size, y_size, 1, 1, null);
>
>
> My 'format_dictionary[ext]' in this case returns 'HFA' which is the format for .img files.  However, when I call dv.Create, it immediately creates a file with the correct EHFA_HEADER_TAG header followed by a few null characters, and then there's a bunch of junk data following it, like:
>
> HeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued...
>
> which makes it an invalid file.  Where does this data come from, and how do I get just a normal valid file of type img??
>
> Thank you for any help!!
> -Mikah
>
>
>
> Mikah J. Trent
> (414) 238 3573
> mjtrent at wisc.edu
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>



More information about the Gdal-dev mailing list