OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAlosPalsarModel.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // "Copyright Centre National d'Etudes Spatiales"
4 // "Copyright Centre for Remote Imaging, Sensing and Processing"
5 //
6 // License: LGPL
7 //
8 // See LICENSE.txt file in the top level directory for more details.
9 //
10 //----------------------------------------------------------------------------
11 // $Id$
12 
13 #include <ossimAlosPalsarModel.h>
14 #include <otb/GalileanEphemeris.h>
16 
17 #include <otb/JSDDateTime.h>
18 #include <otb/GMSTDateTime.h>
19 #include <otb/CivilDateTime.h>
20 
21 #include <ossim/base/ossimTrace.h>
22 #include <otb/RefPoint.h>
25 #include <otb/SensorParams.h>
26 #include <otb/PlatformPosition.h>
28 #include <ossim/base/ossimTrace.h>
29 
30 
31 // Static trace for debugging
32 static ossimTrace traceDebug("ossimAlosPalsarModel:debug");
33 
34 #include <string>
35 #include <algorithm>
36 
37 namespace ossimplugins
38 {
39 
40  RTTI_DEF1(ossimAlosPalsarModel, "ossimAlosPalsarModel", ossimGeometricSarSensorModel);
41 
43  thePixelSpacing(0),
44  theAlosPalsarLeader(NULL),
45  theAlosPalsarData(NULL)
46  {
47  }
48 
50  {
51  if (theAlosPalsarLeader != NULL)
52  {
53  delete theAlosPalsarLeader;
54  theAlosPalsarLeader = NULL;
55  }
56  if (theAlosPalsarData != NULL)
57  {
58  delete theAlosPalsarData;
59  theAlosPalsarData = NULL;
60  }
61  }
62 
64  {
65  return ossimString("ossimAlosPalsarModel");
66  }
67 
69  {
70  return new ossimAlosPalsarModel(*this);
71  }
72 
74  {
75  std::cout << "WARNING: getSlantRangeFromGeoreferenced not implemented for AlosPalsar" << std::endl;
76  return 0.0;
77  }
78 
79  bool ossimAlosPalsarModel::InitSensorParams(const ossimKeywordlist &kwl, const char *prefix)
80  {
81  const char* wave_length_str = kwl.find(prefix, "wave_length");
82  double wave_length = atof(wave_length_str);
83  const char* fr_str = kwl.find(prefix, "fr");
84  double fr = atof(fr_str) * 1e6;
85  const char* fa_str = kwl.find(prefix, "fa");
86  double fa = atof(fa_str);
87 
88  ossimString time_dir_pix = kwl.find(prefix, "time_dir_pix");
89  time_dir_pix.upcase();
90  //std::transform(time_dir_pix.begin(), time_dir_pix.end(), time_dir_pix.begin(), toupper);
91  ossimString time_dir_lin = kwl.find(prefix, "time_dir_lin");
92  time_dir_lin.upcase();
93  //std::transform(time_dir_lin.begin(), time_dir_lin.end(), time_dir_lin.begin(), toupper);
94 
95  //ellipsoid parameters
96  const char* ellip_maj_str = kwl.find(prefix, "ellip_maj");
97  double ellip_maj = atof(ellip_maj_str) * 1000.0; // km -> m
98  const char* ellip_min_str = kwl.find(prefix, "ellip_min");
99  double ellip_min = atof(ellip_min_str) * 1000.0; // km -> m
100 
101  const char* dopcen_str = kwl.find(prefix, "dopcen_range[0]");
102  double dopcen = atof(dopcen_str);
103  const char* dopcenLinear_str = kwl.find(prefix, "dopcen_range[1]");
104  double dopcenLinear = atof(dopcenLinear_str);
105 
106  if (_sensor != NULL)
107  {
108  delete _sensor;
109  }
110 
111  _sensor = new SensorParams();
112 
113  /*
114  if(strcmp(time_dir_pix.c_str(), "INCREASE") == 0)
115  {
116  _sensor->set_col_direction(1);
117  }
118  else
119  {
120  _sensor->set_col_direction(-1);
121  }
122  */
123  // WARNING: _col_direction hard-coded to 1, as level 1.0 image is not flipped.
125 
126  // TODO: Have to verify whether the time direction indicator should be always positive
127  /*
128  if(strcmp(time_dir_lin.c_str(), "INCREASE") == 0)
129  {
130  _sensor->set_lin_direction(1);
131  }
132  else
133  {
134  _sensor->set_lin_direction(-1);
135  }
136  */
138 
140 
141  double nlooks_az = atof(kwl.find(prefix, "nlooks_az"));
142  _sensor->set_nAzimuthLook(nlooks_az);
143  double n_rnglok = atof(kwl.find(prefix, "n_rnglok"));
144  _sensor->set_nRangeLook(n_rnglok);
145 
146  _sensor->set_prf(fa / 1000.); // For ALOS, the fa value in the leader file is in units of mHz
147  _sensor->set_sf(fr);
148  _sensor->set_rwl(wave_length);
149 
150  _sensor->set_semiMajorAxis(ellip_maj) ;
151  _sensor->set_semiMinorAxis(ellip_min) ;
152 
153  _sensor->set_dopcen(dopcen);
154  _sensor->set_dopcenLinear(dopcenLinear);
155 
156  return true;
157  }
158 
160  {
161  static const char MODULE[] = "ossimAlosPalsarModel::open";
162 
163  if (traceDebug())
164  {
166  << MODULE << " entered...\n"
167  << "file: " << file << "\n";
168  }
169 
170  bool result = false;
171  ossimFilename leaFilename = file;
172  ossimFilename datFilename;
173 
174  /*
175  * Creation of the class allowing to store Leader file metadata
176  */
177  if (theAlosPalsarLeader != NULL)
178  {
179  delete theAlosPalsarLeader;
180  theAlosPalsarLeader = NULL;
181  }
182 
185 
186  if (leaFilename.exists())
187  {
188  result = isAlosPalsarLeader(leaFilename);
189  if (result == false)
190  {
191  leaFilename = findAlosPalsarLeader(file);
192  }
193  result = isAlosPalsarLeader(leaFilename);
194 
195  if (result == true)
196  {
197  if (traceDebug())
198  {
200  << leaFilename << " is AlosPalsar leader file..."
201  << std::endl
202  << "Begin reading Leader file" << std::endl;
203  }
204  /*
205  * Leader file data reading
206  */
207  std::ifstream leaderFile(leaFilename.c_str(), ios::in | ios::binary);
208  leaderFile >> *theAlosPalsarLeader;
209  leaderFile.close();
210 
211  if (traceDebug())
212  {
214  << "End reading Leader file" << std::endl;
215  }
216 
217  datFilename = findAlosPalsarData(leaFilename);
218  result = isAlosPalsarData(datFilename);
219  if (result == true)
220  {
221  if (traceDebug())
222  {
224  << datFilename << " is AlosPalsar data file..."
225  << std::endl
226  << "Begin reading Data file header" << std::endl;
227  }
228  /*
229  * Read header of data file for image size info
230  */
231  std::ifstream dataFile(datFilename.c_str(), ios::in | ios::binary);
232  dataFile >> *theAlosPalsarData;
233  dataFile.close();
234 
235  if (traceDebug())
236  {
238  << "End reading Data file header" << std::endl;
239  }
240  } // matches: if ( result=isAlosPalsarData(datFilename) == true )
241 
242  //To initialize the whole state, reusing saveState/loadState
243  //FIXME: This could be at the superclass level instead
244  ossimKeywordlist kwl;
245  saveState(kwl);
246  loadState(kwl);
247 
248  } // matches: if ( result=isAlosPalsarLeader(file) == True )
249 
250  } // matches: if ( file.exists() )
251 
252  if (traceDebug())
253  {
255 
257  << MODULE << " exit status = " << (result ? "true" : "false\n")
258  << std::endl;
259  }
260 
261  return result;
262 
263  }
264 
265 
267  const char* prefix) const
268  {
269  static const char MODULE[] = "ossimAlosPalsarModel::saveState";
270 
271  if (traceDebug())
272  {
273  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
274  }
275 
276  bool result;
277 
278  kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimAlosPalsarModel", true);
279 
280  if (theAlosPalsarLeader == NULL)
281  {
282  std::cout << "Error: AlosPalsarLeader is NULL" << std::endl;
283  return false;
284  }
285 
286  result = theAlosPalsarLeader->saveState(kwl);
287 
288  if (result == true)
289  {
290  if (theAlosPalsarData == NULL)
291  {
292  std::cout << "Error: AlosPalsarData is NULL" << std::endl;
293  return false;
294  }
295  result = theAlosPalsarData->saveState(kwl);
296  }
297 
298  if (traceDebug())
299  {
301  << MODULE << " exit status = " << (result ? "true" : "false\n")
302  << std::endl;
303  }
304 
305  return result;
306  }
307 
308  bool ossimAlosPalsarModel::loadState(const ossimKeywordlist &kwl, const char *prefix)
309  {
310  static const char MODULE[] = "ossimAlosPalsarModel::loadState";
311 
312  if (traceDebug())
313  {
314  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
315  }
316 
317  const char* lookup = 0;
318  ossimString s;
319 
320  // Check the type first.
321  lookup = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
322  if (lookup)
323  {
324  s = lookup;
325  if (s != getClassName())
326  {
327  return false;
328  }
329  }
330 
331  // Load the base class.
332 // bool result = ossimGeometricSarSensorModel::loadState(kwl, prefix);
333  bool result = false;
334  result = InitPlatformPosition(kwl, prefix);
335  if (!result)
336  {
337  if (traceDebug())
338  {
340  << MODULE
341  << "\nCan't init platform position \n";
342  }
343  }
344 
345  if (result)
346  {
347  result = InitSensorParams(kwl, prefix);
348  if (!result)
349  {
350  if (traceDebug())
351  {
353  << MODULE
354  << "\nCan't init sensor parameters \n";
355  }
356  }
357  }
358 
359  if (result)
360  {
361  result = InitRefPoint(kwl, prefix);
362  if (!result)
363  {
364  if (traceDebug())
365  {
367  << MODULE
368  << "\nCan't init ref point \n";
369  }
370  }
371  }
372 
373 // Products georeferenced to ground range are not handled in AlosPalsarModel
374  _isProductGeoreferenced = false;
375  /*
376  if (result)
377  {
378  result = InitSRGR(kwl, prefix);
379  if (!result)
380  {
381  if (traceDebug())
382  {
383  ossimNotify(ossimNotifyLevel_WARN)
384  << MODULE
385  << "\nCan't init ref point \n";
386  }
387  }
388  }
389  */
390 
391  return result;
392  }
393 
395  {
396  // const double PI = 3.14159265358979323846 ;
397  CivilDateTime ref_civil_date;
398  /*
399  * Ephemerisis reference date retrieval
400  */
401  const char* eph_year_str = kwl.find(prefix, "eph_year");
402  int eph_year = atoi(eph_year_str);
403  const char* eph_month_str = kwl.find(prefix, "eph_month");
404  int eph_month = atoi(eph_month_str);
405  const char* eph_day_str = kwl.find(prefix, "eph_day");
406  int eph_day = atoi(eph_day_str);
407  const char* eph_sec_str = kwl.find(prefix, "eph_sec");
408  double eph_sec = atof(eph_sec_str);
409 
410 
411  ref_civil_date.set_year(eph_year);
412  ref_civil_date.set_month(eph_month);
413  ref_civil_date.set_day(eph_day);
414  ref_civil_date.set_second((int)eph_sec);
415  ref_civil_date.set_decimal(eph_sec - (double)((int)eph_sec));
416 
417  JSDDateTime ref_jsd_date(ref_civil_date);
418 
419  /*
420  * Ephemerisis time interval retrieval
421  */
422  const char* eph_int_str = kwl.find(prefix, "eph_int");
423  double eph_int = atof(eph_int_str);
424  /*
425  * Ephemerisis number retrieval
426  */
427  const char* neph_str = kwl.find(prefix, "neph");
428  int neph = atoi(neph_str);
429 
430  Ephemeris** ephemeris = new Ephemeris*[neph];
431 
432  /*
433  * Ephemerisis retrieval
434  */
435  for (int i = 0; i < neph; i++)
436  {
437  double pos[3];
438  double vit[3];
439  char name[64];
440 
441 
442  sprintf(name, "eph%i_posX", i);
443  const char* px_str = kwl.find(prefix, name);
444  pos[0] = atof(px_str);
445 
446  sprintf(name, "eph%i_posY", i);
447  const char* py_str = kwl.find(prefix, name);
448  pos[1] = atof(py_str);
449 
450  sprintf(name, "eph%i_posZ", i);
451  const char* pz_str = kwl.find(prefix, name);
452  pos[2] = atof(pz_str);
453 
454 
455  sprintf(name, "eph%i_velX", i);
456  const char* vx_str = kwl.find(prefix, name);
457  vit[0] = atof(vx_str);
458 
459  sprintf(name, "eph%i_velY", i);
460  const char* vy_str = kwl.find(prefix, name);
461  vit[1] = atof(vy_str);
462 
463  sprintf(name, "eph%i_velZ", i);
464  const char* vz_str = kwl.find(prefix, name);
465  vit[2] = atof(vz_str);
466 
467  /*
468  * Ephemerisis date
469  */
470  JSDDateTime date(ref_jsd_date);
471  date.set_second(date.get_second() + i * eph_int);
472  date.NormDate();
473 
474  GeographicEphemeris* eph = new GeographicEphemeris(date, pos, vit);
475 
476  ephemeris[i] = eph;
477  }
478 
479  /*
480  * Antenna position interpolator creation
481  */
482  if (_platformPosition != NULL)
483  {
484  delete _platformPosition;
485  }
486  _platformPosition = new PlatformPosition(ephemeris, neph);
487 
488  /*
489  * Free of memory used by the ephemerisis list
490  */
491  for (int i = 0; i < neph; i++)
492  {
493  delete ephemeris[i];
494  }
495  delete[] ephemeris;
496 
497  return true;
498  }
499 
500  bool ossimAlosPalsarModel::InitRefPoint(const ossimKeywordlist &kwl, const char *prefix)
501  {
502  const char* sc_lin_str = kwl.find(prefix, "sc_lin");
503  double sc_lin = atof(sc_lin_str);
504 
505  const char* sc_pix_str = kwl.find(prefix, "sc_pix");
506  double sc_pix = atof(sc_pix_str);
507 
508  const char* inp_sctim_str = kwl.find(prefix, "inp_sctim");
509 
510  // Not available for ALOS
511  //const char* rng_gate_str = kwl.find(prefix,"zero_dop_range_time_f_pixel");
512  //double rng_gate = atof(rng_gate_str);
513 
514  if (_refPoint == NULL)
515  {
516  _refPoint = new RefPoint();
517  }
518 
519  _refPoint->set_pix_col(sc_pix);
520  _refPoint->set_pix_line(sc_lin);
521 
522  char year_str[5];
523  for (int i = 0; i < 4; i++)
524  {
525  year_str[i] = inp_sctim_str[i];
526  }
527  year_str[4] = '\0';
528 
529  char month_str[3];
530  for (int i = 4; i < 6; i++)
531  {
532  month_str[i-4] = inp_sctim_str[i];
533  }
534  month_str[2] = '\0';
535 
536  char day_str[3];
537  for (int i = 6; i < 8; i++)
538  {
539  day_str[i-6] = inp_sctim_str[i];
540  }
541  day_str[2] = '\0';
542 
543  char hour_str[3];
544  for (int i = 8; i < 10; i++)
545  {
546  hour_str[i-8] = inp_sctim_str[i];
547  }
548  hour_str[2] = '\0';
549 
550  char min_str[3];
551  for (int i = 10; i < 12; i++)
552  {
553  min_str[i-10] = inp_sctim_str[i];
554  }
555  min_str[2] = '\0';
556 
557  char sec_str[3];
558  for (int i = 12; i < 14; i++)
559  {
560  sec_str[i-12] = inp_sctim_str[i];
561  }
562  sec_str[2] = '\0';
563 
564  char mili_str[4];
565  for (int i = 14; i < 17; i++)
566  {
567  mili_str[i-14] = inp_sctim_str[i];
568  }
569  mili_str[3] = '\0';
570 
571  int year = atoi(year_str);
572  int month = atoi(month_str);
573  int day = atoi(day_str);
574  int hour = atoi(hour_str);
575  int min = atoi(min_str);
576  int sec = atoi(sec_str);
577  double mili = atof(mili_str);
578 
579 
580  CivilDateTime date(year, month, day, hour * 3600 + min * 60 + sec, mili / 1000.0);
581 
582  if (_platformPosition != NULL)
583  {
584  Ephemeris * ephemeris = _platformPosition->Interpolate((JSDDateTime)date);
585  if (ephemeris == NULL) return false ;
586  _refPoint->set_ephemeris(ephemeris);
587 
588  delete ephemeris;
589  }
590  else
591  {
592  return false;
593  }
594 
595  const double c = 2.99792458e+8;
596 
597  const char* slantRange = kwl.find(prefix, "slant_range_to_1st_data_sample");
598  double distance = atof(slantRange) + static_cast<double>(sc_pix) * _sensor->get_nRangeLook() / _sensor->get_sf() * c / 2.0;
599 
601 
602  // in order to use ossimSensorModel::lineSampleToWorld
603  const char* nbCol_str = kwl.find(prefix, "num_pix_in_line");
604  const char* nbLin_str = kwl.find(prefix, "num_lines");
605  theImageSize.x = atoi(nbCol_str);
606  theImageSize.y = atoi(nbLin_str);
608 
609 // AlosPalsarModel currently does not handle GCPs
610  /* Do not use GCPs for now
611  // Ground Control Points extracted from the model : corner points
612  std::list<ossimGpt> groundGcpCoordinates ;
613  std::list<ossimDpt> imageGcpCoordinates ;
614  // first line first pix
615  const char* lon_str = kwl.find("first_line_first_pixel_lon");
616  double lon = atof(lon_str);
617  const char* lat_str = kwl.find("first_line_first_pixel_lat");
618  double lat = atof(lat_str);
619  if (lon > 180.0) lon -= 360.0;
620  ossimDpt imageGCP1(0,0);
621  ossimGpt groundGCP1(lat, lon, 0.0);
622  groundGcpCoordinates.push_back(groundGCP1) ;
623  imageGcpCoordinates.push_back(imageGCP1) ;
624  // first line last pix
625  lon_str = kwl.find("first_line_last_pixel_lon");
626  lon = atof(lon_str);
627  lat_str = kwl.find("first_line_last_pixel_lat");
628  lat = atof(lat_str);
629  if (lon > 180.0) lon -= 360.0;
630  ossimDpt imageGCP2(theImageSize.x-1, 0);
631  ossimGpt groundGCP2(lat, lon, 0.0);
632  groundGcpCoordinates.push_back(groundGCP2) ;
633  imageGcpCoordinates.push_back(imageGCP2) ;
634  // last line last pix
635  lon_str = kwl.find("last_line_last_pixel_lon");
636  lon = atof(lon_str);
637  lat_str = kwl.find("last_line_last_pixel_lat");
638  lat = atof(lat_str);
639  if (lon > 180.0) lon -= 360.0;
640  ossimDpt imageGCP3(theImageSize.x-1,theImageSize.y-1);
641  ossimGpt groundGCP3(lat, lon, 0.0);
642  groundGcpCoordinates.push_back(groundGCP3) ;
643  imageGcpCoordinates.push_back(imageGCP3) ;
644  // last line first pix
645  lon_str = kwl.find("last_line_first_pixel_lon");
646  lon = atof(lon_str);
647  lat_str = kwl.find("last_line_first_pixel_lat");
648  lat = atof(lat_str);
649  if (lon > 180.0) lon -= 360.0;
650  ossimDpt imageGCP4(0,theImageSize.y-1);
651  ossimGpt groundGCP4(lat, lon, 0.0);
652  groundGcpCoordinates.push_back(groundGCP4) ;
653  imageGcpCoordinates.push_back(imageGCP4) ;
654 
655  // Default optimization
656  optimizeModel(groundGcpCoordinates, imageGcpCoordinates) ;
657  */
658 
659  return true;
660  }
661 
662 // Note: Products georeferenced to ground range are not handled in AlosPalsarModel
663 // therefore the following method will not be used
664  bool ossimAlosPalsarModel::InitSRGR(const ossimKeywordlist& /* kwl */, const char* /* prefix */)
665  {
666  // TODO Add user warning and reference to ERS Model
667  return false;
668  }
669 
671  {
672  std::ifstream candidate(file.c_str(), ios::in | ios::binary);
673  char alosFileName[16];
674 
675  candidate.seekg(48);
676  if (candidate.bad() || candidate.eof())
677  {
678  return false;
679  }
680  candidate.read(alosFileName, 16);
681  if (candidate.bad() || candidate.eof())
682  {
683  return false;
684  }
685  candidate.close();
686 
687  ossimString ersString(alosFileName);
688 
689  if ((ersString.find("AL1 ") == 0) &&
690  (ersString.find("PSR") == 4) &&
691  (ersString.find("SARL") == 8))
692  {
693  return true;
694  }
695  else
696  {
697  return false;
698  }
699 
700  return true;
701 
702  }
703 
705  {
706  ossimFilename leaFile = file;
707  ossimString imgPrefix("IMG");
708  ossimString trlPrefix("TRL");
709  ossimString volPrefix("VOL");
710  ossimString leaPrefix("LED");
711 
712  ossimString filename = file.fileNoExtension();
713  ossimString prefix = filename.substr(0, 3);
714 
715  if ((prefix == imgPrefix) ||
716  (prefix == trlPrefix) ||
717  (prefix == volPrefix))
718  {
719  // Find the 2nd dash from the end of the string
720  // since ALOS files are of the form
721  // <prefix>-ALPSRP<identifier>-H<n.n>__A
722  filename.replace(0, prefix.size(), leaPrefix);
723 
724  leaFile.setFile(filename);
725  if (leaFile.exists())
726  {
727  return leaFile;
728  }
729  }
730  return file;
731  }
732 
734  {
735  std::ifstream candidate(file.c_str(), ios::in | ios::binary);
736  char alosFileName[16];
737 
738  candidate.seekg(48);
739  if (candidate.bad() || candidate.eof())
740  {
741  return false;
742  }
743  candidate.read(alosFileName, 16);
744  if (candidate.bad() || candidate.eof())
745  {
746  return false;
747  }
748  candidate.close();
749 
750  ossimString ersString(alosFileName);
751 
752  if ((ersString.find("AL1 ") == 0) &&
753  (ersString.find("PSR") == 4) &&
754  (ersString.find("IMOP") == 8))
755  {
756  return true;
757  }
758  else
759  {
760  return false;
761  }
762 
763  return true;
764  }
765 
767  {
768  ossimFilename dataFile = file;
769  ossimString imgPrefix("IMG-HH"); // Assume the ALOS data always has at least the HH
770  ossimString trlPrefix("TRL");
771  ossimString volPrefix("VOL");
772  ossimString leaPrefix("LED");
773 
774  ossimString filename = file.fileNoExtension();
775  ossimString prefix = filename.substr(0, 3);
776  if ((prefix == leaPrefix) ||
777  (prefix == trlPrefix) ||
778  (prefix == volPrefix))
779  {
780  // Find the 2nd dash from the end of the string
781  // since ALOS files are of the form
782  // <prefix>-ALPSRP<identifier>-H<n.n>__A
783  filename.replace(0, prefix.size(), imgPrefix);
784 
785  dataFile.setFile(filename);
786  if (dataFile.exists())
787  {
788  return dataFile;
789  }
790  }
791  return file;
792  }
793 
794 } // namespace ossimplugins
This class represent an ephemeris in Geographic coordinates system.
virtual bool InitSensorParams(const ossimKeywordlist &kwl, const char *prefix)
Initializes the Sensor Params from a projection keywordlist.
AlosPalsarLeader * theAlosPalsarLeader
List of metadata contained in the Leader file.
virtual bool InitRefPoint(const ossimKeywordlist &kwl, const char *prefix)
Initializes the Reference Point from a projection keywordlist.
void set_sightDirection(SightDirection sight)
Definition: SensorParams.h:93
This class represents a date and time in the civil format.
Definition: CivilDateTime.h:30
static ossimString upcase(const ossimString &aString)
Definition: ossimString.cpp:34
AlosPalsarData * theAlosPalsarData
List of metadata contained in the Data file.
virtual ossimFilename findAlosPalsarLeader(const ossimFilename &file) const
void set_rwl(double rwl)
Definition: SensorParams.h:83
virtual bool isAlosPalsarData(const ossimFilename &file) const
void set_dopcen(double value)
Definition: SensorParams.h:173
This class is able to read the Leader file of the AlosPalsar file structure.
ossimFilename & setFile(const ossimString &f)
This class handles the platform position.
RTTI_DEF1(ossimAlosPalsarModel, "ossimAlosPalsarModel", ossimGeometricSarSensorModel)
Represents serializable keyword/value map.
void set_dopcenLinear(double value)
Definition: SensorParams.h:178
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
const char * find(const char *key) const
This class handles the referential point.
Definition: RefPoint.h:29
void set_lin_direction(int dir)
Definition: SensorParams.h:128
void set_second(int second)
double get_nRangeLook() const
Definition: SensorParams.h:118
virtual double getSlantRangeFromGeoreferenced(double col) const
This function associates an image column number to a slant range when the image is georeferenced (gro...
This class handles the sensor parameters.
Definition: SensorParams.h:29
Ephemeris * Interpolate(JSDDateTime date) const
This function interpolates its ephemeris to create a new ephemeris at the given date and time...
void set_pix_line(double pix_line)
Definition: RefPoint.cpp:80
virtual ossimFilename findAlosPalsarData(const ossimFilename &file) const
static const char * TYPE_KW
virtual bool InitPlatformPosition(const ossimKeywordlist &kwl, const char *prefix)
Initializes the Platform Position from a projection keywordlist.
void set_pix_col(double pix_col)
Definition: RefPoint.cpp:85
bool _isProductGeoreferenced
True iff the product is ground range.
void set_semiMinorAxis(double value)
Definition: SensorParams.h:158
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save object state to a keyword list.
void set_second(double second)
Definition: JSDDateTime.h:91
virtual ossimObject * dup() const
Returns pointer to a new instance, copy of this.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
This class represents an ephemeris.
Definition: Ephemeris.h:28
void set_decimal(double decimal)
virtual ossimString getClassName() const
Method to return the class name.
bool exists() const
std::string::size_type size() const
Definition: ossimString.h:405
This class is able to read the Leader file of the AlosPalsar file structure.
void set_semiMajorAxis(double value)
Definition: SensorParams.h:153
double get_second() const
Definition: JSDDateTime.h:76
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save object state to a keyword list.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save object state to a keyword list.
void set_nRangeLook(double look)
Definition: SensorParams.h:138
bool open(const ossimFilename &file)
Method to instantiate model from the leader file.
virtual std::ostream & print(std::ostream &out) const
ossimDrect theImageClipRect
PlatformPosition * _platformPosition
Handle the position of the platform.
ossim_int32 y
Definition: ossimIpt.h:142
virtual bool InitSRGR(const ossimKeywordlist &kwl, const char *prefix)
Initializes the Slant Range for each Ground Range data sets : theNumberSRGR,theSRGRCoeffset,_srgr_update,thePixelSpacing,_isProductGeoreferenced.
ossimFilename fileNoExtension() const
std::string & replace(std::string::size_type pos, std::string::size_type n, const std::string &s)
Replaces a substring of *this with the string s.
Definition: ossimString.h:870
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
void set_nAzimuthLook(double look)
Definition: SensorParams.h:133
std::string substr(std::string::size_type pos=0, std::string::size_type n=std::string::npos) const
Equivalent to basic_string(*this, pos, n).
Definition: ossimString.h:910
ossim_int32 x
Definition: ossimIpt.h:141
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of the object from a keyword list.
void set_prf(double prf)
Definition: SensorParams.h:73
virtual bool isAlosPalsarLeader(const ossimFilename &file) const
void set_ephemeris(Ephemeris *ephemeris)
Definition: RefPoint.cpp:65
void set_col_direction(int dir)
Definition: SensorParams.h:123
This class represents a date.
Definition: JSDDateTime.h:30
float distance(double lat1, double lon1, double lat2, double lon2, int units)
void set_distance(double distance)
Definition: RefPoint.cpp:75
void set_sf(double sf)
Definition: SensorParams.h:78
std::string::size_type find(const std::string &s, std::string::size_type pos=0) const
Searches for s as a substring of *this, beginning at character pos of *this.
Definition: ossimString.h:753
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
#define min(a, b)
Definition: auxiliary.h:75