OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimSrtmSupportData.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: David Burken
6 //
7 // Description:
8 //
9 // Support data class for a Shuttle Radar Topography Mission (SRTM) file.
10 //
11 //----------------------------------------------------------------------------
12 // $Id$
13 
14 
16 #include <ossim/base/ossimTrace.h>
18 #include <ossim/base/ossimNotify.h>
20 #include <ossim/base/ossimDatum.h>
22 #include <ossim/base/ossimEndian.h>
23 #include <ossim/base/ossimRegExp.h>
28 
29 #include <cmath>
30 #include <fstream>
31 #include <iostream>
32 #include <iomanip>
33 
34 // Static trace for debugging
35 static ossimTrace traceDebug("ossimSrtmSupportData:debug");
36 
37 //---
38 // Start with the min and max at some default setting.
39 // Mt. Everest highest elev point on Earth 8850 meters.
40 //---
41 static const ossim_float64 DEFAULT_MIN = -8850.0;
42 static const ossim_float64 DEFAULT_MAX = 8850.0;
43 
44 
46  :
47  m_file(),
48  m_numberOfLines(0),
49  m_numberOfSamples(0),
50  m_southwestLatitude(ossim::nan()),
51  m_southwestLongitude(ossim::nan()),
52  m_latSpacing(ossim::nan()),
53  m_lonSpacing(ossim::nan()),
54  m_minPixelValue(DEFAULT_MIN),
55  m_maxPixelValue(DEFAULT_MAX),
56  m_scalarType(OSSIM_SCALAR_UNKNOWN),
57  m_str(0)
58 {
59 }
60 
62 {
63 }
64 
66  bool scanForMinMax)
67 {
68  m_file = srtmFile;
69 
70  if(traceDebug())
71  {
73  << "ossimSrtmSupportData::setFilename: entered:"
74  << "\nsrtmFile: " << srtmFile
75  << "\nscanForMinMax flag: " << scanForMinMax
76  << std::endl;
77  }
78 
80  createIstream(m_file);
81  if (m_str)
82  {
83  if(m_str->fail())
84  {
85  if(traceDebug())
86  {
88  << m_file << " does not exist: leaving ..." << std::endl;
89  }
90  clear();
91  return false;
92  }
93  }
94  else
95  {
96  return false;
97  }
98 
99  // Start with default.
100  m_minPixelValue = DEFAULT_MIN;
101  m_maxPixelValue = DEFAULT_MAX;
102 
103  // See if we have an ossim metadata file to initialize from.
104  bool outputOmd = false;
105  bool loadedFromOmd = false;
106 
107  ossimFilename omdFile = m_file;
108  omdFile.setExtension(ossimString("omd"));
109  if (omdFile.exists())
110  {
111  //---
112  // The loadOmd is called instead of loadState so m_file is not
113  // overwrote.
114  //---
115  ossimKeywordlist kwl(omdFile);
116  loadedFromOmd = loadOmd(kwl);
117  }
118 
119  if (!loadedFromOmd)
120  {
121  if (!setCornerPoints())
122  {
123  clear();
124  return false;
125  }
126  if (!setSize())
127  {
128  clear();
129  return false;
130  }
131  outputOmd = true;
132  }
133 
134  if (scanForMinMax)
135  {
136  // These could have been picked up in the loadOmd.
137  if ( (m_minPixelValue == DEFAULT_MIN) ||
138  (m_maxPixelValue == DEFAULT_MAX) )
139  {
140  if ( computeMinMax() )
141  {
142  outputOmd = true;
143  }
144  else
145  {
146  if(traceDebug())
147  {
149  << "Unable to compute min max: leaving ..." << std::endl;
150  }
151  clear();
152  return false;
153  }
154  }
155  }
156 
157  //---
158  // NOTE: The outputOmd flag should probably be set if !loadedFromOmd.
159  // Leaving as is for now (only set if scanForMinMax).
160  //---
161  if (outputOmd)
162  {
163  ossimKeywordlist kwl;
164  saveState(kwl);
165  kwl.write(omdFile);
166  }
167 
168  m_str = 0;
169  // if(m_str->is_open())
170  // {
171  // m_str->close();
172  // }
173 
174  if (traceDebug())
175  {
176  ossimNotify(ossimNotifyLevel_DEBUG) << *this << std::endl;
177  }
178 
179  return true;
180 }
181 
183 {
184  return m_file;
185 }
186 
188 {
189  return m_numberOfLines;
190 }
191 
193 {
194  return m_numberOfSamples;
195 }
196 
198  const char* prefix)
199 {
200  if (m_file == ossimFilename::NIL)
201  {
202  return false;
203  }
204 
205  kwl.add(prefix,
207  "ossimEquDistCylProjection",
208  true);
209 
210  kwl.add(prefix,
212  0.0,
213  true);
214 
215  kwl.add(prefix,
218  true);
219 
220  kwl.add(prefix,
222  (m_southwestLatitude+1.0),
223  true);
224 
225  kwl.add(prefix,
228  true);
229 
230  // Add the pixel scale.
231  kwl.add(prefix,
233  m_latSpacing,
234  true);
235 
236  kwl.add(prefix,
238  m_lonSpacing,
239  true);
240 
241  // Add the datum. (always WGS-84 per spec)
242  kwl.add(prefix,
244  ossimDatumFactory::instance()->wgs84()->code(),
245  true);
246 
247  // Add the number of lines and samples.
248  kwl.add(prefix,
251  true);
252 
253  kwl.add(prefix,
256  true);
257 
258  return true;
259 }
260 
262 {
263  //---
264  // Make an Equidistant Cylindrical projection with a origin at the equator
265  // since the DTED post spacing is considered to be square.
266  //---
267  const ossimDatum* datum = ossimDatumFactory::instance()->wgs84();
269 
270  //---
271  // Set the tie point.
272  // NOTE: Latitude southwest corner we need northwest; hence, the +1.
273  //---
275 
276  // Set the scale:
278 
279  ossimRefPtr<ossimProjection> proj = eq.get();
280 
281  return proj;
282 }
283 
285  const char* prefix) const
286 {
287  if (m_file == ossimFilename::NIL)
288  {
289  return false;
290  }
291 
292  ossimString bandPrefix;
293  if (prefix)
294  {
295  bandPrefix = prefix;
296  }
297  bandPrefix += "band1.";
298 
299  kwl.add(prefix,
301  m_file.c_str(),
302  true);
303 
304  kwl.add(prefix,
306  1,
307  true);
308 
309  kwl.add(prefix,
312  true);
313 
314  kwl.add(prefix,
317  true);
318 
319  //---
320  // Special case, store the tie point as the upper left lat so add one.
321  //---
322  kwl.add(prefix,
324  (m_southwestLatitude + 1.0),
325  true);
326 
327  kwl.add(prefix,
330  true);
331 
332  kwl.add(prefix,
334  m_latSpacing,
335  true);
336 
337  kwl.add(prefix,
339  m_lonSpacing,
340  true);
341 
342  // User can opt out of scanning for this so don't save if it is still nan.
343  if (m_minPixelValue != DEFAULT_MIN)
344  {
345  kwl.add(bandPrefix,
348  true);
349  }
350 
351  // User can opt out of scanning for this so don't save if it is still nan.
352  if (m_maxPixelValue != DEFAULT_MAX)
353  {
354  kwl.add(bandPrefix.c_str(),
357  true);
358  }
359 
360  // constant
361  kwl.add(bandPrefix,
363  "-32768",
364  true);
365 
366  // constant
367  kwl.add(prefix,
369  "big_endian",
370  true);
371 
372  // constant
373  kwl.add(prefix,
375  ossimScalarTypeLut::instance()->getEntryString(m_scalarType),
376  true);
377 
378  return true;
379 }
380 
382  const char* prefix)
383 {
384  ossimString bandPrefix;
385  if (prefix)
386  {
387  bandPrefix = prefix;
388  }
389  bandPrefix += "band1.";
390 
391  ossimString s; // For numeric conversions.
392 
393  const char* lookup;
394 
395  // Look for "filename" then look for deprecated "image_file" next.
396  lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
397  if (lookup)
398  {
399  m_file = lookup;
400  }
401  else
402  {
403  // Deprecated...
404  lookup = kwl.find(prefix, ossimKeywordNames::IMAGE_FILE_KW);
405  if (lookup)
406  {
407  m_file = lookup;
408  }
409  else
410  {
411  return false;
412  }
413  }
414 
415  return loadOmd(kwl, prefix);
416 }
417 
419  const char* prefix)
420 {
421  std::string pfx;
422  std::string bandPrefix;
423 
424  if (prefix) // Cannot give null to std::string.
425  {
426  pfx = prefix;
427  bandPrefix = prefix;
428  }
429  bandPrefix += "band1.";
430 
431  ossimString value;
432 
433  //---
434  // Look for the min and max first since they could have been populated by
435  // "cmm" (compute min max). Min and Max are not required by this method
436  // as they are handled elsewhere if they are not found here.
437  //---
438 
439  // Not an error if not present.
440  value.string() = kwl.findKey(bandPrefix, std::string(ossimKeywordNames::MIN_VALUE_KW));
441  if ( value.size() )
442  {
443  m_minPixelValue = value.toFloat64();
444  }
445 
446  // Not an error if not present.
447  value.string() = kwl.findKey(bandPrefix.c_str(), std::string(ossimKeywordNames::MAX_VALUE_KW));
448  if ( value.size() )
449  {
450  m_maxPixelValue = value.toFloat64();
451  }
452 
453  value.string() = kwl.findKey(pfx, std::string(ossimKeywordNames::NUMBER_LINES_KW));
454  if ( value.size() )
455  {
456  m_numberOfLines = value.toUInt32();
457  }
458  else
459  {
460  return false;
461  }
462 
463  value.string() = kwl.findKey(pfx, std::string(ossimKeywordNames::NUMBER_SAMPLES_KW));
464  if ( value.size() )
465  {
466  m_numberOfSamples = value.toUInt32();
467  }
468  else
469  {
470  return false;
471  }
472 
473  //---
474  // Special case the tie point was stored as the upper left so we must
475  // subtract one.
476  //---
477  value.string() = kwl.findKey(pfx, std::string(ossimKeywordNames::TIE_POINT_LAT_KW));
478  if ( value.size() )
479  {
480  m_southwestLatitude = value.toFloat64() - 1.0;
481  }
482  else
483  {
484  return false;
485  }
486 
487  value.string() = kwl.findKey(pfx, std::string(ossimKeywordNames::TIE_POINT_LON_KW));
488  if ( value.size() )
489  {
491  }
492  else
493  {
494  return false;
495  }
496 
497  int scalar = ossimScalarTypeLut::instance()->getEntryNumber(kwl, prefix);
498 
499  if (scalar != ossimLookUpTable::NOT_FOUND)
500  {
501  m_scalarType = (ossimScalarType)scalar;
503  {
504  return false;
505  }
506  }
507  else
508  {
509  return false;
510  }
511 
512  m_latSpacing = 1.0 / (m_numberOfLines - 1);
513  m_lonSpacing = 1.0 / (m_numberOfSamples - 1);
514 
515  return true;
516 }
517 
519 {
520  return m_southwestLatitude;
521 }
522 
524 {
525  return m_southwestLongitude;
526 }
528 {
529  return m_latSpacing;
530 }
531 
533 {
534  return m_lonSpacing;
535 }
536 
538 {
540  m_numberOfLines = 0;
541  m_numberOfSamples = 0;
546  m_minPixelValue = DEFAULT_MIN;
547  m_maxPixelValue = DEFAULT_MAX;
548 }
549 
551 {
552  if(traceDebug())
553  {
555  << "ossimSrtmSupportData::setCornerPoints(): entered..." << std::endl;
556  }
557 
559  ossimString regularExp1 = "[N|S][0-9][0-9][E|W][0-9][0-9][0-9]";
560  ossimString regularExp2 = "[E|W][0-9][0-9][0-9][N|S][0-9][0-9]";
561  ossimRegExp regEx;
562  bool latLonOrderFlag = true;
563  bool foundFlag = false;
564  f = f.upcase();
565 
566  regEx.compile(regularExp1.c_str());
567  foundFlag = regEx.find(f.c_str());
568  if(!foundFlag)
569  {
570  regEx.compile(regularExp2.c_str());
571  foundFlag = regEx.find(f.c_str());
572  if(foundFlag)
573  {
574  latLonOrderFlag = false;
575  f = ossimFilename(ossimString(f.begin()+regEx.start(),
576  f.begin()+regEx.end()));
577  }
578  }
579  if(foundFlag)
580  {
581  f = ossimFilename(ossimString(f.begin()+regEx.start(),
582  f.begin()+regEx.end()));
583  }
584  if (f.size() != 7)
585  {
586  return false;
587  }
588 // ossimString s;
589 
590  if(latLonOrderFlag)
591  {
592 
593 // s.push_back(f[1]);
594 // s.push_back(f[2]);
596  f.begin()+3).toDouble();//s.toDouble();
597  // Get the latitude.
598  if (f[static_cast<std::string::size_type>(0)] == 'S')
599  {
600  m_southwestLatitude *= -1;
601  }
602  else if (f[static_cast<std::string::size_type>(0)] != 'N')
603  {
604  return false; // Must be either 's' or 'n'.
605  }
606  // Get the longitude.
607 // s.clear();
608 // s.push_back(f[4]);
609 // s.push_back(f[5]);
610 // s.push_back(f[6]);
612  f.begin()+7).toDouble();//s.toDouble();
613  if (f[static_cast<std::string::size_type>(3)] == 'W')
614  {
615  m_southwestLongitude *= -1;
616  }
617  else if (f[static_cast<std::string::size_type>(3)] != 'E')
618  {
619  return false; // Must be either 'e' or 'w'.
620  }
621  }
622  else
623  {
624  // Get the longitude.
625 // s.clear();
626 // s.push_back(f[1]);
627 // s.push_back(f[2]);
628 // s.push_back(f[3]);
630  f.begin()+4).toDouble();//s.toDouble();
631  if (f[static_cast<std::string::size_type>(0)] == 'W')
632  {
633  m_southwestLongitude *= -1;
634  }
635  else if (f[static_cast<std::string::size_type>(0)] != 'E')
636  {
637  return false; // Must be either 'e' or 'w'.
638  }
639 // s.clear();
640 
641 // s.push_back(f[5]);
642 // s.push_back(f[6]);
644  f.begin()+7).toDouble();//s.toDouble();
645  // Get the latitude.
646  if (f[static_cast<std::string::size_type>(4)] == 'S')
647  {
648  m_southwestLatitude *= -1;
649  }
650  else if (f[static_cast<std::string::size_type>(4)] != 'N')
651  {
652  return false; // Must be either 's' or 'n'.
653  }
654  }
655 
656 
657  if(traceDebug())
658  {
660  << "ossimSrtmSupportData::setCornerPoints(): leaving with true..."
661  << std::endl;
662  }
663  return true;
664 }
665 
667 {
668  if(traceDebug())
669  {
671  << "ossimSrtmSupportData::setSize(): entered..." << std::endl;
672  }
673  if(!m_str)
674  {
676  m_file);
677  }
678 
679  if (!m_str)
680  {
681  return false;
682  }
683 
684  if(m_str->fail())
685  {
686  return false;
687  }
688 
689  ossim_float64 size = 0.0;
690  m_str->seekg(0, std::ios::beg);
691 
692 #if 0 /* tmp drb */
693  if(m_str->isCompressed())
694  {
695  ossimFilename tmp = m_file;
696  tmp.setExtension("hgt");
697  if(!tmp.exists())
698  {
699  ossimOFStream out(tmp.c_str(),
700  std::ios::out|std::ios::binary);
701 
702  if(!out.fail())
703  {
704  bool done = false;
705  char buf[1024];
706  while(!done&&!m_str->fail())
707  {
708  m_str->read(buf, 1024);
709  if(m_str->gcount() < 1024)
710  {
711  done = true;
712  }
713  if(m_str->gcount() > 0)
714  {
715  out.write(buf, m_str->gcount());
716  }
717  }
718  out.close();
719  size = tmp.fileSize();
720  tmp.remove();
721  }
722  }
723  }
724  else
725  {
726  size = m_file.fileSize();
727  }
728 #endif /* tmp drb */
729 
730  size = m_file.fileSize();
731  if (!size)
732  {
733  if(traceDebug())
734  {
736  << "ossimSrtmSupportData::setSize(): leaving with false at line "
737  << __LINE__ << std::endl;
738  }
739  return false;
740  }
741 
743 
744  //---
745  // Assuming square for now. Have to check the spec for this.
746  //---
747  if (size == 25934402) // 2 * 3601 * 3601 three arc second
748  {
749  m_numberOfLines = 3601;
750  m_numberOfSamples = 3601;
752  }
753  else if(size == 51868804) // 4*3601*3601
754  {
755  m_numberOfLines = 3601;
756  m_numberOfSamples = 3601;
758  }
759  else if (size == 2884802) // 2 * 1201 * 1201 one arc second
760  {
761  m_numberOfLines = 1201;
762  m_numberOfSamples = 1201;
764  }
765  else if (size == 5769604)
766  {
767  m_numberOfLines = 1201;
768  m_numberOfSamples = 1201;
770  }
771  else // try to get a square width and height
772  {
773  ossim_uint64 lines = (ossim_uint64)sqrt((ossim_float64)(size / 2));
774  ossim_uint64 samples = (ossim_uint64)sqrt((ossim_float64)(size / 2));
775  // check square
776  if(lines*samples*2 == size)
777  {
778  m_numberOfLines = lines;
779  m_numberOfSamples = samples;
781 
782  }
783  else
784  {
785  ossim_uint64 lines = (ossim_uint64)sqrt((ossim_float64)(size / 4));
786  ossim_uint64 samples = (ossim_uint64)sqrt((ossim_float64)(size / 4));
787  // check square
788  if(lines*samples*4 == size)
789  {
790  m_numberOfLines = lines;
791  m_numberOfSamples = samples;
793  }
794  else
795  {
796  if(traceDebug())
797  {
799  << "ossimSrtmSupportData::setSize(): leaving with false at line " << __LINE__ << std::endl;
800  }
801  return false;
802  }
803  }
804  }
805 
806  m_latSpacing = 1.0 / (m_numberOfLines - 1);
807  m_lonSpacing = 1.0 / (m_numberOfSamples - 1);
808  if(traceDebug())
809  {
811  << "ossimSrtmSupportData::setSize(): leaving with true..."
812  << std::endl;
813  }
814 
815  m_str=0;
816 
817  return true;
818 }
819 
821 {
823  {
825  -32768.0);
826  }
828  -32768.0);
829 }
830 
831 template <class T>
833  double defaultNull)
834 {
835 
836  if(!m_str)
837  {
838  m_str =
840  m_file);
841  }
842 
843  if (!m_str)
844  {
845  return false;
846  }
847 
848  if(m_str->fail())
849  {
850  return false;
851  }
852 
853  const size_t BYTES_IN_LINE = m_numberOfSamples * 2;
854  const T NULL_PIX = (T)defaultNull;
855 
856  double minValue = 1.0/FLT_EPSILON;
857  double maxValue = -1.0/FLT_EPSILON;
858  T* line_buf = new T[m_numberOfSamples];
859  char* char_buf = (char*)line_buf;
860  ossimEndian swapper;
861 
862  ossimByteOrder endianType = ossim::byteOrder();
863  for (ossim_uint32 line = 0; line < m_numberOfLines; ++line)
864  {
865  m_str->read(char_buf, (std::streamsize)BYTES_IN_LINE);
866  if(endianType == OSSIM_LITTLE_ENDIAN)
867  {
868  swapper.swap(line_buf, m_numberOfSamples);
869  }
870  for (ossim_uint32 sample = 0; sample < m_numberOfSamples; ++sample)
871  {
872  if (line_buf[sample] == NULL_PIX) continue;
873  if (line_buf[sample] > maxValue) maxValue = line_buf[sample];
874  if (line_buf[sample] < minValue) minValue = line_buf[sample];
875  }
876  }
877  delete [] line_buf;
878  m_minPixelValue = minValue;
879  m_maxPixelValue = maxValue;
880 
881  m_str = 0;
882  return true;
883 }
884 
886 {
887  return m_minPixelValue;
888 }
889 
891 {
892  return m_maxPixelValue;
893 }
894 
896 {
897  return m_scalarType;
898 }
899 
901 {
902  out << std::setprecision(15) << "ossimSrtmSupportData data members:"
903  << "\nFile: " << m_file
904  << "\nLines: " << m_numberOfLines
905  << "\nSamples: " << m_numberOfSamples
906  << "\nSouth West Latitude: " << m_southwestLatitude
907  << "\nSouth West Longitude: " << m_southwestLongitude
908  << "\nLatitude spacing: " << m_latSpacing
909  << "\nLongitude spacing: " << m_lonSpacing
910  << "\nMin post value: " << m_minPixelValue
911  << "\nMax post value: " << m_maxPixelValue
912  << std::endl;
913  return out;
914 }
915 
916 
static const char * BYTE_ORDER_KW
static const char * MIN_VALUE_KW
bool setCornerPoints()
Sets corner points from "theFile".
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of the object to a keyword list.
static const char * DECIMAL_DEGREES_PER_PIXEL_LAT
static bool remove(const ossimFilename &pathname)
Removes pathname from filesystem if supported by platform.
static ossimString upcase(const ossimString &aString)
Definition: ossimString.cpp:34
static const char * DATUM_KW
static const ossimFilename NIL
This was taken from Wx widgets for performing touch and access date stamps.
Definition: ossimFilename.h:40
static const char * CENTRAL_MERIDIAN_KW
ossim_float64 getSouthwestLatitude() const
Represents serializable keyword/value map.
const std::string & findKey(const std::string &key) const
Find methods that take std::string(s).
ossim_float64 getSouthwestLongitude() const
const char * find(const char *key) const
ossim_int64 fileSize() const
float ossim_float32
bool setSize()
Sets lines and samples from "theFile" size.
virtual std::ostream & print(std::ostream &out) const
Prints data members for debug.
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
This code was derived from https://gist.github.com/mshockwave.
Definition: Barrier.h:8
static const char * MAX_VALUE_KW
static const char * NULL_VALUE_KW
static const char * NUMBER_LINES_KW
static const char * TIE_POINT_LON_KW
16 bit signed integer
ossim_uint32 getNumberOfSamples() const
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
virtual void setDecimalDegreesPerPixel(const ossimDpt &gsd)
ossim_uint32 toUInt32() const
static StreamFactoryRegistry * instance()
32 bit floating point
ossimRefPtr< ossimProjection > getProjection() const
Gets the projection for srtm cell.
virtual bool write(const char *file, const char *comment=0) const
Methods to dump the ossimKeywordlist to a file on disk.
static const char * TYPE_KW
virtual bool getImageGeometry(ossimKeywordlist &kwl, const char *prefix=0)
Populates the keyword list with image geometry information.
virtual ossim_int32 getEntryNumber(const char *entry_string, bool case_insensitive=true) const
double ossim_float64
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossim_float64 getMinPixelValue() const
static ossimScalarTypeLut * instance()
Returns the static instance of an ossimScalarTypeLut object.
ossimSrtmSupportData()
default constructor
virtual ~ossimSrtmSupportData()
destructor
bool computeMinMaxTemplate(T dummy, double defaultNull)
yy_size_t size
bool exists() const
signed short ossim_sint16
std::string::size_type size() const
Definition: ossimString.h:405
#define FLT_EPSILON
std::string::iterator begin()
Definition: ossimString.h:420
OSSIM_DLL double defaultNull(ossimScalarType scalarType)
unsigned long long ossim_uint64
unsigned int ossim_uint32
virtual const ossimEllipsoid * ellipsoid() const
Definition: ossimDatum.h:60
ossim_float64 toFloat64() const
static ossimDatumFactory * instance()
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of the object from a keyword list.
static const char * DECIMAL_DEGREES_PER_PIXEL_LON
void clear()
Sets all data members to an unitialized state.
ossimByteOrder
static const char * NUMBER_BANDS_KW
bool computeMinMax()
Scans file for min and max pixels.
void compile(const char *)
ossim_uint32 start() const
Definition: ossimRegExp.h:209
ossimScalarType m_scalarType
ossimScalarType
static const char * ORIGIN_LATITUDE_KW
ossim_uint32 end() const
Definition: ossimRegExp.h:217
ossim_float64 m_southwestLatitude
ossim_uint32 getNumberOfLines() const
ossim_float64 getLatitudeSpacing() const
ossim_float64 m_southwestLongitude
ossimFilename fileNoExtension() const
bool loadOmd(const ossimKeywordlist &kwl, const char *prefix=0)
This is a loadState called by setFilename that does not reset "theFile".
ossimFilename getFilename() const
std::shared_ptr< ossim::istream > m_str
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
static const char * SCALAR_TYPE_KW
ossimScalarType getScalarType() const
virtual void setUlTiePoints(const ossimGpt &gpt)
static const char * TIE_POINT_LAT_KW
virtual std::shared_ptr< ossim::istream > createIstream(const std::string &connectionString, const ossimKeywordlist &options=ossimKeywordlist(), std::ios_base::openmode mode=std::ios_base::in|std::ios_base::binary) const
Will try to creates an istream interface to the connectionString passed in.
const ossimDatum * wgs84() const
static const char * IMAGE_FILE_KW
ossimFilename & setExtension(const ossimString &e)
Sets the extension of a file name.
static const char * FILENAME_KW
ossim_float64 getMaxPixelValue() const
bool find(const char *)
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26
static const char * NUMBER_SAMPLES_KW
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
ossim_float64 getLongitudeSpacing() const
const std::string & string() const
Definition: ossimString.h:414
bool setFilename(const ossimFilename &srtmFile, bool scanForMinMax=false)
Initializes object from file.