Opened 10 years ago

Closed 10 years ago

#3624 closed defect (fixed)

ISIS3 label parse issue

Reported by: thare Owned by: warmerdam
Priority: normal Milestone: 1.7.3
Component: GDAL_Raster Version: 1.7.2
Severity: normal Keywords: ISIS3 lunar image PVL keyword continuation flag


It appears a new lunar image label is causing the GDAL ISIS3 label parser some grief. I have narrowed it down to a PVL continuation flag. You can see an example in the "Group = Radiometry" section within the parent "Object = IsisCube?".


    DarkFile                  = /usr/local/isis3/data/lro/calibration/NACL_Av-
    NonlinearOffset           = /usr/local/isis3/data/lro/calibration/NACL_Li-
    LinearizationCoefficients = /usr/local/isis3/data/lro/calibration/NACL_Li-
    FlatFile                  = /usr/local/isis3/data/lro/calibration/NACL_Fl-

Deleting those four lines fixes the parsing. So the "-" (which is not escaped) needs to be recognized as a line continuation flag. Once found at the end of a line, the next line should be appended to it once the white space in the front has been removed.

Note that in the same image, inside the group above, a line continuation is also used. That currently works since the value is wrapped in parentheses.

BTW, this cube also has many "Object = Table" sections but those are correctly ignored. I am mentioning this since I have not seen the use of those sections in many labels.

An example (~15mb):

Here is a good article on the whole PVL topic - . If the next generation of planetary images continue to use PVL (maybe be called PDS4), it might be worth looking into one the libraries mentioned on that page for GDAL. However, I have also heard the next generation might be switching to an XML label. We'll see.

thanks, Trent

Change History (3)

comment:1 Changed 10 years ago by warmerdam

Cc: ISIS3 added
Status: newassigned

comment:2 Changed 10 years ago by warmerdam

The PDS documents ( don't mention anything about line continuation marks, but clearly they are being used in the product. I shall endevour to add handling.

I did review the referenced article, and have included a pointer to it in the "nasakeywordhandler.cpp" file header for future reference.

comment:3 Changed 10 years ago by warmerdam

Resolution: fixed
Status: assignedclosed

I have added support in ReadWord?() for line continuation marks, and added some minimal testing for it in trunk (r19832) and 1.7 (r19833).

Note: See TracTickets for help on using tickets.