OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ossimNgaProjectionFactory Class Reference

#include <ossimNgaProjectionFactory.h>

Inheritance diagram for ossimNgaProjectionFactory:
ossimProjectionFactoryBase ossimObjectFactory ossimObject ossimReferenced

Public Member Functions

virtual ossimProjectioncreateProjection (const ossimFilename &filename, ossim_uint32 entryIdx) const
 takes a filename. More...
 
virtual ossimProjectioncreateProjection (const ossimString &name) const
 Take a projection type name. More...
 
virtual ossimProjectioncreateProjection (const ossimKeywordlist &kwl, const char *prefix) const
 Take a keywordlist. More...
 
virtual ossimObjectcreateObject (const ossimString &typeName) const
 
virtual ossimObjectcreateObject (const ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual void getTypeNameList (std::vector< ossimString > &typeList) const
 
- Public Member Functions inherited from ossimProjectionFactoryBase
virtual ossimProjectioncreateProjection (ossimImageHandler *handler) const
 
- Public Member Functions inherited from ossimObjectFactory
virtual ~ossimObjectFactory ()
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Static Public Member Functions

static ossimNgaProjectionFactoryinstance ()
 Implements singleton pattern. More...
 

Protected Member Functions

 ossimNgaProjectionFactory ()
 Constructor loads all SRS CSV files specified in the ossim prefs. More...
 
- Protected Member Functions inherited from ossimProjectionFactoryBase
ossimProjectioncreateProjectionFromGeometryFile (const ossimFilename &imageFile, ossim_uint32 entryIdx) const
 This method takes the filename and tries to find an external ".geom" file. More...
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Detailed Description

Definition at line 15 of file ossimNgaProjectionFactory.h.

Constructor & Destructor Documentation

◆ ossimNgaProjectionFactory()

ossimNgaProjectionFactory::ossimNgaProjectionFactory ( )
inlineprotected

Constructor loads all SRS CSV files specified in the ossim prefs.

Protected as part of singleton implementation.

Definition at line 60 of file ossimNgaProjectionFactory.h.

60 {}

Member Function Documentation

◆ createObject() [1/2]

ossimObject * ossimNgaProjectionFactory::createObject ( const ossimString typeName) const
virtual

Creates an object given a type name.

Implements ossimObjectFactory.

Definition at line 71 of file ossimNgaProjectionFactory.cpp.

References createProjection().

73 {
74  return createProjection(typeName);
75 }
virtual ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
takes a filename.

◆ createObject() [2/2]

ossimObject * ossimNgaProjectionFactory::createObject ( const ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Creates and object given a keyword list.

Implements ossimObjectFactory.

Definition at line 77 of file ossimNgaProjectionFactory.cpp.

References createProjection().

79 {
80  return createProjection(kwl, prefix);
81 }
virtual ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
takes a filename.

◆ createProjection() [1/3]

ossimProjection * ossimNgaProjectionFactory::createProjection ( const ossimFilename filename,
ossim_uint32  entryIdx 
) const
virtual

takes a filename.

This filename can be an image file or it can also be a ossim .geom file. It could be other forms of geom files as well. The factories job will be to determine what parser to use and return a projection if successful.

Implements ossimProjectionFactoryBase.

Definition at line 34 of file ossimNgaProjectionFactory.cpp.

References ossimProjectionFactoryBase::createProjectionFromGeometryFile().

Referenced by createObject().

36  {
37  // Check for external geometry file.
38  return createProjectionFromGeometryFile(filename, entryIdx);
39 }
ossimProjection * createProjectionFromGeometryFile(const ossimFilename &imageFile, ossim_uint32 entryIdx) const
This method takes the filename and tries to find an external ".geom" file.

◆ createProjection() [2/3]

ossimProjection * ossimNgaProjectionFactory::createProjection ( const ossimString name) const
virtual

Take a projection type name.

Implements ossimProjectionFactoryBase.

Definition at line 49 of file ossimNgaProjectionFactory.cpp.

References ossimString::after(), ossimEllipsoidFactory::create(), ossimEllipsoidFactory::instance(), and ossimString::toInt().

51 {
52  ossimProjection* proj = 0;
53  if ((!ossimString(spec).downcase().contains("nga")) && (spec.after(":").toInt() == 235))
54  {
56  proj = new ossimMercatorProjection(*e, ossimGpt(0,0), 0, 0, 0.857385503731176);
57  }
58 
59  return proj;
60 }
static ossimEllipsoidFactory * instance()
const ossimEllipsoid * create(const ossimString &code) const

◆ createProjection() [3/3]

ossimProjection * ossimNgaProjectionFactory::createProjection ( const ossimKeywordlist kwl,
const char *  prefix 
) const
virtual

Take a keywordlist.

Implements ossimProjectionFactoryBase.

Definition at line 65 of file ossimNgaProjectionFactory.cpp.

67 {
68  return 0;
69 }

◆ getTypeNameList()

void ossimNgaProjectionFactory::getTypeNameList ( std::vector< ossimString > &  typeList) const
virtual

This should return the type name of all objects in all factories. This is the name used to construct the objects dynamially and this name must be unique.

Implements ossimObjectFactory.

Definition at line 83 of file ossimNgaProjectionFactory.cpp.

84 {
85  typeList.push_back(ossimString("NGA:235 \"Scaled World Mercator\""));
86 }

◆ instance()

ossimNgaProjectionFactory * ossimNgaProjectionFactory::instance ( )
static

Implements singleton pattern.

Definition at line 27 of file ossimNgaProjectionFactory.cpp.

Referenced by ossimProjectionFactoryRegistry::initializeDefaults().

28 {
29  static ossimNgaProjectionFactory inst;
30 
31  return &inst;
32 }

The documentation for this class was generated from the following files: