50 int (*inv_trans[1000])();
53 double rad2deg = 180.0 / acos(-1);
61 if (Map_info == NULL) {
75 if (Proj_info == NULL) {
83 if (Latitude == NULL) {
91 if (Longitude == NULL) {
114 printf(
"iflg = %d\n",iflg);
122 for (iline = 0 ; iline < Map_info->
size_line ; iline++) {
123 for (isample = 0 ; isample < Map_info->
size_sample ; isample++) {
132 line = (((iline - Map_info->
tline[2]) * Map_info->
tline[3]) -
134 sample = (((isample - Map_info->
tsample[2]) * Map_info->
tsample[3]) -
166 inv_trans[Proj_info->
proj_code](x, y, &lon, &lat);
172 latitude_tmp.
data.
d[iline][isample] = lat * rad2deg;
173 longitude_tmp.
data.
d[iline][isample] = lon * rad2deg;
186 *Latitude = latitude_tmp;
187 *Longitude = longitude_tmp;
MTKt_status MtkDataBufferAllocate(int nline, int nsample, MTKt_DataType datatype, MTKt_DataBuffer *databuf)
Allocate Data Buffer.
MTKt_OriginCode origin_code
GCTP projection information.
#define MTK_ERR_CODE_JUMP(code)
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...
2-dimensional Data Buffer
#define MTKT_DATABUFFER_INIT
MTKt_status MtkDataBufferFree(MTKt_DataBuffer *databuf)
Free data buffer.
#define MTK_ERR_CODE_MSG_JUMP(code, msg)
#define MTK_ERR_COND_JUMP(code)
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 *))