MISR Toolkit  1.5.1
Data Structures | Macros | Functions
MisrCoordQuery.h File Reference
#include "MisrError.h"
#include "MisrProjParam.h"
#include "MisrSetRegion.h"
#include "MisrFileQuery.h"

Go to the source code of this file.

Data Structures

struct  MTKt_GeoBlock
 Geographic Block Coordinates. More...
 
struct  MTKt_BlockCorners
 Block Corners. More...
 

Macros

#define MTKT_GEOBLOCK_INIT
 
#define MTKT_BLOCKCORNERS_INIT   { 0, 0, 0, { MTKT_GEOBLOCK_INIT }}
 

Functions

MTKt_status MtkPathToProjParam (int path, int resolution_meters, MTKt_MisrProjParam *pp)
 Get projection parameters. More...
 
MTKt_status MtkLatLonToSomXY (int path, double lat_dd, double lon_dd, double *som_x, double *som_y)
 Convert decimal degrees latitude and longitude to SOM X, SOM Y. More...
 
MTKt_status MtkLatLonToSomXYAry (int path, int nelement, const double *lat_dd, const double *lon_dd, double *som_x, double *som_y)
 Convert array of decimal degrees latitude and longitude to array of SOM X, SOM Y. More...
 
MTKt_status MtkSomXYToLatLon (int path, double som_x, double som_y, double *lat_dd, double *lon_dd)
 Convert SOM X, SOM Y to decimal degrees latitude and longitude. More...
 
MTKt_status MtkSomXYToLatLonAry (int path, int nelement, const double *som_x, const double *som_y, double *lat_dd, double *lon_dd)
 Convert array of SOM X, SOM Y to array of latitude, longitude. More...
 
MTKt_status MtkBlsToSomXY (int path, int resolution_meters, int block, float line, float sample, double *som_x, double *som_y)
 Convert from Block, Line, Sample, to SOM Coordinates. More...
 
MTKt_status MtkBlsToSomXYAry (int path, int resolution_meters, int nelement, const int *block, const float *line, const float *sample, double *som_x, double *som_y)
 Convert array from Block, Line, Sample, to SOM Coordinates. More...
 
MTKt_status MtkSomXYToBls (int path, int resolution_meters, double som_x, double som_y, int *block, float *line, float *sample)
 Convert SOM X, SOM Y to block, line, sample. More...
 
MTKt_status MtkSomXYToBlsAry (int path, int resolution_meters, int nelement, const double *som_x, const double *som_y, int *block, float *line, float *sample)
 Convert array of SOM X, SOM Y to array of block, line, sample. More...
 
MTKt_status MtkLatLonToBls (int path, int resolution_meters, double lat_dd, double lon_dd, int *block, float *line, float *sample)
 Convert decimal degrees latitude and longitude to block, line, sample. More...
 
MTKt_status MtkLatLonToBlsAry (int path, int resolution_meters, int nelement, const double *lat_dd, const double *lon_dd, int *block, float *line, float *sample)
 Convert array of decimal degrees latitude and longitude to array of block, line, sample. More...
 
MTKt_status MtkBlsToLatLon (int path, int resolution_meters, int block, float line, float sample, double *lat_dd, double *lon_dd)
 Convert from Block, Line, Sample, to Latitude and Longitude in decimal degrees. More...
 
MTKt_status MtkBlsToLatLonAry (int path, int resolution_meters, int nelement, const int *block, const float *line, const float *sample, double *lat_dd, double *lon_dd)
 Convert array from Block, Line, Sample, to Latitude and Longitude. More...
 
MTKt_status MtkPathBlockRangeToBlockCorners (int path, int start_block, int end_block, MTKt_BlockCorners *block_corners)
 Compute block corner coordinates in decimal degrees of latitude and longitude for a given path and block range. Coordinates returned are with respect to the pixel center of the upper left corner, center and lower right corner of each block. More...
 
MTKt_status MtkPixelTime (MTKt_TimeMetaData time_metadata, double som_x, double som_y, char pixel_time[MTKd_DATETIME_LEN])
 Given SOM Coordinates compute pixel time. More...
 
int inv_init (int insys, int inzone, const double *inparm, int indatum, char *fn27, char *fn83, int *iflg, int(*inv_trans[])(double, double, double *, double *))
 
int for_init (int outsys, int outzone, const double *outparm, int outdatum, char *fn27, char *fn83, int *iflg, int(*for_trans[])(double, double, double *, double *))
 
int sominv (double y, double x, double *lon, double *lat)
 
int somfor (double lon, double lat, double *y, double *x)
 

Macro Definition Documentation

