small example demonstrating the ProjectionParametersFactory
- Author
- woelk 12/2006
#include <Geometry/ProjectionParametersFactory.hh>
using namespace BIAS;
using namespace std;
int main(int argc, char *argv[])
{
if (argc!=2){
cerr << "usage: \n"<<argv[0]<<" <projection parameters type>\n"
<< "\nvalid types are: ... "<<endl;
vector<string> names;
for (unsigned i=0; i<names.size(); i++){
cout << names[i] << endl;
}
return -1;
}
if (!ppb){
cerr << "error creating \""<<argv[1]<<"\"\n";
return -2;
}
cout << "created projection parameters: "<<*ppb<<endl;
ostringstream oss;
oss << argv[1]<<".xml";
#ifdef BIAS_HAVE_XML2
if (res!=0){
cerr << "error writing \""<<oss.str()<<"\"\n";
return -3;
}
cout << "XMLWrite wrote \""<<oss.str()<<"\"\n";
cout << "read projection parameters: "<<*read<<endl;
#else
cout<<"did not XMLWrite because BIAS_HAVE_XML2 not available."<<endl;
#endif
return 0;
}