#6341 closed defect (fixed)

Error when reading an ill-formed RPC file (double ^M line ending)

Reported by: bugbuster Owned by: warmerdam
Priority: normal Milestone: 1.11.5
Component: default Version: 1.11.2
Severity: normal Keywords:


Gdalinfo displays an error while reading an RPC file :

gdalinfo po_1471778_bgrn_0000000.small_tif
Driver: GTiff/GeoTIFF
ERROR 1: po_1471778_bgrn_0000000_rpc.txt file found, but missing SAMP_NUM_COEFF_1 field (and possibly others).
Files: po_1471778_bgrn_0000000.small_tif
Size is 63, 63

This data is an Ikonos product. The problem comes from an "ill-formed" RPC file : if you look carefully, each line is ended with a double "M".

LINE_OFF: +003154.00 pixels^M^M
SAMP_OFF: +003154.00 pixels^M^M

I know that a dos2unix solves the problem. However, it is not always possible to modify the input data.
Could it be possible to make the GDALLoadRPBFile() function (gdal_rpcimdio.cpp) more robust against such ill-formed files ?

Attachments (1)

PbRPC.7z (14.1 KB) - added by bugbuster 14 months ago.
TIF image with RPC file

Download all attachments as: .zip

Change History (3)

Changed 14 months ago by bugbuster

Attachment: PbRPC.7z added

TIF image with RPC file

comment:1 Changed 14 months ago by Even Rouault

trunk r33193, branches/2.0 r33194, branches/1.11 r33195 "GDALLoadRPCFile(): load .rpc files from Ikonos products that have extra end-of-line character (#6341)"

comment:2 Changed 14 months ago by Even Rouault

Milestone: 1.11.5
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.