◆ MTKT_BLOCKCORNERS_INIT

#define MTKT_BLOCKCORNERS_INIT   { 0, 0, 0, { MTKT_GEOBLOCK_INIT }}

Definition at line 47 of file MisrCoordQuery.h.

◆ MTKT_GEOBLOCK_INIT

#define MTKT_GEOBLOCK_INIT
Value:
MTKT_GEOCOORD_INIT, MTKT_GEOCOORD_INIT, \
MTKT_GEOCOORD_INIT, MTKT_GEOCOORD_INIT }
#define MTKT_GEOCOORD_INIT
Definition: MisrMapQuery.h:30

Definition at line 35 of file MisrCoordQuery.h.

Function Documentation

◆ for_init()

int for_init ( int  outsys,
int  outzone,
const double *  outparm,
int  outdatum,
char *  fn27,
char *  fn83,
int *  iflg,
int(*[])(double, double, double *, double *)  for_trans 
)

◆ inv_init()

int inv_init ( int  insys,
int  inzone,
const double *  inparm,
int  indatum,
char *  fn27,
char *  fn83,
int *  iflg,
int(*[])(double, double, double *, double *)  inv_trans 
)

◆ MtkBlsToLatLon()

MTKt_status MtkBlsToLatLon ( int  path,
int  resolution_meters,
int  block,
float  line,
float  sample,
double *  lat_dd,
double *  lon_dd 
)

Convert from Block, Line, Sample, to Latitude and Longitude in decimal degrees.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert block 22, line 101, sample 22 for path 1 at 1100 meter resolution to latitude and longitude in decimal degrees.
status = MtkBlsToLatLon(1, 1100, 22, 101, 22, &lat_dd, &lon_dd);
Parameters
[in]pathPath
[in]resolution_metersResolution
[in]blockBlock Number
[in]lineLine
[in]sampleSample
[out]lat_ddLatitude Decimal Degrees
[out]lon_ddLongitude Decimal Degrees

Definition at line 33 of file MtkBlsToLatLon.c.

◆ MtkBlsToLatLonAry()

MTKt_status MtkBlsToLatLonAry ( int  path,
int  resolution_meters,
int  nelement,
const int *  block,
const float *  line,
const float *  sample,
double *  lat_dd,
double *  lon_dd 
)

Convert array from Block, Line, Sample, to Latitude and Longitude.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert an array of block, line, sample values for path 1 at 1100 meter resolution to latitude and longitude in decimal degrees.
int block[2] = {22, 24};
float line[2] = {101, 102};
float sample[2] = {22, 23};
double lat_dd[2];
double lon_dd[2];
status = MtkBlsToLatLonAry(1, 1100, 2, block, line, sample, lat_dd, lon_dd);
Parameters
[in]pathPath
[in]resolution_metersResolution
[in]nelementNumber of elements
[in]blockBlock
[in]lineLine
[in]sampleSample
[out]lat_ddLatitude Decimal Degrees
[out]lon_ddLongitude Decimal Degrees

Definition at line 39 of file MtkBlsToLatLonAry.c.

◆ MtkBlsToSomXY()

MTKt_status MtkBlsToSomXY ( int  path,
int  resolution_meters,
int  block,
float  line,
float  sample,
double *  som_x,
double *  som_y 
)

Convert from Block, Line, Sample, to SOM Coordinates.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert block 22, line 101, sample 22 for path 1 at 1100 meter resolution to SOM Coordinates.
status = MtkBlsToSomXY(1, 1100, 22, 101, 22, &som_x, &som_y);
Parameters
[in]pathPath
[in]resolution_metersResolution Meters
[in]blockBlock
[in]lineLine
[in]sampleSample
[out]som_xSOM X
[out]som_ySOM Y

Definition at line 33 of file MtkBlsToSomXY.c.

◆ MtkBlsToSomXYAry()

MTKt_status MtkBlsToSomXYAry ( int  path,
int  resolution_meters,
int  nelement,
const int *  block,
const float *  line,
const float *  sample,
double *  som_x,
double *  som_y 
)

Convert array from Block, Line, Sample, to SOM Coordinates.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert an array of block, line, sample values for path 1 at 1100 meter resolution to SOM Coordinates.
int block[2] = {22, 122};
float line[2] = {101, 202};
float sample[2] = {22, 122};
double som_x[2];
double som_y[2];
status = MtkBlsToSomXYAry(1, 1100, 2, block, line, sample, som_x, som_y);
Parameters
[in]pathPath
[in]resolution_metersResolution Meters
[in]nelementNumber of elements
[in]blockBlock
[in]lineLine
[in]sampleSample
[out]som_xSOM X
[out]som_ySOM Y

