MISR Toolkit  1.5.1
Functions
MisrReProject.h File Reference
#include "MisrError.h"
#include "MisrProjParam.h"
#include "MisrMapQuery.h"

Go to the source code of this file.

Functions

MTKt_status MtkCreateGeoGrid (double ulc_lat_dd, double ulc_lon_dd, double lrc_lat_dd, double lrc_lon_dd, double lat_cellsize_dd, double lon_cellsize_dd, MTKt_DataBuffer *latbuf, MTKt_DataBuffer *lonbuf)
 Creates a regularly spaced geographic 2-D grid consisting of a latitude buffer and a longitude buffer in decimal degrees, given upper left and lower right latitude/longitude coordinates and latitude/longitude cell size. More...
 
MTKt_status MtkTransformCoordinates (MTKt_MapInfo mapinfo, MTKt_DataBuffer latbuf, MTKt_DataBuffer lonbuf, MTKt_DataBuffer *linebuf, MTKt_DataBuffer *samplebuf)
 Transforms latitude/longitude coordinates into line/sample coordinates for a given mapinfo. More...
 
MTKt_status MtkResampleNearestNeighbor (MTKt_DataBuffer srcbuf, MTKt_DataBuffer linebuf, MTKt_DataBuffer samplebuf, MTKt_DataBuffer *resampbuf)
 Perform nearest neighbor resampling. More...
 
MTKt_status MtkResampleCubicConvolution (const MTKt_DataBuffer *Source, const MTKt_DataBuffer *Source_mask, const MTKt_DataBuffer *Line, const MTKt_DataBuffer *Sample, float A, MTKt_DataBuffer *Resampled, MTKt_DataBuffer *Resampled_mask)
 Resample source data at the given coordinates using interpolation by cubic convolution. More...
 

Function Documentation

◆ MtkCreateGeoGrid()

MTKt_status MtkCreateGeoGrid ( double  ulc_lat_dd,
double  ulc_lon_dd,
double  lrc_lat_dd,
double  lrc_lon_dd,
double  lat_cellsize_dd,
double  lon_cellsize_dd,
MTKt_DataBuffer latbuf,
MTKt_DataBuffer lonbuf 
)

Creates a regularly spaced geographic 2-D grid consisting of a latitude buffer and a longitude buffer in decimal degrees, given upper left and lower right latitude/longitude coordinates and latitude/longitude cell size.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we create a regularly spaced geographic 2-D grid of lat/lon spanning the upper left latitude 40.0, longitude -120.0 and lower right latitude 30.0, longitude -110.0 with a cell size of 0.25 degrees in both lat/lon.
status = MtkCreateGeoGrid(40.0, -120.0, 30.0, -110.0, 0.25, 0.25, &latbuf, &lonbuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by latbuf and lonbuf
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
[in]lat_cellsize_ddLatitude cell size in decimal degrees
[in]lon_cellsize_ddLongitude cell size in decimal degrees
[out]latbufLatitude data buffer
[out]lonbufLongitue data buffer

Definition at line 36 of file MtkCreateGeoGrid.c.

◆ MtkResampleCubicConvolution()

MTKt_status MtkResampleCubicConvolution ( const MTKt_DataBuffer Source,
const MTKt_DataBuffer Source_mask,
const MTKt_DataBuffer Line,
const MTKt_DataBuffer Sample,
float  A,
MTKt_DataBuffer Resampled,
MTKt_DataBuffer Resampled_mask 
)

Resample source data at the given coordinates using interpolation by cubic convolution.

Convolution kernel used in this module is described in [1]

Returns
MTK_SUCCESS if successful.
Example:
In this example we resample source with source_mask and coordinates in line and sample using cubic convolution. Resampled output is in resampled and resampled_mask.
status = MtkResampleCubicConvolution(&source, &source_mask, &line, &sample, a, &resampled, &resampled_mask);
Note

References:

[1] Keys, "Cubic Convolution Interpolation for Digital Image Processing", IEEE Transactions on Acoustics, Speech, and Signal Processing, Vol. ASSP-29, NO. 6, December 1981.

Parameters
[in]SourceSource data. (float)
[in]Source_maskValid mask for source data. (uint8)
[in]LineLine coordinates. (float)
[in]SampleSample coordinates. (float)
[in]AConvolution parameter (-1.0 <= A <= 0.0)
[out]ResampledResampled data. (float)
[out]Resampled_maskValid mask for resampled data

Definition at line 51 of file MtkResampleCubicConvolution.c.

◆ MtkResampleNearestNeighbor()

MTKt_status MtkResampleNearestNeighbor ( MTKt_DataBuffer  srcbuf,
MTKt_DataBuffer  linebuf,
MTKt_DataBuffer  samplebuf,
MTKt_DataBuffer resampbuf 
)

Perform nearest neighbor resampling.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we resample the srcbuf using nearest neighbor resampling based on linebuf and samplebuf. The result is resampbuf.
status = MtkResampleNearestNeighbor(srcbuf, linebuf, samplebuf, &resampbuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by resampbuf.
Parameters
[in]srcbufSource data buffer
[in]linebufLine data buffer
[in]samplebufSample data buffer
[out]resampbufResampled data buffer

Definition at line 38 of file MtkResampleNearestNeighbor.c.

◆ MtkTransformCoordinates()

MTKt_status MtkTransformCoordinates ( MTKt_MapInfo  mapinfo,
MTKt_DataBuffer  latbuf,
MTKt_DataBuffer  lonbuf,
MTKt_DataBuffer linebuf,
MTKt_DataBuffer samplebuf 
)

Transforms latitude/longitude coordinates into line/sample coordinates for a given mapinfo.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we tranform latitude and longitude 2-D grid into line and sample represented by the given mapinfo.
status = MtkTransformCoordinates(mapinfo, latbuf, latbuf, &linebuf, &samplebuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by linebuf and samplebuf
Parameters
[in]mapinfoMapinfo structure
[in]latbufLatitude data buffer
[in]lonbufLongitue data buffer
[out]linebufLine data buffer
[out]samplebufSample data buffer

Definition at line 36 of file MtkTransformCoordinates.c.


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