Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to convert a XML format rpc file to an OGEOM format file using OSSIM? #263

Open
hanhao20190402 opened this issue Oct 9, 2020 · 1 comment

Comments

@hanhao20190402
Copy link

No description provided.

@hanhao20190402 hanhao20190402 changed the title Is it Is it possible to convert a XML format rpc file to an OGEOM format file using OSSIM? Oct 9, 2020
@oscarkramer
Copy link
Member

oscarkramer commented Jan 13, 2021

Not directly. You'll need to write code. Assuming you have an rpc file with ".XML" extension, there is a roundabout but simple way of accomplishing this.

In your converter app, do:

// Read XML into sensor model object:
ossimFilename rpcFilename ("my_image.XML");
ossimQuickbirdRpcModel rpcModel;
if (!rpcModel.parseRpcData(rpcFilename))
   cout<<"Error!"<<endl;

// Create geometry object and have it write ogeom:
ossimImageGeometry geom (nullptr, &rpcModel);
ossimKeywordlist geomKwl;
geom.saveState(geomKwl);
geom.Kwl.write("my_image.geom");

Not sure if this will work as advertised... Ignore the fact that it may not be QuickBird. The RPC XML format should be the same for all platforms, though I can't verify that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants