MISR Toolkit  1.5.1
Functions
MtkMakeFilename.c File Reference
#include "MisrFileQuery.h"
#include "MisrError.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>

Go to the source code of this file.

Functions

MTKt_status MtkMakeFilename (const char *basedir, const char *product, const char *camera, int path, int orbit, const char *version, char **filename)
 Given a base directory, product, camera, path, orbit, version. More...
 

Function Documentation

◆ MtkMakeFilename()

MTKt_status MtkMakeFilename ( const char *  basedir,
const char *  product,
const char *  camera,
int  path,
int  orbit,
const char *  version,
char **  filename 
)

Given a base directory, product, camera, path, orbit, version.

Returns
MTK_SUCCESS if successful.

The camera parameter can be set to NULL if product is not by camera. The orbit parameter can be set to 0 if product is not by orbit. The basedir parameter can be set to "." for current or no directory specified.

Example:
In this example, we create the filename misr_products/MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkMakeFilename("misr_products", "GRP_TERRAIN_GM", "DF", 161, 12115, "F03_0021", &filename);
In this example, we create the filename misr_products/MISR_AM1_GP_GMP_P037_O014845_F02_0009.hdf
status = MtkMakeFilename("misr_products", "GP_GMP", NULL, 37, 14845, "F02_0009", &filename);
Note
The caller is responsible for using free() to free the memory used by filename
Parameters
[in]basedirBase Directory
[in]productProduct
[in]cameraCamera
[in]pathPath
[in]orbitOrbit
[in]versionVersion
[out]filenameFilename

Definition at line 49 of file MtkMakeFilename.c.


MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:53