28 static const char PRODUCT_XML_FILE_KW[] =
"product_xml_filename";
33 "ossimTerraSarTiffReader",
37 #ifdef OSSIM_ID_ENABLED 38 static const char OSSIM_ID[] =
"$Id$";
41 static ossimTrace traceDebug(
"ossimTerraSarTiffReader:degug");
50 <<
"ossimplugins::ossimTerraSarTiffReader::ossimTerraSarTiffReader entered...\n";
51 #ifdef OSSIM_ID_ENABLED 53 <<
"OSSIM_ID: " << OSSIM_ID << std::endl;
65 static const char MODULE[] =
"ossimplugins::ossimTerraSarTiffReader::saveState";
70 << MODULE <<
" entered...\n";
74 kwl.
add(prefix, PRODUCT_XML_FILE_KW, theProductXmlFile.c_str());
83 static const char MODULE[] =
"ossimplugins::ossimTerraSarTiffReader::loadState";
88 << MODULE <<
" entered...\n";
94 const char* lookup = kwl.
find(prefix, PRODUCT_XML_FILE_KW);
97 theProductXmlFile = lookup;
98 if ( isTerraSarProductFile(theProductXmlFile) )
110 theProductXmlFile.clear();
116 << MODULE <<
" exit status = " << (result?
"true":
"false\n")
130 return ossimString(
"ossim TerraSAR-X tiff reader");
140 static const char MODULE[] =
"ossimplugins::ossimTerraSarTiffReader::open";
145 << MODULE <<
" entered...\n" 146 <<
"file: " << file <<
"\n";
163 if ( isTerraSarProductFile( xdoc.
get() ) )
171 imageFile = imageFile.
dirCat(s);
173 setFilename(imageFile);
178 theProductXmlFile = file;
191 << MODULE <<
" exit status = " << (result?
"true":
"false\n")
200 theProductXmlFile.clear();
209 theGeometry = getExternalImageGeometry();
214 theGeometry = getInternalImageGeometry();
226 if ( !theGeometry->getProjection() )
234 initImageParameters( theGeometry.get() );
243 static const char MODULE[] =
"ossimplugins::ossimTerraSarTiffReader::getInternalImageGeometry";
252 if ( xdoc->
openFile(theProductXmlFile) )
259 if ( s ==
"GROUNDRANGE" )
263 if ( model->
open(theProductXmlFile) )
269 else if ( (s ==
"MAP") && theTiffPtr )
277 geotiff.
readTags(theTiffPtr, getCurrentEntry(),
false);
283 createProjection(kwl);
297 <<
"WARNING: Unhandled projection: " << s << std::endl;
324 result = isTerraSarProductFile( xdoc.
get() );
Class to encapsulate parsing TerraSAR product xml file.
static ossimImageGeometryRegistry * instance()
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
void setProjection(ossimProjection *projection)
Sets the projection to be used for local-to-world coordinate transformation.
bool open()
Returns true if no errors initializing object.
virtual ossimString getClassName() const
static ossimString upcase(const ossimString &aString)
bool getProjection(const ossimXmlDocument *xdoc, ossimString &s) const
bool isTerraSarProductFile(const ossimFilename &file) const
Method to check file to see if it's a TerraSAR-X product xml file.
bool isTerraSarX(const ossimXmlDocument *xdoc) const
Checks for node /level1Product/generalHeader/mission containing "TSX-1".
bool addImageGeometry(ossimKeywordlist &kwl, const char *prefix=0) const
Add geometry info from tags to keword list.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
RTTI_DEF1(ossimAlosPalsarModel, "ossimAlosPalsarModel", ossimGeometricSarSensorModel)
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
Represents serializable keyword/value map.
const char * find(const char *key) const
virtual ossimRefPtr< ossimImageGeometry > getInternalImageGeometry() const
ossimFilename expand() const
Method to do file name expansion.
This class allows for direct localisation and indirect localisation using the TerraSar sensor model...
virtual ossimString getLongName() const
virtual bool extendGeometry(ossimImageHandler *handler) const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual ossimString getShortName() const
bool openFile(const ossimFilename &filename)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
static ossimString downcase(const ossimString &aString)
virtual void close()
Deletes the overview and clears the valid image vertices.
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
bool open(const ossimFilename &file)
Method to intantial model from a file.
static ossimProjectionFactoryRegistry * instance()
bool getImageFile(const ossimXmlDocument *xdoc, ossimString &s) const
ossimTerraSarTiffReader()
default constructor
ossimFilename dirCat(const ossimFilename &file) const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
bool readTags(const ossimFilename &file, ossim_uint32 entryIdx=0)
Reads tags.
virtual void close()
Close method.
virtual ~ossimTerraSarTiffReader()
virtual destructor
ossimFilename path() const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)