MISR Toolkit  1.5.1
Macros | Functions
MtkGCTPProjInfoRead.c File Reference
#include "MisrMapQuery.h"
#include "MisrUtil.h"
#include <stdlib.h>
#include <math.h>

Go to the source code of this file.

Macros

#define MAX_LENGTH   1000
 

Functions

MTKt_status MtkGCTPProjInfoRead (const char *Filename, MTKt_GCTPProjInfo *Proj_info)
 Initialize a MTKt_GCTPProjInfo structure using data from an external file. More...
 

Macro Definition Documentation

◆ MAX_LENGTH

#define MAX_LENGTH   1000

Definition at line 22 of file MtkGCTPProjInfoRead.c.

Function Documentation

◆ MtkGCTPProjInfoRead()

MTKt_status MtkGCTPProjInfoRead ( const char *  Filename,
MTKt_GCTPProjInfo Proj_info 
)

Initialize a MTKt_GCTPProjInfo structure using data from an external file.

The external file must be simple text format with parameter_name = value pairs.

Parameter names recognized by this routine are as follows: proj_code is the GCTP projection code. utm_zone is the UTM zone number for UTM projections only. sphere_code is GCTP spheroid code. proj_param(n) is the nth GCTP projection parameter. (1 <= n <= 15)

Unrecognized parameter names are ignored. Lines starting with a '#' character are ignored. Everything after the first name = value on a line is ignored.

The default value for proj_param(n) which are not specified is zero. Utm_zone is only required if proj_code is UTM (1).

Example map information file:

this is a comment

proj_code = 3 # Albers #utm_zone = -1 sphere_code = 8 # GRS80 proj_param(1) = 0.0 # Semi-major axis of ellipsoid. (superceded by sphere code) proj_param(2) = 0.0 # Semi-minor axis of ellipsoid. (superceded by sphere code) proj_param(3) = 29030000.0 # Latitude of the first standard parallel. (DDDMMMSSS.SS) proj_param(4) = 45030000.0 # Latitude of the second standard parallel. (DDDMMMSSS.SS) proj_param(5) = -96000000.0 # Longitude of the central meridian. (DDDMMMSSS.SS) proj_param(6) = 23000000.0 # Latitude of the projection origin. (DDDMMMSSS.SS)

Returns
MTK_SUCCESS if successful.
Example:
Note
Parameters
[in]FilenameFilename
[out]Proj_infoProj information.

Definition at line 64 of file MtkGCTPProjInfoRead.c.


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