Opened 8 years ago

Closed 8 years ago

#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:
Cc:

Description

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
       po_1471778_bgrn_0000000_rpc.txt
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 8 years ago.
TIF image with RPC file

Download all attachments as: .zip

Change History (3)

by bugbuster, 8 years ago

Attachment: PbRPC.7z added

TIF image with RPC file

comment:1 by Even Rouault, 8 years ago

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 by Even Rouault, 8 years ago

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