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

Go to the source code of this file.

Data Structures

struct  MTKt_GeoCenter
 Geographic Center. More...
 
struct  MTKt_Extent
 Geographic Extent. More...
 
struct  MTKt_Region
 Region of interest. More...
 

Macros

#define MTKT_GEOCENTER_INIT   { MTKT_GEOCOORD_INIT }
 
#define MTKT_EXTENT_INIT   { 0.0, 0.0 }
 
#define MTKT_REGION_INIT   { MTKT_GEOCENTER_INIT, MTKT_EXTENT_INIT }
 

Functions

MTKt_status MtkSnapToGrid (int path, int resolution, MTKt_Region region, MTKt_MapInfo *mapinfo)
 Snap a region to a MISR grid based on path number and resolution. More...
 
MTKt_status MtkSetRegionByUlcLrc (double ulc_lat_dd, double ulc_lon_dd, double lrc_lat_dd, double lrc_lon_dd, MTKt_Region *region)
 Select region by latitude and longitude of upper left corner and lower right corner in decimal degrees. More...
 
MTKt_status MtkSetRegionByPathBlockRange (int path_number, int start_block, int end_block, MTKt_Region *region)
 Select region by path and block range. More...
 
MTKt_status MtkSetRegionByLatLonExtent (double ctr_lat_dd, double ctr_lon_dd, double lat_extent, double lon_extent, const char *extent_units, MTKt_Region *region)
 Select region by latitude, longitude in decimal degrees, and extent in specified units of degrees, meters, kilometers, or pixels. More...
 
MTKt_status MtkSetRegionByPathSomUlcLrc (int path, double ulc_som_x, double ulc_som_y, double lrc_som_x, double lrc_som_y, MTKt_Region *region)
 Select region by Path and SOM X/Y of upper left corner and lower right corner in meters. More...
 
MTKt_status MtkSetRegionByGenericMapInfo (const MTKt_GenericMapInfo *Map_info, const MTKt_GCTPProjInfo *Proj_info, int Path, MTKt_Region *Region)
 Create an MtkRegion structure that contains the given map. More...
 

Macro Definition Documentation

◆ MTKT_EXTENT_INIT

#define MTKT_EXTENT_INIT   { 0.0, 0.0 }

Definition at line 38 of file MisrSetRegion.h.

◆ MTKT_GEOCENTER_INIT

#define MTKT_GEOCENTER_INIT   { MTKT_GEOCOORD_INIT }

Definition at line 30 of file MisrSetRegion.h.

◆ MTKT_REGION_INIT

#define MTKT_REGION_INIT   { MTKT_GEOCENTER_INIT, MTKT_EXTENT_INIT }

Definition at line 46 of file MisrSetRegion.h.

Function Documentation

◆ MtkSetRegionByGenericMapInfo()

MTKt_status MtkSetRegionByGenericMapInfo ( const MTKt_GenericMapInfo Map_info,
const MTKt_GCTPProjInfo Proj_info,
int  Path,
MTKt_Region Region 
)

Create an MtkRegion structure that contains the given map.

Returns
MTK_SUCCESS if successful.
Example:
Note
Parameters
[in]Map_infoMap information.
[in]Proj_infoProjection information.
[in]PathOrbit path number.
[out]RegionRegion

Definition at line 37 of file MtkSetRegionByGenericMapInfo.c.

◆ MtkSetRegionByLatLonExtent()

MTKt_status MtkSetRegionByLatLonExtent ( double  ctr_lat_dd,
double  ctr_lon_dd,
double  lat_extent,
double  lon_extent,
const char *  extent_units,
MTKt_Region region 
)

Select region by latitude, longitude in decimal degrees, and extent in specified units of degrees, meters, kilometers, or pixels.

The parameter extent_units is a case insensitive string that can be set to one of the following values:

  1. "degrees", "deg", "dd" for degrees;
  2. "meters", "m" for meters;
  3. "kilometers", "km" for kilometers; and
  4. "275m", "275 meters", "1.1km", "1.1 kilometers" for pixels of a specified resolution per pixel.
