godber / gdal_pds

A GDAL wrapper for the PDS filetype in python
MIT License
1 stars 1 forks source link

handle PDS sequences properly #7

Closed godber closed 9 years ago

godber commented 10 years ago

PDS Sequences are not handled correctly. When encountering a label like this one

 ROVER_MOTION_COUNTER             = (136,427,0,16,0)

the OrderedDict should contain ['136', '427', '0', '16', '0'].

Handle Multiline sequences properly:

  INSTRUMENT_TEMPERATURE          = (3.12641 <degC>,18.1194 <degC>,
                                     9.06355 <degC>,8.25327 <degC>,
                                     7.91895 <degC>,6.70334 <degC>,
                                     0.0199235 <degC>,-5.71166 <degC>,
                                     0.0 <degC>)

Should be

[ '3.12641 <degC>', '18.1194 <degC>', '9.06355 <degC>', '8.25327 <degC>',
'7.91895 <degC>', '6.70334 <degC>', '0.0199235 <degC>' , '-5.71166 <degC>',
'0.0 <degC>']
godber commented 10 years ago

I am somewhat conflicted about whether we should be casting these into their proper types. I guess the PDS spec does define integer and real (and associated) types, so I should be matching those.

godber commented 9 years ago

Closing, this will be resolved when I use the new ANTLR based PDS label parser.