25 static const char DEM_TYPE_KW[] =
"dem_type";
26 static const char USGS_DEM_KW[] =
"usgs_dem";
53 const char* lookup = kwl.
find(DEM_TYPE_KW);
79 const std::string& connectionString)
104 const char* lookup = kwl.
find(DEM_TYPE_KW);
109 if (s == USGS_DEM_KW)
117 if(result&&str&&str->good())
126 str->read((
char*)ubuf, 512);
127 for (
int i = 0; i < 512; ++i)
148 char* buf =
new char[reclength + 1];
167 buf[curpos] = s.get();
168 while ((buf[curpos] != EOF) &&
169 (buf[curpos] !=
'\n') &&
170 (curpos < reclength-1))
173 buf[curpos] = s.get();
177 if (s.peek() ==
'\n')
190 if ((startpos + width - 1) > (
long)(strbuf.length()))
194 std::string tempbuf(strbuf.substr(startpos,width));
195 for (
unsigned int i = 0; i < tempbuf.length(); i++)
196 if (tempbuf[i] ==
'D')
199 val = atof(tempbuf.c_str());
208 std::strncpy(temp,strbuf+startpos,width);
Represents serializable keyword/value map.
static const ossimErrorCode OSSIM_OK
const char * find(const char *key) const
static long getLong(char *const strbuf, long const startpos, long const width)
static bool isUsgsDem(const ossimFilename &file)
Does basic sanity checks to see if file is a dem.
static bool getDouble(std::string const &strbuf, long const startpos, long const width, double &val)
static ossimString downcase(const ossimString &aString)
std::basic_istream< char > istream
Base class for char input streams.
virtual ossimErrorCode getErrorStatus() const
ossimFilename & setExtension(const ossimString &e)
Sets the extension of a file name.
static bool getRecord(ossim::istream &s, std::string &strbuf, long reclength=1024)
Reads a single record from a DEM.
unsigned char ossim_uint8