DOI-USGS / usgscsm

This repository stores USGS Community Sensor Model (CSM) camera models
Other
26 stars 33 forks source link

Have the json state be saved on multiple lines #344

Closed oleg-alexandrov closed 3 years ago

oleg-alexandrov commented 3 years ago

ALE now saves an ISD on multiple lines, but USGSCSM saves the model state as one line. I would think that, as before, it would help with readability if the state was saved on multiple lines as well. Any thoughts?

BTW, I could not find any function either in USGSCSM or in CSM itself reading a model state from disk. All I can see is a function for reading the ISD from disk, meaning loadImageSupportData(). And apparently a function for saving a state to disk is not present either.

thareUSGS commented 3 years ago

@oleg-alexandrov That is a good question. We should test that in GXP which also saves state as one giant string (within their image's "*.sup" supplementary file). I'm not sure GXP can handle multiple lines?

jessemapel commented 3 years ago

This is fairly straight forward to do and shouldn't conflict with the CSM API spec as it only requires the first line of the state string to be the the model name.

Reading and saving state to disk is not a part of the CSM API, that is the application's job.