Opened 12 years ago

Closed 12 years ago

#2274 closed defect (fixed)


Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.5.1
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: NDF NLAPS
Cc: peter.borissow@…


Hi Frank-

One other thing I forgot to mention. We ran into a bug in the NLAPS/NDF plugin in GDAL. The driver was bombing out on our Landsat 4 test data. The following code was appended to fix the problem in the file ndfdataset.cpp after line 261.

      char * pszBasePath = CPLStrdup(CPLGetPath(poOpenInfo->pszFilename));
      pszFilename = CPLFormFilename( pszBasePath,pszFilename, NULL);

Before, the NDF dataset driver when it encountered an explicit BAND???_DIRECTIVE in the header file would just try to open the file with that file name. If the application’s working directory was anything other than the directory where the band file was (usually the case), the open would fail. The code above modifies driver to prepend the parent directory path of the header file to the explicit band file name. This modification has been tested and works. Is this something you could add into the next release of GDAL?

Thanks Again, Peter

Change History (1)

comment:1 Changed 12 years ago by warmerdam

Resolution: fixed
Status: newclosed

I have committed a variation on this in trunk (r13993) and 1.5 branch (r13994) as well as added a very brief test of the NDF2 format driver in trunk (r13992).

Thanks Peter!

Note: See TracTickets for help on using tickets.