Skip to content

das2c_props

C. Piker edited this page Dec 7, 2023 · 2 revisions

FUNCTION

das2c_props

PURPOSE

Get dataset metadata properties

CALLING SEQUENCE

property_array = das2c_props(struct)
property = das2c_props(struct, key)

INPUTS

Parameter Type Purpose
struct DAS2C_DSET

DAS2C_PDIM

Properties can be attached to datasets as a whole or to variable groups. The structure type is inspected to determine which properties are desired

OPTIONAL INPUTS

Parameter Type Purpose
key String All properties have a name. Get a specific property instead of a array of all properties for the structure

OUTPUT

This function returns an array of DAS2C_PROP structures providing the property or properties of the dataset. DAS2C_PROP structures have the following fields.

Field Type Purpose
KEY String The name of the property
TYPE String The intended final data type for the property, will be one of

boolean,double,doubleArray,int,Datum,DatumRange,String

VALUE String A string version of the property value

If a prop key is given as an input but the dataset has no properties with that name, !NULL is returned. If the dataset has no properties at all, then !NULL is returned when the the full property list is requested.

EXAMPLES

  1. Get all the properties for dataset 1 from query result ID 48.
    result = das2c_results(48)
    ds = das2c_datasets(result, 1)
    das2c_dsprops(ds)
  2. Get the 'label' property for the time dimension from the dataset above.
    pd_time = das2c_pdims(ds, 'time')
    das2c_dsprops(pd_time, 'label')

MODIFICATION HISTORY

C. Piker, 2020-03-13 - Initial Version

Clone this wiki locally