MISR Toolkit
1.5.1
|
Go to the source code of this file.
Data Structures | |
struct | MTKt_GeoCoord |
Geographic Coordinates. More... | |
struct | MTKt_SomCoord |
SOM Coordinates. More... | |
struct | MTKt_GeoRegion |
Geographic Region. More... | |
struct | MTKt_SomRegion |
SOM Region. More... | |
struct | MTKt_MapInfo |
Map Information. More... | |
struct | MTKt_GenericMapInfo |
Generic map information. More... | |
struct | MTKt_GCTPProjInfo |
GCTP projection information. More... | |
Macros | |
#define | MTKT_GEOCOORD_INIT { 0.0, 0.0 } |
#define | MTKT_SOMCOORD_INIT { 0.0, 0.0 } |
#define | MTKT_GEOREGION_INIT |
#define | MTKT_SOMREGION_INIT |
#define | MTKT_MAPINFO_INIT |
#define | MTKT_GENERICMAPINFO_INIT { 0, 0, 0, 0, 0, 0, 0, 0, {0,0,0}, {0,0,0}, MTKe_ORIGIN_UL, MTKe_PIX_REG_CENTER } |
#define | MTKT_GCTPPROJINFO_INIT { 0, 0, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } |
Enumerations | |
enum | MTKt_OriginCode { MTKe_ORIGIN_UL = 0, MTKe_ORIGIN_UR = 1, MTKe_ORIGIN_LL = 2, MTKe_ORIGIN_LR = 3 } |
Origin code. More... | |
enum | MTKt_PixRegCode { MTKe_PIX_REG_CENTER = 0, MTKe_PIX_REG_CORNER = 1 } |
Pixel registration code. More... | |
Functions | |
MTKt_status | MtkLSToSomXY (MTKt_MapInfo mapinfo, float line, float sample, double *som_x, double *som_y) |
Convert line, sample to SOM X, SOM Y. More... | |
MTKt_status | MtkLSToSomXYAry (MTKt_MapInfo mapinfo, int nelement, const float *line, const float *sample, double *som_x, double *som_y) |
Convert array of line, sample to array of SOM X, SOM Y. More... | |
MTKt_status | MtkSomXYToLS (MTKt_MapInfo mapinfo, double som_x, double som_y, float *line, float *sample) |
Convert SOM X, SOM Y to line, sample. More... | |
MTKt_status | MtkSomXYToLSAry (MTKt_MapInfo mapinfo, int nelement, const double *som_x, const double *som_y, float *line, float *sample) |
Convert array of SOM X, SOM Y to array of line, sample. More... | |
MTKt_status | MtkLatLonToLS (MTKt_MapInfo mapinfo, double lat_dd, double lon_dd, float *line, float *sample) |
Convert decimal degrees latitude and longitude to line, sample. More... | |
MTKt_status | MtkLatLonToLSAry (MTKt_MapInfo mapinfo, int nelement, const double *lat_dd, const double *lon_dd, float *line, float *sample) |
Convert array of decimal degrees latitude and longitude to array of line, sample. More... | |
MTKt_status | MtkLSToLatLon (MTKt_MapInfo mapinfo, float line, float sample, double *lat_dd, double *lon_dd) |
Convert line, sample to decimal degrees latitude and longitude. More... | |
MTKt_status | MtkLSToLatLonAry (MTKt_MapInfo mapinfo, int nelement, const float *line, const float *sample, double *lat_dd, double *lon_dd) |
Convert array of line, sample to array of decimal degrees latitude and longitude. More... | |
MTKt_status | MtkCreateLatLon (MTKt_MapInfo mapinfo, MTKt_DataBuffer *latbuf, MTKt_DataBuffer *lonbuf) |
Creates a 2-D latitude buffer and a 2-D longitude buffer in decimal degrees corresponding to the data plane described by the mapinfo argument given a mapinfo structure. More... | |
MTKt_status | MtkGenericMapInfo (double Min_x, double Min_y, double Resolution_x, double Resolution_y, int Number_pixel_x, int Number_pixel_y, MTKt_OriginCode Origin_code, MTKt_PixRegCode Pix_reg_code, MTKt_GenericMapInfo *Map_info) |
Initialize a MTKt_GenericMapInfo structure. More... | |
MTKt_status | MtkGCTPProjInfo (int Proj_code, int Sphere_code, int Zone_code, double Proj_param[15], MTKt_GCTPProjInfo *Proj_info) |
Initialize a MTKt_GCTPProjInfo structure. More... | |
MTKt_status | MtkGCTPCreateLatLon (const MTKt_GenericMapInfo *Map_info, const MTKt_GCTPProjInfo *Proj_info, MTKt_DataBuffer *Latitude, MTKt_DataBuffer *Longitude) |
Create an array of latitude and longitude values corresponding to each pixel in the given map. More... | |
MTKt_status | MtkGenericMapInfoRead (const char *Filename, MTKt_GenericMapInfo *Map_info) |
Initialize a MTKt_GenericMapInfo structure using data from an external file. More... | |
MTKt_status | MtkGCTPProjInfoRead (const char *Filename, MTKt_GCTPProjInfo *Proj_info) |
Initialize a MTKt_GCTPProjInfo structure using data from an external file. More... | |
MTKt_status | MtkChangeMapResolution (const MTKt_MapInfo *Map_info_in, int Resolution, MTKt_MapInfo *Map_info_out) |
Change resolution of an MTKt_MapInfo structure. More... | |
#define MTKT_GCTPPROJINFO_INIT { 0, 0, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } |
Definition at line 130 of file MisrMapQuery.h.
#define MTKT_GENERICMAPINFO_INIT { 0, 0, 0, 0, 0, 0, 0, 0, {0,0,0}, {0,0,0}, MTKe_ORIGIN_UL, MTKe_PIX_REG_CENTER } |
Definition at line 120 of file MisrMapQuery.h.
#define MTKT_GEOCOORD_INIT { 0.0, 0.0 } |
Definition at line 30 of file MisrMapQuery.h.
#define MTKT_GEOREGION_INIT |
Definition at line 49 of file MisrMapQuery.h.
#define MTKT_MAPINFO_INIT |
Definition at line 79 of file MisrMapQuery.h.
#define MTKT_SOMCOORD_INIT { 0.0, 0.0 } |
Definition at line 38 of file MisrMapQuery.h.
#define MTKT_SOMREGION_INIT |
Definition at line 61 of file MisrMapQuery.h.
enum MTKt_OriginCode |
Origin code.
Definition at line 84 of file MisrMapQuery.h.
enum MTKt_PixRegCode |
Pixel registration code.
Enumerator | |
---|---|
MTKe_PIX_REG_CENTER | Center |
MTKe_PIX_REG_CORNER | Corner |
Definition at line 92 of file MisrMapQuery.h.
MTKt_status MtkChangeMapResolution | ( | const MTKt_MapInfo * | Map_info_in, |
int | New_resolution, | ||
MTKt_MapInfo * | Map_info_out | ||
) |
Change resolution of an MTKt_MapInfo structure.
New resolution must be an integer multiple of the base MISR resolution, defined by MAXRESOLUTION.
The edges of the output map will be anchored at the same locations as the input map. Therefore, the size of input map must evenly divisible by the new resolution.
[in] | Map_info_in | Input map information |
[in] | New_resolution | New resolution. |
[out] | Map_info_out | Output map information. |
Definition at line 43 of file MtkChangeMapResolution.c.
MTKt_status MtkCreateLatLon | ( | MTKt_MapInfo | mapinfo, |
MTKt_DataBuffer * | latbuf, | ||
MTKt_DataBuffer * | lonbuf | ||
) |
Creates a 2-D latitude buffer and a 2-D longitude buffer in decimal degrees corresponding to the data plane described by the mapinfo argument given a mapinfo structure.
[in] | mapinfo | Mapinfo |
[out] | latbuf | Latitude data buffer |
[out] | lonbuf | Longitue data buffer |
Definition at line 48 of file MtkCreateLatLon.c.
MTKt_status MtkGCTPCreateLatLon | ( | const MTKt_GenericMapInfo * | Map_info, |
const MTKt_GCTPProjInfo * | Proj_info, | ||
MTKt_DataBuffer * | Latitude, | ||
MTKt_DataBuffer * | Longitude | ||
) |
Create an array of latitude and longitude values corresponding to each pixel in the given map.
[in] | Map_info | Map information. |
[in] | Proj_info | Projection information. |
[out] | Latitude | Latitude values. |
[out] | Longitude | Longitude values. |
Definition at line 36 of file MtkGCTPCreateLatLon.c.
MTKt_status MtkGCTPProjInfo | ( | int | Proj_code, |
int | Sphere_code, | ||
int | Zone_code, | ||
double | Proj_param[15], | ||
MTKt_GCTPProjInfo * | Proj_info | ||
) |
Initialize a MTKt_GCTPProjInfo structure.
[in] | Proj_code | Projection code. |
[in] | Sphere_code | Spheroid code. |
[in] | Zone_code | UTM zone code (only applicable if Projection code is UTM |
[in] | Proj_param | Projection parameters. |
[out] | Proj_info | Projection information. |
Definition at line 35 of file MtkGCTPProjInfo.c.
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:
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)
[in] | Filename | Filename |
[out] | Proj_info | Proj information. |
Definition at line 64 of file MtkGCTPProjInfoRead.c.
MTKt_status MtkGenericMapInfo | ( | double | Min_x, |
double | Min_y, | ||
double | Resolution_x, | ||
double | Resolution_y, | ||
int | Number_pixel_x, | ||
int | Number_pixel_y, | ||
MTKt_OriginCode | Origin_code, | ||
MTKt_PixRegCode | Pix_reg_code, | ||
MTKt_GenericMapInfo * | Map_info | ||
) |
Initialize a MTKt_GenericMapInfo structure.
Min_x and Min_y contains the minimum x,y coordinates at the edge of the map.
Resolution_x is the size of a pixel along the X-axis. Resolution_y is the size of a pixel along the Y-axis.
Number_pixel_x and number_pixel_y specifies the size of the map in pixels along the respective axes.
Origin_code defines the corner of the map at which pixel 0,0 is located. Possible values are: MTKe_ORIGIN_UL - Upper Left (min X, max Y) MTKe_ORIGIN_UR - Upper Right (max X, max Y) MTKe_ORIGIN_LL - Lower Left (min X, min Y) MTKe_ORIGIN_LR - Lower Right (max X, min Y)
Pix_reg_code defines whether a pixel value is related to the corner or center of the corresponding area of that pixel on the map. If the corner is used, then it is always the corner corresponding to the corner of the origin. Possible values are: MTKe_PIX_REG_CENTER - Center MTKe_PIX_REG_CORNER - Corner
[in] | Min_x | Minimum X value in map units |
[in] | Min_y | Minimum Y value in map units |
[in] | Resolution_x | Size of a pixel along X-axis, in map units |
[in] | Resolution_y | Size of a pixel along Y-axis, in map units |
[in] | Number_pixel_x | Number of pixels along X-axis. |
[in] | Number_pixel_y | Number of pixels along Y-axis. |
[in] | Origin_code | Corner of the map at which pixel 0,0 is located. |
[in] | Pix_reg_code | Flag indicating if pixel values correspond to the center or corner of the area of the pixel on the map. |
[out] | Map_info | Map information. |
Definition at line 58 of file MtkGenericMapInfo.c.
MTKt_status MtkGenericMapInfoRead | ( | const char * | Filename, |
MTKt_GenericMapInfo * | Map_info | ||
) |
Initialize a MTKt_GenericMapInfo 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: min_corner_x is the minimum X coordinate at the edge of the map. min_corner_y is the minimum Y coordinate at the edge of the map. resolution_x is the size of a pixel along the X-axis. resolution_y is the size of a pixel along the Y-axis. number_pixel_x is the size of the map in pixels, along the X-axis. number_pixel_y is the size of the map in pixels, along the Y-axis. origin_code defines the corner of the map at which pixel 0,0 is located. pix_reg_code defines whether a pixel value is related to the corner or center of the corresponding area of that pixel on the map. If the corner is used, then it is always the corner corresponding to the corner of the origin.
Possible values for origin_code are: UL - Upper Left (min X, max Y) UR - Upper Right (max X, max Y) LL - Lower Left (min X, min Y) LR - Lower Right (max X, min Y)
Possible values are: CENTER - Center CORNER - Corner
Unrecognized parameter names are ignored. Lines starting with a '#' character are ignored. Comments may be placed on the same line, after a name = value pair as well.
Example map information file:
min_corner_x = 10000.0 min_corner_y = 20000.0 resolution_x = 250.0 resolution_y = 250.0 number_pixel_x = 1000 number_pixel_y = 2000 origin_code = UL # min x, max y pix_reg_code = CENTER
[in] | Filename | Filename |
[out] | Map_info | Map information. |
Definition at line 78 of file MtkGenericMapInfoRead.c.
MTKt_status MtkLatLonToLS | ( | MTKt_MapInfo | mapinfo, |
double | lat_dd, | ||
double | lon_dd, | ||
float * | line, | ||
float * | sample | ||
) |
Convert decimal degrees latitude and longitude to line, sample.
[in] | mapinfo | Map Info |
[in] | lat_dd | Latitude |
[in] | lon_dd | Longitude |
[out] | line | Line |
[out] | sample | Sample |
Definition at line 33 of file MtkLatLonToLS.c.
MTKt_status MtkLatLonToLSAry | ( | MTKt_MapInfo | mapinfo, |
int | nelement, | ||
const double * | lat_dd, | ||
const double * | lon_dd, | ||
float * | line, | ||
float * | sample | ||
) |
Convert array of decimal degrees latitude and longitude to array of line, sample.
[in] | mapinfo | Map Info |
[in] | nelement | Number of elements |
[in] | lat_dd | Latitude |
[in] | lon_dd | Longitude |
[out] | line | Line |
[out] | sample | Sample |
Definition at line 43 of file MtkLatLonToLSAry.c.
MTKt_status MtkLSToLatLon | ( | MTKt_MapInfo | mapinfo, |
float | line, | ||
float | sample, | ||
double * | lat_dd, | ||
double * | lon_dd | ||
) |
Convert line, sample to decimal degrees latitude and longitude.
[in] | mapinfo | Map Info |
[in] | line | Line |
[in] | sample | Sample |
[out] | lat_dd | Latitude |
[out] | lon_dd | Longitude |
Definition at line 33 of file MtkLSToLatLon.c.
MTKt_status MtkLSToLatLonAry | ( | MTKt_MapInfo | mapinfo, |
int | nelement, | ||
const float * | line, | ||
const float * | sample, | ||
double * | lat_dd, | ||
double * | lon_dd | ||
) |
Convert array of line, sample to array of decimal degrees latitude and longitude.
[in] | mapinfo | Map info |
[in] | nelement | Number of elements |
[in] | line | Line |
[in] | sample | Sample |
[out] | lat_dd | Latitude |
[out] | lon_dd | Longitude |
Definition at line 38 of file MtkLSToLatLonAry.c.
MTKt_status MtkLSToSomXY | ( | MTKt_MapInfo | mapinfo, |
float | line, | ||
float | sample, | ||
double * | som_x, | ||
double * | som_y | ||
) |
Convert line, sample to SOM X, SOM Y.
[in] | mapinfo | Map Info |
[in] | line | Line |
[in] | sample | Sample |
[out] | som_x | SOM X |
[out] | som_y | SOM Y |
Definition at line 33 of file MtkLSToSomXY.c.
MTKt_status MtkLSToSomXYAry | ( | MTKt_MapInfo | mapinfo, |
int | nelement, | ||
const float * | line, | ||
const float * | sample, | ||
double * | som_x, | ||
double * | som_y | ||
) |
Convert array of line, sample to array of SOM X, SOM Y.
[in] | mapinfo | Map Info |
[in] | nelement | Number of elemnts |
[in] | line | Line |
[in] | sample | Sample |
[out] | som_x | SOM X |
[out] | som_y | SOM Y |
Definition at line 37 of file MtkLSToSomXYAry.c.
MTKt_status MtkSomXYToLS | ( | MTKt_MapInfo | mapinfo, |
double | som_x, | ||
double | som_y, | ||
float * | line, | ||
float * | sample | ||
) |
Convert SOM X, SOM Y to line, sample.
[in] | mapinfo | Map Info |
[in] | som_x | SOM X |
[in] | som_y | SOM Y |
[out] | line | Line |
[out] | sample | Sample |
Definition at line 32 of file MtkSomXYToLS.c.
MTKt_status MtkSomXYToLSAry | ( | MTKt_MapInfo | mapinfo, |
int | nelement, | ||
const double * | som_x, | ||
const double * | som_y, | ||
float * | line, | ||
float * | sample | ||
) |
Convert array of SOM X, SOM Y to array of line, sample.
[in] | mapinfo | Map Info |
[in] | nelement | Number of elements |
[in] | som_x | SOM X |
[in] | som_y | SOM Y |
[out] | line | Line |
[out] | sample | Sample |
Definition at line 37 of file MtkSomXYToLSAry.c.