rspfProjection* rspfEpsgProjectionFactory::createProjection(const rspfString &spec) const
{
   std::vector<rspfString> split_line;
   
   if (rspfString(spec).downcase().contains("auto"))
   {
      split_line = spec.after(":").explode(",");
      return createProjFromAutoCode(split_line);
   }
   rspfString s = spec;
   s.trim(rspfString("|"));
   return m_projDatabase->findProjection(s);
}
//*************************************************************************************************
// This is the principal factory method. It accepts a string in one of three formats:
//
//   1. <group>:<code>, for example "EPSG:32615"
//   2. <code>, for example "32615", this is the CRS code ID for the projerection.
//   3. AUTO:<comma-separated spec>, for specifying custom user-defined codes.
//
// Both projected and geographic (Platte Carre) codes are handled.
//
// IMPORTANT NOTE: Image tie-points cannot be conveyed by an EPSG projection code. The projection
// created here will not be fully initialized for use in rendering imagery.
//*************************************************************************************************
ossimProjection* ossimEpsgProjectionFactory::createProjection(const ossimString &spec) const
{
   std::vector<ossimString> split_line;
   
   // Intercept custom codes here before resorting to the database. This really shouldn't be in this
   // class but nobody else is parsing for it, so leave it here for now.
   if (ossimString(spec).downcase().contains("auto"))
   {
      split_line = spec.after(":").explode(",");
      return createProjFromAutoCode(split_line);
   }

   // Strip commonly found or bar '|' from end if present.
   ossimString s = spec;
   s.trim(ossimString("|"));

   // Otherwise, pass along the request to the database object for record search:
   return m_projDatabase->findProjection(s);
}