[gdal-dev] Problem to implement a new format

Frank Warmerdam warmerdam at pobox.com
Fri Nov 13 10:01:20 EST 2009


Vincent Honnet wrote:
> Hi,
> 
> I'm trying to implement a new format for my GDal and I have some 
> problems. For now I don't want to integrate it to the GDal source code 
> but only in gdal_translate. I call the registering method just after the 
> call to GDALAllRegister.
> I implemented the Dataset methods Open, the RasterBand methods 
> IReadBlock and IWriteBlock, the method GDalRegister_format where Open is 
> given to poDriver->pfnOpen, CreateCopy to poDriver->pfnCreateCopy and 
> Create to  and poDriver->pfnCreate and the driver is registered.
> A request on the available formats on this version of GDal_Translate 
> shows that the format is registered.
> A convertion request from a GeoTiff to this format crashes in my method 
> Open because the object GDALOpenInfo is wrong (pszFilename is a bad 
> pointer for example). 

Vincent,

I'm surprised your open method is being called for a geotiff if your
driver was registered after the geotiff driver.

 > Moreover, my method CreateCopy is never called
> even if GDALCreateCopy is called.

It it possible you assigned your Open method to the pfnCreateCopy
function?

> The platform is Windows XP with GDal 1.6 and visual studio 2005 pro.
> 
> Did I forget something ?

It is really hard to provide advice without the source code.  I'm basically
guessing.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list