C — C Interface

namespace ale

Functions

std::string loads(std::string filename, std::string props = "", std::string formatter = "ale", int indent = 2, bool verbose = true, bool onlyIsisSpice = false, bool onlyNaifSpice = false)

Load all of the metadata for an image into an ISD string. This method calls the Python driver structure in ALE to load all of the metadata for an image into an ISD string. See the Python loads method for how this is implemented on the Python side.

Parameters:
  • filename – The filename of the image to load metadata for

  • props – A JSON formatted properties string to pass to the Python drivers. Users can specify certain properties that the drivers will use. Currently kernels and nadir properties are allowed. See the data_naif driver mix-in for details.

  • formatter – A string specifying the format of the output ISD string. Currently supported formatters are isis, usgscsm, and ale. The isis and usgscsm formatters will be deprecated in the future.

  • verbose – A flag to output what the load function is attempting to do. If set to true, information about the drivers load attempts to use will be output to standard out.

  • onlyIsisSpice – A flag the forces the load function to only use IsisSpice drivers

  • onlyNaifSpice – A flag the forces the load function to only use NaifSpice drivers

Returns:

A string containing a JSON formatted ISD for the image.

nlohmann::json load(std::string filename, std::string props = "", std::string formatter = "ale", bool verbose = true, bool onlyIsisSpice = false, bool onlyNaifSpice = false)

Load all of the metadata for an image into a JSON ISD. This method is a convenience wrapper around the loads method that parses the string output of loads into a JSON object.

Parameters:
  • filename – The filename of the image to load metadata for

  • props – A JSON formatted properties string to pass to the Python drivers. Users can specify certain properties that the drivers will use. Currently kernels and nadir properties are allowed. See the data_naif driver mix-in for details.

  • formatter – A string specifying the format of the output ISD string. Currently supported formatters are isis, usgscsm, and ale. The isis and usgscsm formatters will be deprecated in the future.

  • verbose – A flag to output what the load function is attempting to do. If set to true, information about the drivers load attempts to use will be output to standard out.

  • onlyIsisSpice – A flag the forces the load function to only use IsisSpice drivers

  • onlyIsisSpice – A flag the forces the load function to only use NaifSpice drivers

Returns:

A string containing a JSON formatted ISD for the image.