42 static const char MODULE[] =
"ossimRpfUtil::writeDotRpfFiles";
47 << MODULE <<
" entered..." 48 <<
"\na.toc file: " << aDotTocFile
49 <<
"\noutput directory: " << outputDir
58 std::string e = MODULE;
59 e +=
" ERROR:\nCould not open: ";
68 std::string e = MODULE;
69 e +=
" ERROR:\nCould not create directory: ";
70 e+= outputDir.
c_str();
84 if ( tocEntry->
isEmpty() == false )
91 std::string e = MODULE;
92 e +=
" ERROR: Null entry: ";
113 static const char MODULE[] =
"ossimRpfUtil::writeDotRpfFile";
118 << MODULE <<
" entered..." 119 <<
"\noutput directory: " << outputDir
120 <<
"\nentry: " << entry <<
"\n";
125 std::string errMsg = MODULE;
126 errMsg +=
" ERROR toc pointer null!";
131 std::string errMsg = MODULE;
132 errMsg +=
" ERROR toc entry pointer null!";
149 os.open(outFile.
c_str(), ios::out);
150 if ( os.good() == false )
152 std::string errMsg = MODULE;
153 errMsg +=
"ERROR could not open: ";
154 errMsg += outFile.
string();
159 os << setiosflags(std::ios_base::fixed) << setprecision(15);
169 if( geom.
valid() ==
false)
171 std::string errMsg =
"ERROR could not get geometry.";
172 errMsg += outFile.
string();
196 <<
"outputRect: " << outputRect
197 <<
"\nbands: " << bands
198 <<
"\nscale: " << scale
205 llg.
lon -= halfPix.
x;
206 llg.
lat -= halfPix.
y;
207 urg.
lon += halfPix.
x;
208 urg.
lat += halfPix.
y;
224 std::string errMsg = MODULE;
225 errMsg +=
" ERROR no rows!";
231 std::string errMsg = MODULE;
232 errMsg +=
" ERROR no columns!";
262 llg.
lon -= halfPix.
x;
263 llg.
lat -= halfPix.
y;
264 urg.
lon += halfPix.
x;
265 urg.
lat += halfPix.
y;
270 os << path.
c_str() <<
"|" 280 <<
"row[" << row <<
"]col[" << col <<
"]path: " << path
340 tm* lt = localtime(&t);
341 strftime(s, 15,
"%Y%m%d%H%M%S", lt);
342 std::string date = s;
344 outFile = outputDir.
dirCat(s);
ossim_uint32 getNumberOfEntries() const
void writeDotRpfFile(const ossimRpfToc *toc, const ossimRpfTocEntry *tocEntry, const ossimFilename &outputDir, ossim_uint32 entry)
static const ossimErrorCode OSSIM_OK
void getDotRfpFilenameForEntry(const ossimFilename &outputDir, ossim_uint32 entry, ossimFilename &outFile) const
Method to get the file for entry.
ossimFilename expand() const
Method to do file name expansion.
bool almostEqual(T x, T y, T tolerance=FLT_EPSILON)
ossim_uint32 getNumberOfFramesVertical() const
const ossimString getRelativeFramePath(ossim_uint32 entryIdx, ossim_uint32 row, ossim_uint32 col) const
For the given entry index, frame row, and frame column, this routine returns the corresponding name o...
static ossimString toString(bool aValue)
Numeric to string methods.
ossimRefPtr< ossimImageGeometry > getImageGeometry() const
Returns the image geometry object associated with this tile source or NULL if non defined...
virtual ~ossimRpfUtil()
protected virtual destructor
const ossimIpt & ll() const
bool localToWorld(const ossimDpt &local_pt, ossimGpt &world_pt) const
Exposes the 3D projection from image to world coordinates.
unsigned int ossim_uint32
const ossimRpfTocEntry * getTocEntry(ossim_uint32 index) const
void getBoundingRect(ossimIrect &rect) const
Get the bounding rect of entry.
ossimErrorCode parseFile(const ossimFilename &fileName, bool keepFileHeader=false)
Parses a.toc file.
const ossimIpt & ur() const
void writeDotRpfFiles(const ossimFilename &aDotTocFile, const ossimFilename &outputDir)
Write dot rpf file(s) to output directory from a.toc file.
ossimRpfUtil()
default constructor
ossim_uint32 getNumberOfFramesHorizontal() const
void getRootDirectory(ossimFilename &dir) const
Method to get the root directory from the a.toc file name.
ossimFilename dirCat(const ossimFilename &file) const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
ossim_uint32 getNumberOfBands() const
std::basic_ofstream< char > ofstream
Class for char output file streams.
void getDecimalDegreesPerPixel(ossimDpt &scale) const
Get the scale in decimal degrees per pixel.
bool createDirectory(bool recurseFlag=true, int perm=0775) const
void checkLongitude(ossimGpt &left, ossimGpt &right) const
Method to test for 360 spread, 180.0 <–> 180.00 and set leftLon to -180 if both left and right are 1...
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
const std::string & string() const