7 MODFILE *
const geo_file,
184 #define BANDS (long)(MAX_BAND_NUMBER+1)
189 char data_type[DATATYPELENMAX];
197 "frame sample time"},
204 "frame sample time"},
211 uint32 dim_index[] = {0,1};
212 char msgbuf[PGS_SMF_MAX_MSGBUF_SIZE];
213 char filefunc[] = __FILE__
", GEO_write_parameters";
218 sprintf(msgbuf,
"parameter=%p, geo_file=%p",
226 for(obj=0; obj<(
int)(
sizeof(SDS_object)/
sizeof(SDS_object[0]))
229 if(createMODISarray(geo_file, SDS_object[obj].
name,
PARM_GRP,
230 SDS_object[obj].data_type, SDS_object[obj].
rank,
231 SDS_object[obj].dimensions) !=MAPIOK)
234 sprintf(msgbuf,
"createMODISarray(\"%s\", \"" PARM_GRP
235 "\", \"%s\", %ld)", SDS_object[obj].
name, SDS_object[obj].data_type,
236 SDS_object[obj].
rank);
240 else if( putMODISdimname(geo_file, SDS_object[obj].
name,
PARM_GRP, 0,
244 sprintf(msgbuf,
"putMODISdimname(\"%s\", \"%s\", \"" PARM_GRP
246 geo_file->filename, SDS_object[obj].name);
250 SDS_object[obj].dimensions, (
char *)
parameter+SDS_object[obj].
data)
254 sprintf(msgbuf,
"putMODISarray(\"%s\", \"%s\", \"" PARM_GRP "\")",
255 geo_file->filename, SDS_object[obj].name);
260 if(putMODISarinfo(geo_file, SDS_object[obj].
name,
PARM_GRP, MUNITS,
261 TXT, (
long)strlen(SDS_object[obj].
units), SDS_object[obj].
units)
265 sprintf(msgbuf,
"putMODISarinfo(\"%s\", \"%s\", \"" PARM_GRP
266 "\", \"" MUNITS
"\", \"" TXT
"\", %ld, \"%s\")",
267 geo_file->filename, SDS_object[obj].name,
268 (
long)strlen(SDS_object[obj].
units), SDS_object[obj].
units);
275 &
parameter->geometry_params.band_number) != MAPIOK)
279 "putMODISfileinfo(\"%s\", \"" BAND_NUMBER "\", \"" I16
"\", 1, %d)",
280 geo_file->filename, (
int)
parameter->geometry_params.band_number);
285 1
L, &dim_index[0]) != MAPIOK)
289 "\", \"" UI32
"\", 1, %lu)", geo_file->filename,
290 (
unsigned long)dim_index[0]);
295 1
L, &dim_index[1]) != MAPIOK)
299 "\", \"" UI32
"\", 1, %lu)",
300 geo_file->filename, (
unsigned long)dim_index[1]);