Returns
MTK_SUCCESS if successful.
Example 1:
In this example, we select the region centered at latitude 35.0 and longitude -115.0. With a latitude extent of 1.5 degrees and longitude extent of 2 degrees.
MTKt_region region = MTKT_REGION_INIT;
status = MtkSetRegionByLatLonExtent(35.0, -115.0, 1.5, 2.0, "deg", &region);
Example 2:
In this example, we select the region centered at latitude 35.0 and longitude -115.0. With a latitude extent of 5000 meters and longitude extent of 8000 meters.
MTKt_region region = MTKT_REGION_INIT;
status = MtkSetRegionByLatLonExtent(35.0, -115.0, 5000.0, 8000.0, "m", &region);
Example 3:
In this example, we select the region centered at latitude 35.0 and longitude -115.0. With a latitude extent of 2.2km and longitude extent of 1.1km.
MTKt_region region = MTKT_REGION_INIT;
status = MtkSetRegionByLatLonExtent(35.0, -115.0, 2.2, 1.1, "km", &region);
Example 4:
In this example, we select the region centered at latitude 35.0 and longitude -115.0. With a latitude extent of 45 (275 meter per pixels) and longitude extent of 100 (275 meter per pixels).
MTKt_region region = MTKT_REGION_INIT;
status = MtkSetRegionByLatLonExtent(35.0, -115.0, 45.0, 100.0, "275m", &region);
Example 5:
In this example, we select the region centered at latitude 35.0 and longitude -115.0. With a latitude extent of 35 (1.1 km per pixels) and longitude extent of 25 (1.1 km per pixels).
MTKt_region region = MTKT_REGION_INIT;
status = MtkSetRegionByLatLonExtent(35.0, -115.0, 35.0, 25.0, "1.1km", &region);
Parameters
[in]ctr_lat_ddLatitude
[in]ctr_lon_ddLongitude
[in]lat_extentLatitude Extent
[in]lon_extentLongitude Extent
[in]extent_unitsExtent Units (ex. degrees, deg, dd, meters, m, kilometer, km, 275m, 1.1km)
[out]regionRegion

Definition at line 77 of file MtkSetRegionByLatLonExtent.c.

◆ MtkSetRegionByPathBlockRange()

MTKt_status MtkSetRegionByPathBlockRange ( int  path_number,
int  start_block,
int  end_block,
MTKt_Region region 
)

Select region by path and block range.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we select the region on path 39 starting at block 50 and ending at block 60.
MTKt_region region = MTKT_REGION_INIT;
status = MtkSetRegionByPathBlockRange(39, 50, 60, &region);
Parameters
[in]path_numberPath
[in]start_blockStart Block
[in]end_blockEnd Block
[out]regionRegion

Definition at line 37 of file MtkSetRegionByPathBlockRange.c.

◆ MtkSetRegionByPathSomUlcLrc()

MTKt_status MtkSetRegionByPathSomUlcLrc ( int  path,
double  ulc_som_x,
double  ulc_som_y,
double  lrc_som_x,
double  lrc_som_y,
MTKt_Region region 
)

Select region by Path and SOM X/Y of upper left corner and lower right corner in meters.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we select the region with upper left SOM X 15600000.0 meters, SOM Y -300.0 meters and lower right SOM X 16800000.0 meters, SOM Y 2000.0 meters for path 27.
MTKt_region region = MTKT_REGION_INIT;
status = MtkSetRegionByPathSomUlcLrc(27, 15600000.0, -300.0, 16800000.0, 2000.0, &region);
Parameters
[in]pathPath
[in]ulc_som_xUpper left corner SOM X
[in]ulc_som_yUpper left corner SOM Y
[in]lrc_som_xLower right corner SOM X
[in]lrc_som_yLower right corner SOM Y
[out]regionRegion

Definition at line 37 of file MtkSetRegionByPathSomUlcLrc.c.

◆ MtkSetRegionByUlcLrc()

MTKt_status MtkSetRegionByUlcLrc ( double  ulc_lat_dd,
double  ulc_lon_dd,
double  lrc_lat_dd,
double  lrc_lon_dd,
MTKt_Region region 
)

Select region by latitude and longitude of upper left corner and lower right corner in decimal degrees.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we select the region with upper left latitude 40.0, longitude -120.0 and lower right latitude 30.0, longitude -110.0.
MTKt_region region = MTKT_REGION_INIT;
status = MtkSetRegionByUlcLrc(40.0, -120.0, 30.0, -110.0, &region);
Parameters
[in]ulc_lat_ddUpper left corner latitude
[in]ulc_lon_ddUpper left corner longitude
[in]lrc_lat_ddLower right corner latitude
[in]lrc_lon_ddLower right corner longitude
[out]regionRegion

Definition at line 37 of file MtkSetRegionByUlcLrc.c.

◆ MtkSnapToGrid()

MTKt_status MtkSnapToGrid ( int  Path,
int  Resolution,
MTKt_Region  Region,
MTKt_MapInfo Map_info 
)

Snap a region to a MISR grid based on path number and resolution.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we snap a region to a SOM plane for path 37 at resolution 1100 meters.
status = MtkSnapToGrid(37, 1100, region, &mapinfo);
Special Note:
Typically this function is not called directly. Instead use MtkReadData().
Parameters
[in]PathPath
[in]ResolutionResolution
[in]RegionRegion
[out]Map_infoMap Info

Definition at line 40 of file MtkSnapToGrid.c.


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