[mapserver-users] gdalinfo - error while opening CADRG map

Even Rouault even.rouault at mines-paris.org
Tue Apr 20 11:22:37 PDT 2010


wostok,

I'd think that such a TOC file would be invalid. It would mean that the same 
CADRG tile is used several times at different geolocations. But as a CADRG 
tile contains its own georeferencing, this doesn't make much sense.

However, if you can compile gdal yourself,  you could remove the following 
lines (around line 423-430) in gdal/frmts/nitf/rpftocfile.cpp and see what 
happens.

if (frameEntry->exists)
        {
            CPLError( CE_Failure, CPLE_NotSupported, 
                      "Invalid TOC file. Frame entry(%d,%d) for frame file 
index %d is a duplicate.",
                      frameRow, frameCol, i);
            RPFTOCFree(toc);
            return NULL;
        }

I'd be interested in having your feedback and/or seeing this dataset if you 
can share it. Maybe this test should just be turned into a warning.

Best regards,

Even

Le Tuesday 20 April 2010 14:33:10 wostok, vous avez écrit :
> Hello,
>
> I'm getting error while executing gdalinfo on CADRG map (.toc file):
>
> gdalinfo.exe my_toc_file.toc
> ERROR 6: Invalid TOC file. Frame entry(15,6) for frame file index 421 is a
> duplicate.
> gdalinfo failed - unable to open 'path_to_A.TOC'.
>
> It looks like the map file is bad, but when I opened it in CADRG viewer -
> Tatuk Gis,
> there weren't any problems.
>
> I haven't found any information about this error on google.
> Is this a bug or my map file has been corrupted?
>
> I use fwtools 2.4.7 on win xp,
>
> Thanks in advance.
>
> wostok





More information about the MapServer-users mailing list