28 "ossimReadmeFileWriter",
31 static const char DEFAULT_FILE_NAME[] =
"output_readme.txt";
32 static ossimTrace traceDebug(
"ossimReadmeFileWriter:debug");
55 static const char MODULE[] =
"ossimReadmeFileWriter::writeFile";
62 <<
"\nNo input connection! Returning..." 76 if ( imgGeom.
valid() )
90 out << setiosflags(ios::fixed)
91 << setiosflags(ios::left)
92 << setw(16) <<
"Image: " 95 out << setw(17) <<
"\nLines:" 97 << setw(17) <<
"\nSamples:" 99 << setw(17) <<
"\nPixel Size x:" 109 out << setw(17) <<
"\nPixel Size y:" 124 out << setw(17) <<
"\nProjection:" << type;
128 out << setw(17) <<
"\nUTM map zone:" << utmProj->
getZone();
130 if(datum && ellipsoid)
131 out << setw(17) <<
"\nDatum:" << datum
132 << setw(17) <<
"\nEllipsoid:" 135 out << resetiosflags(ios::left) << endl;
154 if ( ( proj_name.
contains(
"Lambert") ) ||
156 ( proj_name.
contains(
"TransverseMercator" ) ) )
162 tmpDouble = fabs(origin_lat);
163 tmpString = (origin_lat < 0.0) ? SOUTH : NORTH;
164 out << setiosflags(ios::left)
166 << setw(18) <<
"Origin Latitude:" 167 << resetiosflags(ios::left)
168 << setw(21) << setprecision(12) << tmpDouble
169 << tmpString << endl;
172 tmpDouble = fabs(origin_lon);
173 tmpString = (origin_lon < 0.0) ? WEST : EAST;
174 out << setiosflags(ios::left)
175 << setw(18) <<
"Origin Longitude:" 176 << resetiosflags(ios::left)
177 << setw(21) << tmpDouble << tmpString
178 << setiosflags(ios::left)
180 << setw(23) <<
"False Easting:" 181 << resetiosflags(ios::left)
182 << setw(17) << setprecision(4)
185 out <<
" meters, " << setprecision(4)
191 out << setiosflags(ios::left)
192 << setw(23) <<
"False Northing:" 193 << resetiosflags(ios::left)
194 << setw(17) << setprecision(4)
197 out <<
" meters, " << setprecision(4)
205 if (proj_name.
contains(
"TransverseMercator"))
208 out << setiosflags(ios::left)
210 << setw(18) <<
"Scale Factor:" 211 << resetiosflags(ios::left)
212 << setw(21) << setprecision(10)
217 if ( (proj_name.
contains(
"Lambert") ) ||
221 tmpDouble = fabs(stdpar1);
222 tmpString = (stdpar1 < 0.0) ? SOUTH : NORTH;
223 out << setiosflags(ios::left)
224 << setw(23) <<
"Standard Parallel #1:" 225 << resetiosflags(ios::left)
226 << setw(16) << setprecision(12) << tmpDouble
227 << tmpString << endl;
230 tmpDouble = fabs(stdpar2);
231 tmpString = (stdpar2 < 0.0) ? SOUTH : NORTH;
232 out << setiosflags(ios::left)
233 << setw(23) <<
"Standard Parallel #2:" 234 << resetiosflags(ios::left)
235 << setw(16) << setprecision(12)
236 << tmpDouble << tmpString
252 <<
"\nCorner coordinates relative to outer edge of pixel.\n\n";
257 <<
"\nCorner coordinates relative to center of pixel.\n\n";
260 out <<
"Corner Coordinates:\n\n";
266 tmpString = (projectionInfo->
ulGroundPt().
latd() < 0.0) ? SOUTH : NORTH;
267 out << cornerString[0] << endl;
268 out << setw(14) <<
"Latitude: " 269 << setw(16) << setprecision(12) << tmpDouble
270 << tmpString << endl;
272 tmpString = (projectionInfo->
ulGroundPt().
lond() < 0.0) ? WEST : EAST;
273 out << setw(14) <<
"Longitude: " 274 << setw(16) << tmpDouble << tmpString << endl;
276 out << setw(14) <<
"Easting: " 277 << setw(17) << setprecision(4)
280 out <<
" meters, " << setprecision(4)
285 << setw(14) <<
"Northing: " 288 out <<
" meters, " << setprecision(4)
298 tmpString = (projectionInfo->
urGroundPt().
latd() < 0.0) ? SOUTH : NORTH;
299 out << cornerString[1] << endl;
300 out << setw(14) <<
"Latitude: " 301 << setw(16) << setprecision(12) << tmpDouble
302 << tmpString << endl;
304 tmpString = (projectionInfo->
urGroundPt().
lond() < 0.0) ? WEST : EAST;
305 out << setw(14) <<
"Longitude: " 306 << setw(16) << tmpDouble << tmpString << endl;
308 out << setw(14) <<
"Easting: " 309 << setw(17) << setprecision(4)
312 out <<
" meters, " << setprecision(4)
317 << setw(14) <<
"Northing: " 320 out <<
" meters, " << setprecision(4)
330 tmpString = (projectionInfo->
lrGroundPt().
latd() < 0.0) ? SOUTH : NORTH;
331 out << cornerString[2] << endl;
332 out << setw(14) <<
"Latitude: " 333 << setw(16) << setprecision(12) << tmpDouble
334 << tmpString << endl;
336 tmpString = (projectionInfo->
lrGroundPt().
lond() < 0.0) ? WEST : EAST;
337 out << setw(14) <<
"Longitude: " 338 << setw(16) << tmpDouble << tmpString << endl;
340 out << setw(14) <<
"Easting: " 341 << setw(17) << setprecision(4)
344 out <<
" meters, " << setprecision(4)
349 << setw(14) <<
"Northing: " 352 out <<
" meters, " << setprecision(4)
362 tmpString = (projectionInfo->
llGroundPt().
latd() < 0.0) ? SOUTH : NORTH;
363 out << cornerString[3] << endl;
364 out << setw(14) <<
"Latitude: " 365 << setw(16) << setprecision(12) << tmpDouble
366 << tmpString << endl;
368 tmpString = (projectionInfo->
llGroundPt().
lond() < 0.0) ? WEST : EAST;
369 out << setw(14) <<
"Longitude: " 370 << setw(16) << tmpDouble << tmpString << endl;
372 out << setw(14) <<
"Easting: " 373 << setw(17) << setprecision(4)
376 out <<
" meters, " << setprecision(4)
381 << setw(14) <<
"Northing: " 384 out <<
" meters, " << setprecision(4)
390 out <<
"Center Coordinates:\n\n";
396 out << setw(14) <<
"Latitude: " 397 << setw(16) << setprecision(12) << tmpDouble
398 << tmpString << endl;
404 out << setw(14) <<
"Longitude: " 405 << setw(16) << tmpDouble << tmpString << endl;
407 out << setw(14) <<
"Easting: " 408 << setw(17) << setprecision(4)
411 out <<
" meters, " << setprecision(4)
416 << setw(14) <<
"Northing: " 419 out <<
" meters, " << setprecision(4)
426 <<
"\nNOTE: Lat/Lon values are in decimal degrees.";
429 <<
"\n Eastings/Northings are in meters.";
433 delete projectionInfo;
445 metadatatypeList.push_back(
ossimString(
"ossim_readme"));
453 return (metadataType ==
"ossim_readme");
ossimGpt urGroundPt() const
Returns the upper right ground point.
virtual double getFalseNorthing() const
ossim_int32 linesPerImage() const
double lond() const
Will convert the radian measure to degrees.
Represents serializable keyword/value map.
const char * find(const char *key) const
ossimDpt getUsSurveyFeetPerPixel() const
Returns the pixel size in U.S.
bool contains(char aChar) const
virtual const ossimString & code() const
virtual void getMetadatatypeList(std::vector< ossimString > &metadatatypeList) const
Satisfies pure virtual from ossimMetadataWriter base.
virtual ossimString getClassName() const
ossimDpt lrEastingNorthingPt() const
Returns the lower right easting and northing as a ossimDpt.
double latd() const
Will convert the radian measure to degrees.
virtual bool writeFile()
Write out the file.
ossimPixelType getPixelType() const
Returns data member "thePixelType".
virtual const ossimDatum * getDatum() const
RTTI_DEF1(ossimReadmeFileWriter, "ossimReadmeFileWriter", ossimMetadataFileWriter) static const char DEFAULT_FILE_NAME[]
ossimGpt lrGroundPt() const
Returns the lower right ground point.
ossimDpt centerEastingNorthingPt() const
ossimString getImageInfoString() const
Returns theImageInfoString.
virtual ossimGpt origin() const
virtual ~ossimReadmeFileWriter()
virtual destructor
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
ossimGpt ulGroundPt() const
Returns the upper left ground point.
ossimDpt urEastingNorthingPt() const
Returns the upper right easting and northing as a ossimDpt.
static const char * STD_PARALLEL_1_KW
ossim_int32 pixelsPerLine() const
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
ossimDpt llEastingNorthingPt() const
Returns the lower left easting and northing as a ossimDpt.
const ossimString & code() const
ossimDpt getMetersPerPixel() const
Returns the pixel size in meters.
virtual double getFalseEasting() const
const ossimEllipsoid & getEllipsoid() const
ossimDpt ulEastingNorthingPt() const
Returns the upper left easting and northing as a ossimDpt.
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
ossimGpt centerGroundPt() const
Returns the center ground point.
ossimReadmeFileWriter()
default constructor
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
ossim_int32 getZone() const
std::basic_ofstream< char > ofstream
Class for char output file streams.
double mtrs2usft(double meters)
static const char * SCALE_FACTOR_KW
static const char * STD_PARALLEL_2_KW
ossimGpt llGroundPt() const
Returns the lower left ground point.
virtual bool hasMetadataType(const ossimString &metadataType) const
Satisfies pure virtual from ossimMetadataWriter base.