If there does not exist a regular (linear) mapping between a geolocation and data dimension, then the mapping must be made explicit. Each element of the index array, whose dimension is given by the geolocation size, contains the element number (0-based) of the corresponding data dimension.
Result = EOS_SW_DEFIDXMAP(swathID, geodim, datadim, index)
Returns SUCCEED (0) if successful and FAIL (-1) otherwise.
Swath id (long) returned by EOS_SW_CREATE or EOS_SW_ATTACH.
Geolocation dimension name (string).
Data dimension name (string).
The array (long) containing the indices of the data dimension to which each geolocation element corresponds.
In this example, we consider the (simple) case of a geolocation dimension IdxGeo of size 5 and a data dimension IdxData of size 8. In this case, the 0th element of IdxGeo will correspond to the 0th element of IdxData, the 1st element of IdxGeo to the 2nd element of IdxData, etc.:
index = [0,2,3,6,7] status = EOS_SW_DEFIDXMAP(swathID, "IdxGeo", "IdxData", index)