Line data Source code
1 : /******************************************************************************
2 : *
3 : * Purpose: Implementation of the CPCIDSKToutinModelSegment class.
4 : *
5 : ******************************************************************************
6 : * Copyright (c) 2009
7 : * PCI Geomatics, 90 Allstate Parkway, Markham, Ontario, Canada.
8 : *
9 : * SPDX-License-Identifier: MIT
10 : ****************************************************************************/
11 :
12 : #include "segment/cpcidsksegment.h"
13 : #include "core/pcidsk_utils.h"
14 : #include "segment/cpcidsktoutinmodel.h"
15 : #include "pcidsk_exception.h"
16 : #include "core/pcidsk_utils.h"
17 :
18 : #include <vector>
19 : #include <string>
20 : #include <cassert>
21 : #include <cstring>
22 : #include <memory>
23 :
24 : using namespace PCIDSK;
25 :
26 0 : CPCIDSKToutinModelSegment::CPCIDSKToutinModelSegment(PCIDSKFile *fileIn,
27 : int segmentIn,
28 0 : const char *segment_pointer) :
29 0 : CPCIDSKEphemerisSegment(fileIn, segmentIn, segment_pointer,false)
30 : {
31 0 : loaded_ = false;
32 0 : mbModified = false;
33 0 : mpoInfo = nullptr;
34 0 : Load();
35 0 : }
36 :
37 :
38 0 : CPCIDSKToutinModelSegment::~CPCIDSKToutinModelSegment()
39 : {
40 0 : delete mpoInfo;
41 0 : }
42 :
43 : /**
44 : * Get the SRITInfo_t structure from read from the segment.
45 : * @return the Toutin information structure.
46 : */
47 0 : SRITInfo_t CPCIDSKToutinModelSegment::GetInfo() const
48 : {
49 0 : if (!mpoInfo)
50 : {
51 0 : const_cast<CPCIDSKToutinModelSegment *>(this)->Load();
52 :
53 0 : if (!mpoInfo)
54 : {
55 0 : ThrowPCIDSKException("Unable to load toutin segment.");
56 0 : return SRITInfo_t();
57 : }
58 : }
59 :
60 0 : return (*mpoInfo);
61 : }
62 :
63 : /**
64 : * Set the toutin information in the segment. The segment will be tag
65 : * as modified and will be synchronize on disk with the next call to
66 : * the function synchronize.
67 : * @param oInfo the toutin information.
68 : */
69 0 : void CPCIDSKToutinModelSegment::SetInfo(const SRITInfo_t& oInfo)
70 : {
71 0 : if(&oInfo == mpoInfo)
72 : {
73 0 : return ;
74 : }
75 0 : if(mpoInfo)
76 : {
77 0 : delete mpoInfo;
78 : }
79 :
80 0 : mpoInfo = new SRITInfo_t(oInfo);
81 0 : mbModified = true;
82 : }
83 :
84 : /**
85 : * Load the contents of the segment
86 : */
87 0 : void CPCIDSKToutinModelSegment::Load()
88 : {
89 : // Check if we've already loaded the segment into memory
90 0 : if (loaded_) {
91 0 : return;
92 : }
93 :
94 0 : seg_data.SetSize((int)data_size - 1024);
95 :
96 0 : ReadFromFile(seg_data.buffer, 0, data_size - 1024);
97 :
98 0 : if(seg_data.buffer_size == 0)
99 : {
100 0 : return;
101 : }
102 :
103 0 : SRITInfo_t* poInfo = BinaryToSRITInfo();
104 :
105 0 : mpoInfo = poInfo;
106 :
107 : // We've now loaded the structure up with data. Mark it as being loaded
108 : // properly.
109 0 : loaded_ = true;
110 : }
111 :
112 : /**
113 : * Write the segment on disk
114 : */
115 0 : void CPCIDSKToutinModelSegment::Write(void)
116 : {
117 : //We are not writing if nothing was loaded.
118 0 : if (!loaded_) {
119 0 : return;
120 : }
121 :
122 0 : SRITInfoToBinary(mpoInfo);
123 :
124 0 : WriteToFile(seg_data.buffer,0,seg_data.buffer_size);
125 :
126 0 : mbModified = false;
127 : }
128 :
129 : /**
130 : * Synchronize the segment, if it was modified then
131 : * write it into disk.
132 : */
133 0 : void CPCIDSKToutinModelSegment::Synchronize()
134 : {
135 0 : if(mbModified)
136 : {
137 0 : this->Write();
138 : }
139 0 : }
140 :
141 : /************************************************************************/
142 : /* BinaryToSRITInfo() */
143 : /************************************************************************/
144 : /**
145 : * Translate a block of binary data into a SRIT segment. the caller is
146 : * responsible to free the returned memory with delete.
147 : *
148 : * @return Rational Satellite Model structure.
149 : */
150 : SRITInfo_t *
151 0 : CPCIDSKToutinModelSegment::BinaryToSRITInfo()
152 : {
153 : int i,j,k,l;
154 : bool bVersion9;
155 :
156 : /* -------------------------------------------------------------------- */
157 : /* Read the header block */
158 : /* -------------------------------------------------------------------- */
159 : // We test the name of the binary segment before starting to read
160 : // the buffer.
161 0 : if (!STARTS_WITH(seg_data.buffer, "MODEL "))
162 : {
163 0 : seg_data.Put("MODEL ",0,8);
164 0 : return nullptr;
165 : // Something has gone terribly wrong!
166 : /*throw PCIDSKException("A segment that was previously "
167 : "identified as an RFMODEL "
168 : "segment does not contain the appropriate data. Found: [%s]",
169 : std::string(seg_data.buffer, 8).c_str());*/
170 : }
171 :
172 0 : bVersion9 = false;
173 0 : int nVersion = seg_data.GetInt(8,1);
174 0 : if (nVersion == 9)
175 : {
176 0 : bVersion9 = true;
177 : }
178 :
179 : /* -------------------------------------------------------------------- */
180 : /* Allocate the SRITModel. */
181 : /* -------------------------------------------------------------------- */
182 0 : std::unique_ptr<SRITInfo_t> SRITModel( new SRITInfo_t());
183 :
184 0 : SRITModel->GCPMeanHtFlag = 0;
185 0 : SRITModel->nDownSample = 1;
186 0 : if(STARTS_WITH(seg_data.Get(22,2) , "DS"))
187 : {
188 0 : SRITModel->nDownSample = seg_data.GetInt(24,3);
189 : }
190 :
191 : /* -------------------------------------------------------------------- */
192 : /* Read the Block 1 */
193 : /* -------------------------------------------------------------------- */
194 :
195 0 : SRITModel->N0x2 = seg_data.GetDouble(512,22);
196 0 : SRITModel->aa = seg_data.GetDouble(512+22,22);
197 0 : SRITModel->SmALPHA = seg_data.GetDouble(512+44,22);
198 0 : SRITModel->bb = seg_data.GetDouble(512+66,22);
199 0 : SRITModel->C0 = seg_data.GetDouble(512+88,22);
200 0 : SRITModel->cc = seg_data.GetDouble(512+110,22);
201 0 : SRITModel->COS_KHI = seg_data.GetDouble(512+132,22);
202 0 : SRITModel->DELTA_GAMMA = seg_data.GetDouble(512+154,22);
203 0 : SRITModel->GAMMA = seg_data.GetDouble(512+176,22);
204 0 : SRITModel->K_1 = seg_data.GetDouble(512+198,22);
205 0 : SRITModel->L0 = seg_data.GetDouble(512+220,22);
206 0 : SRITModel->P = seg_data.GetDouble(512+242,22);
207 0 : SRITModel->Q = seg_data.GetDouble(512+264,22);
208 0 : SRITModel->TAU = seg_data.GetDouble(512+286,22);
209 0 : SRITModel->THETA = seg_data.GetDouble(512+308,22);
210 0 : SRITModel->THETA_SEC = seg_data.GetDouble(512+330,22);
211 0 : SRITModel->X0 = seg_data.GetDouble(512+352,22);
212 0 : SRITModel->Y0 = seg_data.GetDouble(512+374,22);
213 0 : SRITModel->delh = seg_data.GetDouble(512+396,22);
214 0 : SRITModel->COEF_Y2 = seg_data.GetDouble(512+418,22);
215 :
216 0 : if (bVersion9)
217 : {
218 0 : SRITModel->delT = seg_data.GetDouble(512+440,22);
219 0 : SRITModel->delL = seg_data.GetDouble(512+462,22);
220 0 : SRITModel->delTau = seg_data.GetDouble(512+484,22);
221 : }
222 : else
223 : {
224 0 : SRITModel->delT = 0.0;
225 0 : SRITModel->delL = 0.0;
226 0 : SRITModel->delTau = 0.0;
227 : }
228 :
229 : /* -------------------------------------------------------------------- */
230 : /* Read the GCP information in Block 2 */
231 : /* -------------------------------------------------------------------- */
232 :
233 0 : SRITModel->nGCPCount = seg_data.GetInt(2*512,10);
234 0 : if (SRITModel->nGCPCount > 256) SRITModel->nGCPCount = 256;
235 0 : SRITModel->nEphemerisSegNo = seg_data.GetInt(2*512+10,10);
236 0 : SRITModel->nAttitudeFlag = seg_data.GetInt(2*512+20,10);
237 0 : SRITModel->GCPUnit = seg_data.Get(2*512+30,16);
238 :
239 0 : SRITModel->dfGCPMeanHt = seg_data.GetDouble(2*512+50,22);
240 0 : SRITModel->dfGCPMinHt = seg_data.GetDouble(2*512+72,22);
241 0 : SRITModel->dfGCPMaxHt = seg_data.GetDouble(2*512+94,22);
242 :
243 : /* -------------------------------------------------------------------- */
244 : /* Initialize a simple GeoTransform. */
245 : /* -------------------------------------------------------------------- */
246 :
247 0 : SRITModel->utmunit = seg_data.Get(2*512+225,16);
248 :
249 0 : if (std::strcmp(seg_data.Get(2*512+245,8),"ProjInfo")==0)
250 : {
251 0 : SRITModel->oProjectionInfo = seg_data.Get(2*512+255,256);
252 : }
253 :
254 : /* -------------------------------------------------------------------- */
255 : /* Read the GCPs */
256 : /* -------------------------------------------------------------------- */
257 0 : l = 0;
258 0 : k = 4;
259 0 : for (j=0; j<SRITModel->nGCPCount; j++)
260 : {
261 0 : SRITModel->nGCPIds[j] =
262 0 : seg_data.GetInt((k-1)*512+10*l,5);
263 0 : SRITModel->nPixel[j] =
264 0 : seg_data.GetInt((k-1)*512+10*(l+1),5);
265 0 : SRITModel->nLine[j] =
266 0 : seg_data.GetInt((k-1)*512+10*(l+1)+5,5);
267 0 : SRITModel->dfElev[j] =
268 0 : seg_data.GetInt((k-1)*512+10*(l+2),10);
269 0 : l+=3;
270 :
271 0 : if (l<50)
272 0 : continue;
273 :
274 0 : k++;
275 0 : l = 0;
276 : }
277 :
278 : /* -------------------------------------------------------------------- */
279 : /* Call BinaryToEphemeris to get the orbital data */
280 : /* -------------------------------------------------------------------- */
281 0 : SRITModel->OrbitPtr =
282 0 : BinaryToEphemeris( 512*21 );
283 :
284 : /* -------------------------------------------------------------------- */
285 : /* Pass the sensor back to SRITModel */
286 : /* -------------------------------------------------------------------- */
287 0 : SRITModel->Sensor = SRITModel->OrbitPtr->SatelliteSensor;
288 :
289 : /* -------------------------------------------------------------------- */
290 : /* Assign nSensor value */
291 : /* -------------------------------------------------------------------- */
292 :
293 0 : SRITModel->nSensor = GetSensor (SRITModel->OrbitPtr);
294 0 : SRITModel->nModel = GetModel (SRITModel->nSensor);
295 :
296 0 : if( SRITModel->nSensor == -999)
297 : {
298 0 : return (SRITInfo_t*)ThrowPCIDSKExceptionPtr("Invalid Sensor : %s.",
299 0 : SRITModel->OrbitPtr->SatelliteSensor.c_str());
300 : }
301 0 : if( SRITModel->nModel == -999)
302 : {
303 0 : return (SRITInfo_t*)ThrowPCIDSKExceptionPtr("Invalid Model from sensor number: %d.",
304 0 : SRITModel->nSensor);
305 : }
306 :
307 : /* -------------------------------------------------------------------- */
308 : /* Get the attitude data for SPOT */
309 : /* -------------------------------------------------------------------- */
310 0 : if (SRITModel->OrbitPtr->AttitudeSeg != nullptr ||
311 0 : SRITModel->OrbitPtr->RadarSeg != nullptr)
312 : {
313 : AttitudeSeg_t *attitudeSeg
314 0 : = SRITModel->OrbitPtr->AttitudeSeg;
315 :
316 0 : if (SRITModel->OrbitPtr->Type == OrbAttitude &&
317 : attitudeSeg != nullptr)
318 : {
319 : int ndata;
320 :
321 0 : ndata = attitudeSeg->NumberOfLine;
322 :
323 0 : for (i=0; i<ndata; i++)
324 : {
325 0 : SRITModel->Hdeltat.push_back(
326 0 : attitudeSeg->Line[i].ChangeInAttitude);
327 0 : SRITModel->Qdeltar.push_back(
328 0 : attitudeSeg->Line[i].ChangeEarthSatelliteDist);
329 : }
330 : }
331 : }
332 : else
333 : {
334 0 : SRITModel->Qdeltar.clear();
335 0 : SRITModel->Hdeltat.clear();
336 : }
337 :
338 0 : return SRITModel.release();
339 : }
340 :
341 : /************************************************************************/
342 : /* SRITInfoToBinary() */
343 : /************************************************************************/
344 : /**
345 : * Translate a SRITInfo_t into binary data.
346 : * Translate a SRITInfo_t into the corresponding block of
347 : * binary data. This function is expected to be used by
348 : * translators such as iisopen.c (VISTA) so that our satellite
349 : * models can be converted into some opaque serialized form.
350 : * Translate a Rpc Model into the corresponding block of binary data.
351 : *
352 : * @param SRITModel Satellite Model structure.
353 : */
354 : void
355 0 : CPCIDSKToutinModelSegment::SRITInfoToBinary( SRITInfo_t *SRITModel )
356 :
357 : {
358 : int i,j,k,l;
359 : double dfminht,dfmaxht,dfmeanht;
360 0 : int nPos = 0;
361 :
362 : /* -------------------------------------------------------------------- */
363 : /* Create the data array. */
364 : /* -------------------------------------------------------------------- */
365 0 : seg_data.SetSize(512 * 21);
366 :
367 : //clean the buffer
368 0 : memset( seg_data.buffer , ' ', 512 * 21 );
369 :
370 : /* -------------------------------------------------------------------- */
371 : /* Initialize the header. */
372 : /* -------------------------------------------------------------------- */
373 0 : nPos = 512*0;
374 0 : seg_data.Put("MODEL 9.0",0,nPos+11);
375 :
376 0 : seg_data.Put("DS",nPos+22,2);
377 0 : seg_data.Put(SRITModel->nDownSample,nPos+24,3);
378 :
379 : /* -------------------------------------------------------------------- */
380 : /* Write the model results to second segment */
381 : /* -------------------------------------------------------------------- */
382 0 : nPos = 512*1;
383 :
384 0 : seg_data.Put(SRITModel->N0x2,nPos,22,"%22.14f");
385 0 : seg_data.Put(SRITModel->aa,nPos+22,22,"%22.14f");
386 0 : seg_data.Put(SRITModel->SmALPHA,nPos+22*2,22,"%22.14f");
387 0 : seg_data.Put(SRITModel->bb,nPos+22*3,22,"%22.14f");
388 0 : seg_data.Put(SRITModel->C0,nPos+22*4,22,"%22.14f");
389 0 : seg_data.Put(SRITModel->cc,nPos+22*5,22,"%22.14f");
390 0 : seg_data.Put(SRITModel->COS_KHI,nPos+22*6,22,"%22.14f");
391 0 : seg_data.Put(SRITModel->DELTA_GAMMA,nPos+22*7,22,"%22.14f");
392 0 : seg_data.Put(SRITModel->GAMMA,nPos+22*8,22,"%22.14f");
393 0 : seg_data.Put(SRITModel->K_1,nPos+22*9,22,"%22.14f");
394 0 : seg_data.Put(SRITModel->L0,nPos+22*10,22,"%22.14f");
395 0 : seg_data.Put(SRITModel->P,nPos+22*11,22,"%22.14f");
396 0 : seg_data.Put(SRITModel->Q,nPos+22*12,22,"%22.14f");
397 0 : seg_data.Put(SRITModel->TAU,nPos+22*13,22,"%22.14f");
398 0 : seg_data.Put(SRITModel->THETA,nPos+22*14,22,"%22.14f");
399 0 : seg_data.Put(SRITModel->THETA_SEC,nPos+22*15,22,"%22.14f");
400 0 : seg_data.Put(SRITModel->X0,nPos+22*16,22,"%22.14f");
401 0 : seg_data.Put(SRITModel->Y0,nPos+22*17,22,"%22.14f");
402 0 : seg_data.Put(SRITModel->delh,nPos+22*18,22,"%22.14f");
403 0 : seg_data.Put(SRITModel->COEF_Y2,nPos+22*19,22,"%22.14f");
404 0 : seg_data.Put(SRITModel->delT,nPos+22*20,22,"%22.14f");
405 0 : seg_data.Put(SRITModel->delL,nPos+22*21,22,"%22.14f");
406 0 : seg_data.Put(SRITModel->delTau,nPos+22*22,22,"%22.14f");
407 :
408 : /* -------------------------------------------------------------------- */
409 : /* Find the min and max height */
410 : /* -------------------------------------------------------------------- */
411 0 : nPos = 2*512;
412 :
413 0 : if (SRITModel->nGCPCount > 256) SRITModel->nGCPCount = 256;
414 0 : if (SRITModel->nGCPCount != 0)
415 : {
416 0 : dfminht = 1.e38;
417 0 : dfmaxht = -1.e38;
418 0 : for (i=0; i<SRITModel->nGCPCount; i++)
419 : {
420 0 : if (SRITModel->dfElev[i] > dfmaxht)
421 0 : dfmaxht = SRITModel->dfElev[i];
422 0 : if (SRITModel->dfElev[i] < dfminht)
423 0 : dfminht = SRITModel->dfElev[i];
424 : }
425 : }
426 : else
427 : {
428 0 : dfminht = SRITModel->dfGCPMinHt;
429 0 : dfmaxht = 0;
430 : }
431 :
432 0 : dfmeanht = (dfminht + dfmaxht)/2.;
433 :
434 0 : seg_data.Put(SRITModel->nGCPCount,nPos,10);
435 0 : seg_data.Put("2",nPos+10,1);
436 0 : seg_data.Put("0",nPos+20,1);
437 :
438 0 : if (SRITModel->OrbitPtr->AttitudeSeg != nullptr ||
439 0 : SRITModel->OrbitPtr->RadarSeg != nullptr ||
440 0 : SRITModel->OrbitPtr->AvhrrSeg != nullptr )
441 : {
442 0 : if (SRITModel->OrbitPtr->Type == OrbAttitude &&
443 0 : SRITModel->OrbitPtr->AttitudeSeg != nullptr)
444 : {
445 0 : if (SRITModel->OrbitPtr->AttitudeSeg->NumberOfLine != 0)
446 0 : seg_data.Put("3",nPos+20,1);
447 : }
448 : }
449 :
450 0 : seg_data.Put(SRITModel->GCPUnit.c_str(),nPos+30,16);
451 0 : seg_data.Put("M",nPos+49,1);
452 :
453 0 : seg_data.Put(dfmeanht,nPos+50,22,"%22.14f");
454 0 : seg_data.Put(dfminht,nPos+72,22,"%22.14f");
455 0 : seg_data.Put(dfmaxht,nPos+94,22,"%22.14f");
456 :
457 0 : seg_data.Put("NEWGCP",nPos+116,6);
458 :
459 : /* -------------------------------------------------------------------- */
460 : /* Write the projection parameter if necessary */
461 : /* -------------------------------------------------------------------- */
462 :
463 0 : seg_data.Put(SRITModel->utmunit.c_str(),nPos+225,16);
464 :
465 0 : if(!SRITModel->oProjectionInfo.empty())
466 : {
467 0 : seg_data.Put("ProjInfo: ",nPos+245,10);
468 0 : seg_data.Put(SRITModel->oProjectionInfo.c_str(),
469 : nPos+255,256);
470 : }
471 :
472 : /* -------------------------------------------------------------------- */
473 : /* Write the GCP to third segment */
474 : /* -------------------------------------------------------------------- */
475 0 : nPos = 3*512;
476 :
477 0 : l = 0;
478 0 : k = 3;
479 0 : if (SRITModel->nGCPCount > 256) SRITModel->nGCPCount = 256;
480 0 : for (j=0; j<SRITModel->nGCPCount; j++)
481 : {
482 0 : if (j > 255)
483 0 : break;
484 :
485 0 : seg_data.Put(SRITModel->nGCPIds[j],nPos+10*l,5);
486 0 : seg_data.Put((int)(SRITModel->nPixel[j]+0.5),
487 0 : nPos+10*(l+1),5);
488 0 : seg_data.Put((int)(SRITModel->nLine[j]+0.5),
489 0 : nPos+10*(l+1)+5,5);
490 0 : seg_data.Put((int)SRITModel->dfElev[j],nPos+10*(l+2),10);
491 :
492 0 : l+=3;
493 :
494 0 : if (l<50)
495 0 : continue;
496 :
497 0 : k++;
498 0 : nPos = 512*k;
499 0 : l = 0;
500 : }
501 :
502 : /* -------------------------------------------------------------------- */
503 : /* Add the serialized form of the EphemerisSeg_t. */
504 : /* -------------------------------------------------------------------- */
505 0 : EphemerisToBinary( SRITModel->OrbitPtr , 512*21 );
506 0 : }
507 :
508 : /**
509 : * Get the sensor enum from the orbit segment.
510 : * @param OrbitPtr the orbit segment
511 : * @return the sensor type.
512 : */
513 0 : int CPCIDSKToutinModelSegment::GetSensor( EphemerisSeg_t *OrbitPtr)
514 : {
515 : int nSensor;
516 :
517 0 : nSensor = -999;
518 :
519 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "AVHRR"))
520 0 : nSensor = AVHRR;
521 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PLA"))
522 0 : nSensor = PLA_1;
523 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MLA"))
524 0 : nSensor = MLA_1;
525 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ASTER"))
526 0 : nSensor = ASTER;
527 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SAR"))
528 : {
529 0 : nSensor = SAR;
530 0 : if (OrbitPtr->PixelRes == 6.25)
531 0 : nSensor = RSAT_FIN;
532 : }
533 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS"))
534 : {
535 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-1"))
536 0 : nSensor = LISS_1;
537 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-2"))
538 0 : nSensor = LISS_2;
539 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-3"))
540 0 : nSensor = LISS_3;
541 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-L3-L2"))
542 0 : nSensor = LISS_L3_L2;
543 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-L3"))
544 0 : nSensor = LISS_L3;
545 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-L4-L2"))
546 0 : nSensor = LISS_L4_L2;
547 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-L4"))
548 0 : nSensor = LISS_L4;
549 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-P3-L2"))
550 0 : nSensor = LISS_P3_L2;
551 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-P3"))
552 0 : nSensor = LISS_P3;
553 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-W3-L2"))
554 0 : nSensor = LISS_W3_L2;
555 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-W3"))
556 0 : nSensor = LISS_W3;
557 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-M3"))
558 0 : nSensor = LISS_M3;
559 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-AWF-L2"))
560 0 : nSensor = LISS_AWF_L2;
561 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "LISS-AWF"))
562 0 : nSensor = LISS_AWF;
563 : }
564 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "EOC"))
565 0 : nSensor = EOC;
566 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "IRS"))
567 0 : nSensor = IRS_1;
568 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MSS"))
569 0 : nSensor = MSS;
570 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "TM"))
571 : {
572 0 : nSensor = TM;
573 0 : if (OrbitPtr->PixelRes == 15)
574 0 : nSensor = ETM;
575 : }
576 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ETM"))
577 0 : nSensor = ETM;
578 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "IKO"))
579 : {
580 0 : nSensor = IKO_PAN;
581 0 : if (OrbitPtr->PixelRes == 4)
582 0 : nSensor = IKO_MULTI;
583 : }
584 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ORBVIEW"))
585 : {
586 0 : nSensor = ORBVIEW_PAN;
587 0 : if (OrbitPtr->PixelRes == 4)
588 0 : nSensor = ORBVIEW_MULTI;
589 : }
590 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "OV"))
591 : {
592 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "OV3_PAN_BASIC"))
593 0 : nSensor = OV3_PAN_BASIC;
594 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "OV3_PAN_GEO"))
595 0 : nSensor = OV3_PAN_GEO;
596 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "OV3_MULTI_BASIC"))
597 0 : nSensor = OV3_MULTI_BASIC;
598 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "OV3_MULTI_GEO"))
599 0 : nSensor = OV3_MULTI_GEO;
600 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "OV5_PAN_BASIC"))
601 0 : nSensor = OV5_PAN_BASIC;
602 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "OV5_PAN_GEO"))
603 0 : nSensor = OV5_PAN_GEO;
604 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "OV5_MULTI_BASIC"))
605 0 : nSensor = OV5_MULTI_BASIC;
606 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "OV5_MULTI_GEO"))
607 0 : nSensor = OV5_MULTI_GEO;
608 : }
609 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "QBIRD"))
610 : {
611 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "QBIRD_PAN_STD"))
612 0 : nSensor = QBIRD_PAN_STD; // this checking must go first
613 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "QBIRD_PAN_STH"))
614 0 : nSensor = QBIRD_PAN_STH;
615 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "QBIRD_PAN"))
616 0 : nSensor = QBIRD_PAN;
617 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "QBIRD_MULTI_STD"))
618 0 : nSensor = QBIRD_MULTI_STD; // this checking must go first
619 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "QBIRD_MULTI_STH"))
620 0 : nSensor = QBIRD_MULTI_STH;
621 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "QBIRD_MULTI"))
622 0 : nSensor = QBIRD_MULTI;
623 : }
624 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "WVIEW"))
625 : {
626 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "WVIEW1_PAN_STD") ||
627 0 : STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "WVIEW_PAN_STD"))
628 0 : nSensor = WVIEW_PAN_STD; // this checking must go first
629 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "WVIEW1_PAN") ||
630 0 : STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "WVIEW_PAN"))
631 0 : nSensor = WVIEW_PAN;
632 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "WVIEW_MULTI_STD"))
633 0 : nSensor = WVIEW_MULTI_STD;
634 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "WVIEW_MULTI"))
635 0 : nSensor = WVIEW_MULTI;
636 : }
637 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GEOEYE"))
638 : {
639 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GEOEYE_PAN_STD"))
640 0 : nSensor = GEOEYE_PAN_STD; // this checking must go first
641 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GEOEYE_PAN"))
642 0 : nSensor = GEOEYE_PAN;
643 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GEOEYE_MULTI_STD"))
644 0 : nSensor = GEOEYE_MULTI_STD; // this checking must go first
645 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GEOEYE_MULTI"))
646 0 : nSensor = GEOEYE_MULTI;
647 : }
648 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "FORMOSAT"))
649 : {
650 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "FORMOSAT_PAN_L2"))
651 0 : nSensor = FORMOSAT_PAN_L2;
652 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "FORMOSAT_MULTIL2"))
653 0 : nSensor = FORMOSAT_MULTIL2;
654 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "FORMOSAT_PAN"))
655 0 : nSensor = FORMOSAT_PAN;
656 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "FORMOSAT_MULTI"))
657 0 : nSensor = FORMOSAT_MULTI;
658 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "FORMOSAT5_PAN"))
659 0 : nSensor = FORMOSAT5_PAN;
660 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "FORMOSAT5_MS"))
661 0 : nSensor = FORMOSAT5_MS;
662 : }
663 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT"))
664 : {
665 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT5_PAN_2_5"))
666 0 : nSensor = SPOT5_PAN_2_5;
667 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT5_PAN_5"))
668 0 : nSensor = SPOT5_PAN_5;
669 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT5_HRS"))
670 0 : nSensor = SPOT5_HRS;
671 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT5_MULTI"))
672 0 : nSensor = SPOT5_MULTI;
673 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT1_PAN"))
674 0 : nSensor = SPOT1_PAN;
675 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT1_MS"))
676 0 : nSensor = SPOT1_MS;
677 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT2_PAN"))
678 0 : nSensor = SPOT2_PAN;
679 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT2_MS"))
680 0 : nSensor = SPOT2_MS;
681 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT3_PAN"))
682 0 : nSensor = SPOT3_PAN;
683 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT3_MS"))
684 0 : nSensor = SPOT3_MS;
685 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT4_PAN"))
686 0 : nSensor = SPOT4_PAN;
687 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT4_MS"))
688 0 : nSensor = SPOT4_MS;
689 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT6_PAN"))
690 0 : nSensor = SPOT6_PAN;
691 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT6_MS"))
692 0 : nSensor = SPOT6_MS;
693 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT6_PSH"))
694 0 : nSensor = SPOT6_PSH;
695 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT7_PAN"))
696 0 : nSensor = SPOT7_PAN;
697 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT7_MS"))
698 0 : nSensor = SPOT7_MS;
699 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SPOT7_PSH"))
700 0 : nSensor = SPOT7_PSH;
701 : }
702 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MERIS"))
703 : {
704 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MERIS_FR"))
705 0 : nSensor = MERIS_FR;
706 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MERIS_RR"))
707 0 : nSensor = MERIS_RR;
708 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MERIS_LR"))
709 0 : nSensor = MERIS_LR;
710 : }
711 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ASAR"))
712 0 : nSensor = ASAR;
713 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "EROS"))
714 0 : nSensor = EROS;
715 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MODIS"))
716 : {
717 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MODIS_1000"))
718 0 : nSensor = MODIS_1000;
719 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MODIS_500"))
720 0 : nSensor = MODIS_500;
721 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MODIS_250"))
722 0 : nSensor = MODIS_250;
723 : }
724 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS"))
725 : {
726 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_HRC_L2"))
727 0 : nSensor = CBERS_HRC_L2;
728 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_HRC"))
729 0 : nSensor = CBERS_HRC;
730 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_CCD_L2"))
731 0 : nSensor = CBERS_CCD_L2;
732 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_CCD"))
733 0 : nSensor = CBERS_CCD;
734 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_IRM_80_L2"))
735 0 : nSensor = CBERS_IRM_80_L2;
736 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_IRM_80"))
737 0 : nSensor = CBERS_IRM_80;
738 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_IRM_160_L2"))
739 0 : nSensor = CBERS_IRM_160_L2;
740 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_IRM_160"))
741 0 : nSensor = CBERS_IRM_160;
742 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_WFI_L2"))
743 0 : nSensor = CBERS_WFI_L2;
744 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS_WFI"))
745 0 : nSensor = CBERS_WFI;
746 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS4_PAN_1"))
747 0 : nSensor = CBERS4_PAN_1;
748 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS4_MS_1"))
749 0 : nSensor = CBERS4_MS_1;
750 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS4_PAN_2"))
751 0 : nSensor = CBERS4_PAN_2;
752 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS4_MS_2"))
753 0 : nSensor = CBERS4_MS_2;
754 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS4_THM_1"))
755 0 : nSensor = CBERS4_THM_1;
756 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CBERS4_THM_2"))
757 0 : nSensor = CBERS4_THM_2;
758 : }
759 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CARTOSAT"))
760 : {
761 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CARTOSAT1_L1"))
762 0 : nSensor = CARTOSAT1_L1;
763 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "CARTOSAT1_L2"))
764 0 : nSensor = CARTOSAT1_L2;
765 : }
766 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DMC"))
767 : {
768 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DMC_1R"))
769 0 : nSensor = DMC_1R;
770 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DMC_1T"))
771 0 : nSensor = DMC_1T;
772 : }
773 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALOS"))
774 : {
775 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALOS_PRISM_L1"))
776 0 : nSensor = ALOS_PRISM_L1;
777 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALOS_PRISM_L2"))
778 0 : nSensor = ALOS_PRISM_L2;
779 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALOS_AVNIR_L1"))
780 0 : nSensor = ALOS_AVNIR_L1;
781 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALOS_AVNIR_L2"))
782 0 : nSensor = ALOS_AVNIR_L2;
783 : }
784 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PALSAR"))
785 0 : nSensor = PALSAR;
786 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KOMPSAT"))
787 : {
788 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KOMPSAT2_PAN"))
789 0 : nSensor = KOMPSAT2_PAN;
790 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KOMPSAT2_MULTI"))
791 0 : nSensor = KOMPSAT2_MULTI;
792 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KOMPSAT3_PAN"))
793 0 : nSensor = KOMPSAT3_PAN;
794 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KOMPSAT3_PSH"))
795 0 : nSensor = KOMPSAT3_PSH;
796 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KOMPSAT3_MS"))
797 0 : nSensor = KOMPSAT3_MS;
798 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KOMPSAT3A_PAN"))
799 0 : nSensor = KOMPSAT3A_PAN;
800 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KOMPSAT3A_PSH"))
801 0 : nSensor = KOMPSAT3A_PSH;
802 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KOMPSAT3A_MS"))
803 0 : nSensor = KOMPSAT3A_MS;
804 : }
805 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "TERRASAR"))
806 0 : nSensor = TERRASAR;
807 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "RAPIDEYE"))
808 0 : nSensor = RAPIDEYE_L1B;
809 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "RESOURCESAT"))
810 0 : nSensor = RESOURCESAT;
811 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "THEOS"))
812 : {
813 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "THEOS_PAN_L1"))
814 0 : nSensor = THEOS_PAN_L1;
815 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "THEOS_PAN_L2"))
816 0 : nSensor = THEOS_PAN_L2;
817 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "THEOS_MS_L1"))
818 0 : nSensor = THEOS_MS_L1;
819 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "THEOS_MS_L2"))
820 0 : nSensor = THEOS_MS_L2;
821 : }
822 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GOSAT"))
823 : {
824 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GOSAT_500_L1"))
825 0 : nSensor = GOSAT_500_L1;
826 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GOSAT_500_L2"))
827 0 : nSensor = GOSAT_500_L2;
828 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GOSAT_1500_L1"))
829 0 : nSensor = GOSAT_1500_L1;
830 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GOSAT_1500_L2"))
831 0 : nSensor = GOSAT_1500_L2;
832 : }
833 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "HJ"))
834 : {
835 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "HJ_CCD_1A") ||
836 0 : STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "HJ1A"))
837 0 : nSensor = HJ_CCD_1A;
838 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "HJ_CC" /* "HJ_CCD_1B" */) ||
839 0 : STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "HJ1B"))
840 0 : nSensor = HJ_CCD_1B;
841 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "HJ1C"))
842 0 : nSensor = HJ1C;
843 : }
844 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "RASAT"))
845 : {
846 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "RASAT_PAN"))
847 0 : nSensor = RASAT_PAN;
848 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "RASAT_MS"))
849 0 : nSensor = RASAT_MS;
850 : }
851 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PLEIADES"))
852 : {
853 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PLEIADES_PAN_L1"))
854 0 : nSensor = PLEIADES_PAN_L1;
855 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PLEIADES_MS_L1"))
856 0 : nSensor = PLEIADES_MS_L1;
857 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PLEIADES_PAN_L2"))
858 0 : nSensor = PLEIADES_PAN_L2;
859 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PLEIADES_MS_L2"))
860 0 : nSensor = PLEIADES_MS_L2;
861 : }
862 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "TH01"))
863 : {
864 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "TH01_DGP"))
865 0 : nSensor = TH01_DGP;
866 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "TH01_GFB"))
867 0 : nSensor = TH01_GFB;
868 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "TH01_SXZ"))
869 0 : nSensor = TH01_SXZ;
870 : }
871 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ZY"))
872 : {
873 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ZY3_NAD"))
874 0 : nSensor = ZY3_NAD;
875 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ZY3_FWD"))
876 0 : nSensor = ZY3_FWD;
877 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ZY3_BWD"))
878 0 : nSensor = ZY3_BWD;
879 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ZY3_MUX"))
880 0 : nSensor = ZY3_MUX;
881 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ZY3_TLC"))
882 0 : nSensor = ZY3_TLC;
883 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ZY1_02C_HRC"))
884 0 : nSensor = ZY1_02C_HRC;
885 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ZY1_02C_PMS_PAN"))
886 0 : nSensor = ZY1_02C_PMS_PAN;
887 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ZY1_02C_PMS_MS"))
888 0 : nSensor = ZY1_02C_PMS_MS;
889 : }
890 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GK2"))
891 : {
892 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GK2_PAN"))
893 0 : nSensor = GK2_PAN;
894 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GK2_MS"))
895 0 : nSensor = GK2_MS;
896 : }
897 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MRC"))
898 : {
899 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MRC_RED"))
900 0 : nSensor = MRC_RED;
901 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MRC_GRN"))
902 0 : nSensor = MRC_GRN;
903 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MRC_BLU"))
904 0 : nSensor = MRC_BLU;
905 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MRC_NIR"))
906 0 : nSensor = MRC_NIR;
907 : }
908 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "HRC"))
909 0 : nSensor = HRC;
910 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF"))
911 : {
912 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF1_PMS_PAN"))
913 0 : nSensor = GF1_PMS_PAN;
914 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF2_PMS_PAN"))
915 0 : nSensor = GF2_PMS_PAN;
916 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF1_PMS_MS"))
917 0 : nSensor = GF1_PMS_MS;
918 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF1_WFV"))
919 0 : nSensor = GF1_WFV;
920 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF2_PMS_MS"))
921 0 : nSensor = GF2_PMS_MS;
922 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF4_PMS_MS"))
923 0 : nSensor = GF4_PMS_MS;
924 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF4_PMI_Thermal"))
925 0 : nSensor = GF4_PMI_Thermal;
926 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF6_PMS_PAN"))
927 0 : nSensor = GF6_PMS_PAN;
928 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GF6_PMS_MS"))
929 0 : nSensor = GF6_PMS_MS;
930 : }
931 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SJ9"))
932 : {
933 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SJ9_PAN"))
934 0 : nSensor = SJ9_PAN;
935 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SJ9_MUX"))
936 0 : nSensor = SJ9_MUX;
937 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SJ9_PMS_PAN"))
938 0 : nSensor = SJ9_PMS_PAN;
939 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SJ9_PMS_MS"))
940 0 : nSensor = SJ9_PMS_MS;
941 : }
942 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "YG2_1"))
943 0 : nSensor = YG2_1;
944 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "YG8_1"))
945 0 : nSensor = YG8_1;
946 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "YG14_1"))
947 0 : nSensor = YG14_1;
948 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "UAVSAR"))
949 0 : nSensor = UAVSAR;
950 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SSOT"))
951 : {
952 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SSOT_PAN_L1"))
953 0 : nSensor = SSOT_PAN_L1;
954 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SSOT_MS_L1"))
955 0 : nSensor = SSOT_MS_L1;
956 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SSOT_PAN_L2"))
957 0 : nSensor = SSOT_PAN_L2;
958 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SSOT_MS_L2"))
959 0 : nSensor = SSOT_MS_L2;
960 : }
961 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALSAT"))
962 : {
963 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALSAT2_PAN_1A"))
964 0 : nSensor = ALSAT2_PAN_1A;
965 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALSAT2_MS_1A"))
966 0 : nSensor = ALSAT2_MS_1A;
967 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALSAT2_PAN_2A"))
968 0 : nSensor = ALSAT2_PAN_2A;
969 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "ALSAT2_MS_2A"))
970 0 : nSensor = ALSAT2_MS_2A;
971 : }
972 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DUBAISAT"))
973 : {
974 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DUBAISAT2_PAN"))
975 0 : nSensor = DUBAISAT2_PAN;
976 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DUBAISAT2_MS"))
977 0 : nSensor = DUBAISAT2_MS;
978 : }
979 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KAZEOSAT"))
980 : {
981 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KAZEOSAT1_PAN_1A"))
982 0 : nSensor = KAZEOSAT1_PAN_1A;
983 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KAZEOSAT1_MS_1A"))
984 0 : nSensor = KAZEOSAT1_MS_1A;
985 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KAZEOSAT1_PAN_2A"))
986 0 : nSensor = KAZEOSAT1_PAN_2A;
987 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KAZEOSAT1_MS_2A"))
988 0 : nSensor = KAZEOSAT1_MS_2A;
989 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "KAZEOSAT2_MS_1G"))
990 0 : nSensor = KAZEOSAT2_MS_1G;
991 : }
992 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DEIMOS"))
993 : {
994 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DEIMOS1_MS_1R"))
995 0 : nSensor = DEIMOS1_MS_1R;
996 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DEIMOS2_PAN_1B"))
997 0 : nSensor = DEIMOS2_PAN_1B;
998 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DEIMOS2_MS_1B"))
999 0 : nSensor = DEIMOS2_MS_1B;
1000 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "DEIMOS2_PSH_1B"))
1001 0 : nSensor = DEIMOS2_PSH_1B;
1002 : }
1003 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "TRIPLESAT"))
1004 : {
1005 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "TRIPLESAT_PAN"))
1006 0 : nSensor = TRIPLESAT_PAN;
1007 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "TRIPLESAT_MS"))
1008 0 : nSensor = TRIPLESAT_MS;
1009 : }
1010 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PER_"))
1011 : {
1012 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PER_PAN_2A"))
1013 0 : nSensor = PER_PAN_2A;
1014 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "PER_MS_2A"))
1015 0 : nSensor = PER_MS_2A;
1016 : }
1017 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "JL"))
1018 : {
1019 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "JL101A_PAN"))
1020 0 : nSensor = JL101A_PAN;
1021 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "JL101A_MS"))
1022 0 : nSensor = JL101A_MS;
1023 : }
1024 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SV"))
1025 : {
1026 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SV1_PAN_L1"))
1027 0 : nSensor = SV1_PAN_L1;
1028 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SV1_MS_L1"))
1029 0 : nSensor = SV1_MS_L1;
1030 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SV1_PAN_L2"))
1031 0 : nSensor = SV1_PAN_L2;
1032 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "SV1_MS_L2"))
1033 0 : nSensor = SV1_MS_L2;
1034 : }
1035 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "GOKTURK1"))
1036 : {
1037 0 : if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "Gokturk1_PAN"))
1038 0 : nSensor = GOKTURK1_PAN;
1039 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "Gokturk1_MS"))
1040 0 : nSensor = GOKTURK1_MS;
1041 : }
1042 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "HI_RES"))
1043 0 : nSensor = HI_RES;
1044 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "MED_RES"))
1045 0 : nSensor = MED_RES;
1046 0 : else if (STARTS_WITH_CI(OrbitPtr->SatelliteSensor.c_str(), "NEW"))
1047 0 : nSensor = NEW;
1048 : else
1049 : {
1050 0 : return ThrowPCIDSKException(0, "Invalid Sensor %s",
1051 0 : OrbitPtr->SatelliteSensor.c_str());
1052 : }
1053 :
1054 0 : return (nSensor);
1055 : }
1056 : /**
1057 : * Get the model of a sensor
1058 : * @param nSensor the sensor
1059 : * @return the model
1060 : */
1061 0 : int CPCIDSKToutinModelSegment::GetModel( int nSensor )
1062 : {
1063 0 : int nModel = -999;
1064 :
1065 0 : switch (nSensor)
1066 : {
1067 0 : case PLA_1:
1068 : case PLA_2:
1069 : case PLA_3:
1070 : case PLA_4:
1071 : case MLA_1:
1072 : case MLA_2:
1073 : case MLA_3:
1074 : case MLA_4:
1075 : case SPOT1_PAN:
1076 : case SPOT1_MS:
1077 : case SPOT2_PAN:
1078 : case SPOT2_MS:
1079 : case SPOT3_PAN:
1080 : case SPOT3_MS:
1081 : case SPOT4_PAN:
1082 : case SPOT4_MS:
1083 : case NEW:
1084 0 : nModel = SRITModele;
1085 0 : break;
1086 :
1087 0 : case ASTER:
1088 : case CBERS_CCD:
1089 : case CBERS_IRM_80:
1090 : case CBERS_IRM_160:
1091 : case CBERS_WFI:
1092 : case IRS_1:
1093 : case LISS_AWF:
1094 : case LISS_1:
1095 : case LISS_2:
1096 : case LISS_3:
1097 : case LISS_L3:
1098 : case LISS_L4:
1099 : case LISS_P3:
1100 : case LISS_W3:
1101 : case LISS_M3:
1102 : case EOC:
1103 : case SPOT5_PAN_5:
1104 : case SPOT5_HRS:
1105 : case SPOT5_MULTI:
1106 : case MERIS_FR:
1107 : case MERIS_RR:
1108 : case MERIS_LR:
1109 : case MODIS_1000:
1110 : case MODIS_500:
1111 : case MODIS_250:
1112 : case ALOS_AVNIR_L1:
1113 : case ALOS_AVNIR_L2:
1114 : case RAPIDEYE_L1B:
1115 : case THEOS_PAN_L1:
1116 : case THEOS_MS_L1:
1117 : case GOSAT_500_L1:
1118 : case GOSAT_1500_L1:
1119 : case HJ_CCD_1A:
1120 : case RASAT_PAN:
1121 : case RASAT_MS:
1122 : case GK2_MS:
1123 : case GF1_WFV:
1124 : case YG8_1:
1125 : case DEIMOS1_MS_1R:
1126 : case MED_RES:
1127 : case CBERS4_PAN_1:
1128 : case CBERS4_MS_1:
1129 : case CBERS4_THM_1:
1130 : case SV1_PAN_L1:
1131 : case SV1_MS_L1:
1132 0 : nModel = SRITModele1A;
1133 0 : break;
1134 :
1135 0 : case MSS:
1136 : case TM:
1137 : case ETM:
1138 : case LISS_P3_L2:
1139 : case LISS_L3_L2:
1140 : case LISS_W3_L2:
1141 : case LISS_L4_L2:
1142 : case LISS_AWF_L2:
1143 : case CBERS_IRM_80_L2:
1144 : case CBERS_IRM_160_L2:
1145 : case CBERS_WFI_L2:
1146 : case CBERS_CCD_L2:
1147 : case CBERS_HRC_L2:
1148 : case DMC_1R:
1149 : case DMC_1T:
1150 : case ALOS_PRISM_L2:
1151 : case THEOS_PAN_L2:
1152 : case THEOS_MS_L2:
1153 : case GOSAT_500_L2:
1154 : case GOSAT_1500_L2:
1155 : case HJ_CCD_1B:
1156 : case PLEIADES_PAN_L2:
1157 : case PLEIADES_MS_L2:
1158 : case SSOT_PAN_L2:
1159 : case SSOT_MS_L2:
1160 : case ALSAT2_PAN_2A:
1161 : case ALSAT2_MS_2A:
1162 : case RESOURCESAT:
1163 : case CBERS4_PAN_2:
1164 : case CBERS4_MS_2:
1165 : case CBERS4_THM_2:
1166 : case SV1_PAN_L2:
1167 : case SV1_MS_L2:
1168 0 : nModel = SRITModele1B;
1169 0 : break;
1170 :
1171 0 : case SAR:
1172 : case RSAT_FIN:
1173 : case RSAT_STD:
1174 : case ERS_1:
1175 : case ERS_2:
1176 : case ASAR:
1177 : case QBIRD_PAN_STD:
1178 : case QBIRD_MULTI_STD:
1179 : case WVIEW_PAN_STD:
1180 : case WVIEW_MULTI_STD:
1181 : case GEOEYE_PAN_STD:
1182 : case GEOEYE_MULTI_STD:
1183 : case IKO_PAN:
1184 : case IKO_MULTI:
1185 : case CARTOSAT1_L2:
1186 : case PALSAR:
1187 : case FORMOSAT_PAN_L2:
1188 : case FORMOSAT_MULTIL2:
1189 : case TERRASAR:
1190 : case OV3_PAN_GEO:
1191 : case OV3_MULTI_GEO:
1192 : case OV5_PAN_GEO:
1193 : case OV5_MULTI_GEO:
1194 : case UAVSAR:
1195 : case HJ1C:
1196 0 : nModel = SRITModeleSAR;
1197 0 : break;
1198 :
1199 0 : case ORBVIEW_PAN:
1200 : case ORBVIEW_MULTI:
1201 : case QBIRD_PAN:
1202 : case QBIRD_MULTI:
1203 : case WVIEW_PAN:
1204 : case WVIEW_MULTI:
1205 : case GEOEYE_PAN:
1206 : case GEOEYE_MULTI:
1207 : case SPOT5_PAN_2_5:
1208 : case CARTOSAT1_L1:
1209 : case ALOS_PRISM_L1:
1210 : case KOMPSAT2_PAN:
1211 : case KOMPSAT2_MULTI:
1212 : case KOMPSAT3_PAN:
1213 : case KOMPSAT3_PSH:
1214 : case KOMPSAT3_MS:
1215 : case KOMPSAT3A_PAN:
1216 : case KOMPSAT3A_PSH:
1217 : case KOMPSAT3A_MS:
1218 : case CBERS_HRC:
1219 : case OV3_PAN_BASIC:
1220 : case OV3_MULTI_BASIC:
1221 : case OV5_PAN_BASIC:
1222 : case OV5_MULTI_BASIC:
1223 : case PLEIADES_PAN_L1:
1224 : case PLEIADES_MS_L1:
1225 : case SPOT6_PAN:
1226 : case SPOT6_MS:
1227 : case SPOT6_PSH:
1228 : case SPOT7_PAN:
1229 : case SPOT7_MS:
1230 : case SPOT7_PSH:
1231 : case TH01_DGP:
1232 : case TH01_GFB:
1233 : case TH01_SXZ:
1234 : case ZY1_02C_HRC:
1235 : case ZY1_02C_PMS_PAN:
1236 : case ZY1_02C_PMS_MS:
1237 : case ZY3_NAD:
1238 : case ZY3_FWD:
1239 : case ZY3_BWD:
1240 : case ZY3_MUX:
1241 : case ZY3_TLC:
1242 : case GK2_PAN:
1243 : case MRC_RED:
1244 : case MRC_GRN:
1245 : case MRC_BLU:
1246 : case MRC_NIR:
1247 : case GF1_PMS_PAN:
1248 : case GF1_PMS_MS:
1249 : case GF2_PMS_PAN:
1250 : case GF2_PMS_MS:
1251 : case GF4_PMS_MS:
1252 : case GF4_PMI_Thermal:
1253 : case GF6_PMS_PAN:
1254 : case GF6_PMS_MS:
1255 : case SJ9_PAN:
1256 : case SJ9_MUX:
1257 : case SJ9_PMS_PAN:
1258 : case SJ9_PMS_MS:
1259 : case YG2_1:
1260 : case YG14_1:
1261 : case SSOT_PAN_L1:
1262 : case SSOT_MS_L1:
1263 : case ALSAT2_PAN_1A:
1264 : case ALSAT2_MS_1A:
1265 : case DUBAISAT2_PAN:
1266 : case DUBAISAT2_MS:
1267 : case KAZEOSAT1_PAN_1A:
1268 : case KAZEOSAT1_MS_1A:
1269 : case KAZEOSAT1_PAN_2A:
1270 : case KAZEOSAT1_MS_2A:
1271 : case KAZEOSAT2_MS_1G:
1272 : case DEIMOS2_PAN_1B:
1273 : case DEIMOS2_MS_1B:
1274 : case DEIMOS2_PSH_1B:
1275 : case TRIPLESAT_PAN:
1276 : case TRIPLESAT_MS:
1277 : case PER_PAN_2A:
1278 : case PER_MS_2A:
1279 : case JL101A_PAN:
1280 : case JL101A_MS:
1281 : case HI_RES:
1282 : case FORMOSAT5_PAN:
1283 : case FORMOSAT5_MS:
1284 : case GOKTURK1_PAN:
1285 : case GOKTURK1_MS:
1286 0 : nModel = SRITModele1AHR;
1287 0 : break;
1288 :
1289 0 : case EROS:
1290 : case HRC:
1291 : case QBIRD_PAN_STH:
1292 : case QBIRD_MULTI_STH:
1293 : case FORMOSAT_PAN:
1294 : case FORMOSAT_MULTI:
1295 0 : nModel = SRITModeleEros;
1296 0 : break;
1297 :
1298 0 : default:
1299 0 : return ThrowPCIDSKException(0, "Invalid sensor type.");
1300 : break;
1301 : }
1302 :
1303 0 : return (nModel);
1304 : }
1305 :
|