OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimJpipProjectionFactory.cpp
Go to the documentation of this file.
3 #include <ossim/base/ossimUrl.h>
7 #include <memory>
8 
11 {
12 }
13 
15 {
16  static ossimJpipProjectionFactory inst;
17  return &inst;
18 }
19 
21  ossim_uint32 entryIdx)const
22 {
23  ossimProjection* result = 0;
24  bool canGetInfo = (filename.ext().downcase() == "jpip");
25  if(!canGetInfo)
26  {
27  ossimUrl url(filename.c_str());
28  ossimString protocol =url.getProtocol().downcase();
29  if((protocol == "jpip")||
30  (protocol == "jpips"))
31  {
32  canGetInfo = true;
33  }
34  }
35 
36  if(canGetInfo)
37  {
38  std::shared_ptr<ossimInfoBase> infoBase = ossimInfoFactoryRegistry::instance()->create(filename);
39  if(infoBase)
40  {
41  ossimKeywordlist kwl;
42  infoBase->getKeywordlist(kwl);
43  ossimString prefix = "jpip.image" + ossimString::toString(entryIdx) + ".";
45  }
46  }
47  return result;
48 }
49 
51 {
52  return 0;
53 }
54 
56  const char* prefix)const
57 {
58  ossimProjection* result = 0;
59  ossimString geojp2Prefix = ossimString(prefix) + "geojp2.";
60  if(kwl.getNumberOfSubstringKeys(geojp2Prefix) > 0)
61  {
62  // try creating an ossim projection from a geojp2
63  result = ossimProjectionFactoryRegistry::instance()->createProjection(kwl, geojp2Prefix.c_str());
64  }
65  else
66  {
67  // we will try to pick out XML type projeciton information
68  //
69  }
70  return result;
71 }
72 
74 {
75  return 0;
76 }
77 
79  const char* /*prefix*/)const
80 {
81  return 0;
82 }
83 
84 void ossimJpipProjectionFactory::getTypeNameList(std::vector<ossimString>& /*typeList*/)const
85 {
86 
87 }
88 
virtual ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
takes a filename.
ossim_uint32 getNumberOfSubstringKeys(const ossimString &regularExpression) const
Represents serializable keyword/value map.
static ossimString toString(bool aValue)
Numeric to string methods.
std::shared_ptr< ossimInfoBase > create(const ossimFilename &file) const
Create method.
ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
unsigned int ossim_uint32
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
static ossimProjectionFactoryRegistry * instance()
virtual ossimObject * createObject(const ossimString &typeName) const
static ossimInfoFactoryRegistry * instance()
instance method
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
ossimString ext() const
#define RTTI_DEF1(cls, name, b1)
Definition: ossimRtti.h:485
static ossimJpipProjectionFactory * instance()