Definition at line 39 of file MtkBlsToSomXYAry.c.

◆ MtkLatLonToBls()

MTKt_status MtkLatLonToBls ( int  path,
int  resolution_meters,
double  lat_dd,
double  lon_dd,
int *  block,
float *  line,
float *  sample 
)

Convert decimal degrees latitude and longitude to block, line, sample.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert latitude 82.740690 and longitude -3.310459 for path 1 at 1100 meter resolution to block, line, sample.
status = MtkLatLonToBls(1, 1100, 82.740690, -3.310459, &block, &line, &sample);
Parameters
[in]pathPath
[in]resolution_metersResolution
[in]lat_ddLatitude
[in]lon_ddLongitude
[out]blockBlock number
[out]lineLine
[out]sampleSample

Definition at line 34 of file MtkLatLonToBls.c.

◆ MtkLatLonToBlsAry()

MTKt_status MtkLatLonToBlsAry ( int  path,
int  resolution_meters,
int  nelement,
const double *  lat_dd,
const double *  lon_dd,
int *  block,
float *  line,
float *  sample 
)

Convert array of decimal degrees latitude and longitude to array of block, line, sample.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert an array of latitude and longitude values for path 1 at 1100 meter resolution to block, line, sample.
double lat_dd[2] = {82.740690, 81.057280};
double lon_dd[2] = {-3.310459, -16.810591};
int block[2];
float line[2];
float sample[2];
status = MtkLatLonToBlsAry(1, 1100, 2, lat_dd, lon_dd, block, line, sample);
Parameters
[in]pathPath
[in]resolution_metersResolution
[in]nelementNumber of elements
[in]lat_ddLatitude
[in]lon_ddLongitude
[out]blockBlock number
[out]lineLine
[out]sampleSample

Definition at line 40 of file MtkLatLonToBlsAry.c.

◆ MtkLatLonToSomXY()

MTKt_status MtkLatLonToSomXY ( int  path,
double  lat_dd,
double  lon_dd,
double *  som_x,
double *  som_y 
)

Convert decimal degrees latitude and longitude to SOM X, SOM Y.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert latitude 82.740690 and longitude -3.310459 for path 1 to SOM Cordinates.
status = MtkLatLonToSomXY(1, 82.740690, -3.310459, &som_x, &som_y);
Parameters
[in]pathPath
[in]lat_ddLatitude
[in]lon_ddLongitude
[out]som_xSOM X
[out]som_ySOM Y

Definition at line 38 of file MtkLatLonToSomXY.c.

◆ MtkLatLonToSomXYAry()

MTKt_status MtkLatLonToSomXYAry ( int  path,
int  nelement,
const double *  lat_dd,
const double *  lon_dd,
double *  som_x,
double *  som_y 
)

Convert array of decimal degrees latitude and longitude to array of SOM X, SOM Y.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert an array of latitude and longitude values for path 1 at 1100 meter resolution to block, line, sample.
double lat_dd[2] = {82.740690, 81.057280};
double lon_dd[2] = {-3.310459, -16.810591};
double som_x[2];
double som_y[2];
status = MtkLatLonToSomXYAry(1, 1100, 2, lat_dd, lon_dd, som_x, som_y);
Parameters
[in]pathPath
[in]nelementNumber of elements
[in]lat_ddLatitude
[in]lon_ddLongitude
[out]som_xSOM X
[out]som_ySOM Y

Definition at line 42 of file MtkLatLonToSomXYAry.c.

◆ MtkPathBlockRangeToBlockCorners()

MTKt_status MtkPathBlockRangeToBlockCorners ( int  path,
int  start_block,
int  end_block,
MTKt_BlockCorners block_corners 
)

Compute block corner coordinates in decimal degrees of latitude and longitude for a given path and block range. Coordinates returned are with respect to the pixel center of the upper left corner, center and lower right corner of each block.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we want the block corners for path 37 and blocks 25 to 50.
status = MtkPathBlockRangeToBlockCorners(37, 25, 50, &block_corners);
Parameters
[in]pathPath
[in]start_blockStart Block
[in]end_blockEnd Block
[out]block_cornersLongitude Decimal Degrees

Definition at line 36 of file MtkPathBlockRangeToBlockCorners.c.

◆ MtkPathToProjParam()

MTKt_status MtkPathToProjParam ( int  path,
int  resolution_meters,
MTKt_MisrProjParam pp 
)

Get projection parameters.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get the projection parameters for path 1 at 1100 meter resolution.
Parameters
[in]pathPath
[in]resolution_metersResolution
[out]ppProjection Parameters

