29 static const char* MODEL_TYPE =
"ossimEnviCgModel";
53 if (geocHdrStream.fail())
55 cout <<
"ossimEnviCgModel:loadEnviGeocFile() Error encountered opening GEOC header file <"<<geoc_hdr<<
">"<<endl;
61 geocHdrStream.getline(line, 1024);
66 cout <<
"ossimEnviCgModel:loadEnviGeocFile() Error: GEOC header file <"<<geoc_hdr
67 <<
"> missing \"ENVI\" magic number."<<endl;
70 while (!geocHdrStream.eof())
72 geocHdrStream.getline(line, 1024);
74 vector<ossimString> strSplit;
79 else if (oline.
contains(
"byte order"))
85 ifstream geocStream (geoc_file.
c_str(), ios_base::binary|ios_base::in);
86 if (geocStream.fail())
88 cout <<
"ossimEnviCgModel:Ctor Error encountered opening GEOC file <"<<geoc_file<<
">"<<endl;
103 value =
readValue(geocStream, (
bool) bigEndian);
111 value =
readValue(geocStream, (
bool) bigEndian);
131 kwl.
add(prefix,
"type",
"ossimCoarseGridModel");
138 s.read( reinterpret_cast<char*>(&value) ,
sizeof(
double) );
141 char * pc =
reinterpret_cast<char *
>(&value);
142 std::swap(pc[0], pc[7]);
143 std::swap(pc[1], pc[6]);
144 std::swap(pc[2], pc[5]);
145 std::swap(pc[3], pc[4]);
Represents serializable keyword/value map.
std::basic_ifstream< char > ifstream
Class for char input file streams.
ossimDblGrid theDlatDhGrid
double readValue(ifstream &s, bool bigEndian) const
bool contains(char aChar) const
bool loadEnviGeocFile(const ossimFilename &geoc_file)
void setDomainType(DomainType dt)
void initialize(const ossimIpt &size, const ossimDpt &origin, const ossimDpt &spacing, double null_value=OSSIM_DEFAULT_NULL_PIX_DOUBLE)
bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Fulfills ossimObject base-class pure virtuals.
ossimDpt imageSize() const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
bool theHeightEnabledFlag
RTTI_DEF1(ossimEnviCgModel, "ossimEnviCgModel", ossimCoarseGridModel)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Fulfills ossimObject base-class pure virtuals.
virtual void setErrorStatus() const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
ossimDblGrid theDlonDhGrid
void initializeModelParams(ossimIrect irect)
Initializes base class data members after grids have been assigned.
void fill(double fill_value)
ossimString after(const ossimString &str, std::string::size_type pos=0) const
METHOD: after(str, pos) Returns string immediately after the token str.
void setNode(const ossimIpt &p, const double &value)