[Geotiff] bug in libgeotiff 1.2.3 file geo_normalize.c used with cpl_csv_incode.c

Frank Warmerdam warmerdam at pobox.com
Tue Apr 11 15:43:31 EDT 2006


Dmitry V. Fedorov wrote:
> Hi all,
> 
> The update in geo_normalize.c to support gdal breaks libgeotiff with in-code csv database (cpl_csv_incode.c).  
> 
> Suggested fix:
> 
>     // dima: fix for the incode csv tables
>     if( (fp = VSIFOpen(pszFilename,"r")) == NULL )
>     {
>       if( (fp = VSIFOpen("gdal_datum.csv", "r")) != NULL )
>       {
>         pszFilename = CSVFilename( "gdal_datum.csv" );
>         VSIFClose( fp );
>       }
>     }
>     else
>         VSIFClose( fp );

Folks,

I have committed a slight variation of this as the above break use of
gdal_datum.csv.  Instead I use:

      // dima: fix for the incode csv tables
      if( (fp = VSIFOpen(pszFilename,"r")) == NULL )
      {
        if( (fp = VSIFOpen(CSVFilename("gdal_datum.csv"), "r")) != NULL )
        {
          pszFilename = CSVFilename( "gdal_datum.csv" );
          VSIFClose( fp );
        }
      }
      else
          VSIFClose( fp );

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    | President OSGF, http://osgeo.org



More information about the Geotiff mailing list