Definition at line 41 of file MtkPathToProjParam.c.

◆ MtkPixelTime()

MTKt_status MtkPixelTime ( MTKt_TimeMetaData  time_metadata,
double  som_x,
double  som_y,
char  pixel_time[MTKd_DATETIME_LEN] 
)

Given SOM Coordinates compute pixel time.

Returns
MTK_SUCCESS if successful.

Time Format: YYYY-MM-DDThh:mm:ss.ssssssZ (ISO 8601)

Example:
In this example, we get the pixel time for SOM X 8176300.0 and SOM Y 574200.0.
status = MtkPixelTime(time_metadata, 8176300.0, 574200.0, pixel_time);
Note
Refer to MtkTimeMetaRead() to retrieve time metadata.
Parameters
[in]time_metadataTime metadata from L1B2 product file
[in]som_xSOM X
[in]som_ySOM Y
[out]pixel_timePixel time

Definition at line 41 of file MtkPixelTime.c.

◆ MtkSomXYToBls()

MTKt_status MtkSomXYToBls ( int  path,
int  resolution_meters,
double  som_x,
double  som_y,
int *  block,
float *  line,
float *  sample 
)

Convert SOM X, SOM Y to block, line, sample.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert SOM X 10529200.016621 and SOM Y 622600.018066 for path 1 at 1100 meter resolution to block, line, sample.
status = MtkSomXYToBls(1, 1100, 10529200.016621, 622600.018066, &block, &line, &sample);
Parameters
[in]pathPath
[in]resolution_metersResolution
[in]som_xSOM X
[in]som_ySOM Y
[out]blockBlock
[out]lineLine
[out]sampleSample

Definition at line 33 of file MtkSomXYToBls.c.

◆ MtkSomXYToBlsAry()

MTKt_status MtkSomXYToBlsAry ( int  path,
int  resolution_meters,
int  nelement,
const double *  som_x,
const double *  som_y,
int *  block,
float *  line,
float *  sample 
)

Convert array of SOM X, SOM Y to array of block, line, sample.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert an array of SOM X and SOM Y values for path 1 at 1100 meter resolution to block, line, sample.
double som_x[2] = {10529200.016621, 10811900.026208};
double som_y[2] = {622600.018066, 623700.037609};
int block[2];
float line[2];
float sample[2];
status = MtkSomXYToBlsAry(1, 1100, 2, som_x, som_y, block, line, sample);
Parameters
[in]pathPath
[in]resolution_metersResolution
[in]nelementNumber of elements
[in]som_xSOM X
[in]som_ySOM Y
[out]blockBlock
[out]lineLine
[out]sampleSample

Definition at line 39 of file MtkSomXYToBlsAry.c.

◆ MtkSomXYToLatLon()

MTKt_status MtkSomXYToLatLon ( int  path,
double  som_x,
double  som_y,
double *  lat_dd,
double *  lon_dd 
)

Convert SOM X, SOM Y to decimal degrees latitude and longitude.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert SOM X 10529200.016621 and SOM Y 622600.018066 for path 1 to latitude and longitude in decimal degrees.
status = MtkSomXYToLatLon(1, 10529200.016621, 622600.018066, &lat_dd, &lon_dd);
Parameters
[in]pathPath
[in]som_xSOM X
[in]som_ySOM Y
[out]lat_ddLatitude
[out]lon_ddLongitude

Definition at line 36 of file MtkSomXYToLatLon.c.

◆ MtkSomXYToLatLonAry()

MTKt_status MtkSomXYToLatLonAry ( int  path,
int  nelement,
const double *  som_x,
const double *  som_y,
double *  lat_dd,
double *  lon_dd 
)

Convert array of SOM X, SOM Y to array of latitude, longitude.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert an array of SOM X and SOM Y values for path 1 to latitude and longitude in decimal degrees.
double som_x[2] = {10529200.016621, 10811900.026208};
double som_y[2] = {622600.018066, 623700.037609};
double lat_dd[2];
double lon_dd[2];
status = MtkSomXYToLatLonAry(1, 2, som_x, som_y, lat_dd, lon_dd);
Parameters
[in]pathPath
[in]nelementNumber of elements
[in]som_xSOM X
[in]som_ySOM Y
[out]lat_ddLatitude
[out]lon_ddLongitude

Definition at line 41 of file MtkSomXYToLatLonAry.c.

◆ somfor()

int somfor ( double  lon,
double  lat,
double *  y,
double *  x 
)

◆ sominv()

int sominv ( double  y,
double  x,
double *  lon,
double *  lat 
)

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