MISR Toolkit  1.5.1
Functions
MtkSetRegionByLatLonExtent.c File Reference
#include "MisrSetRegion.h"
#include "MisrError.h"
#include "MisrUtil.h"
#include <string.h>
#include <strings.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

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...
 

Function Documentation

◆ 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.


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