Combination View Flat View Tree View
Threads [ Previous | Next ]
RE: Orthorectify large numbers of .nc files
toggle
Greetings

I am in need of a way to use Orthorectify to orthorectify hundreds of .nc files (oceaoncolor L2 OC files) and save them as geotiff with all bands present. I wish to do this because I wish to have mapped files I can use for band math in R.

My current workflow to get mapped multiband files is to use two functions, each with their own shell script, in SeaDAS ocssw, the first being l2bin, which creates L3 binned files and the second is l3mapgen, which maps the L3 binned files.

This is more steps than is necessary when I know that Orthorectify can do this on L2 data.

Can someone please confirm for me that to do this I need to 1) create a correct xml graph file and 2) I need to create some form of shell script to use the graph file?

If my belief is correct does anyone have working examples or the ability/willingness to help me find resources I can read?

I am working on a Mac, for what it is worth.

Further, I am confused about how to call gpt on a mac from the command line because there is a disk partitioning tool with the same name.

I have read http://www.brockmann-consult.de/cms/web/beam/forum/-/message_boards/message/19307?_19_threadView=tree and am simply more confused. I tried to use gpt.command after putting the attached graph file and my data file in the SeaDAS bin directory. I then submitted the command below.

IGSBDAEBLT28398:~ dmwarner$ gpt.command /Users/dmwarner/Applications/seadas-7.4/bin/writeToGeoTIFF.xml -PoutputFile=myfile -SinputFile=/Users/dmwarner/Applications/seadas-7.4/bin/A2016001182500.L2_LAC_OC.x.nc

The result was

Error: Operator 'WriteOp': Mandatory source product (field 'sourceProduct') not set.

I know writeToGeoTIFF is NOT my goal, necessarily, but I thought I could start small with existing examples just to succeed in getting gpt to work.

Any help or suggestion on how to get mapped GeoTIFFS (with all bands) from GPT in batch would be great.
Thanks you.
Flag Flag
RE: Orthorectify large numbers of .nc files
Answer Answer (Unmark)
5/18/17 8:43 AM as a reply to David Warner.
Your on a good way for the usage of gpt.
I think you have used the old xml file.
Just replace
1<input>${inputFile}</input>

by
1<source>${inputFile}</source>

Then it should work.

For doing the orthorectification you would need to use the Reprojection op and set the Parameter orthorectify to true.
For a graph usable as template you can type gpt Reproject -h.

There is wiki page which demonstrates how gpt could be used for bulk processing.
Once I have explained how to do bulk processing with the help of excel. The example is for Windows but can be easily translated to any OS.

But now the bad news. I think your data can't be orthorectified. I guess the
view angles are not provided or if they are, then they are not properly read.
You can check this in the GUI. If you can select you product in the Orthorectification dialog, everything is fine.
Flag Flag
RE: Orthorectify large numbers of .nc files
5/18/17 4:29 PM as a reply to Marco Peters.
Thank you Marco. I found I cannot even open the products in VISAT without a message that says "Pixels_per_Scan_Line" is missing.

I can reproject in SeaDAS GUI.

Dave
Flag Flag
RE: Orthorectify large numbers of .nc files
5/18/17 4:51 PM as a reply to David Warner.
Could be that this is fixed in SNAP. It is the successor of BEAM.
BEAM get's only very limited maintenance.

SeaDAS and BEAM/VISAT can behave differently.
Even though SeaDAS uses BEAM as basis, it has some extra fixes and extensions.
If the GUI of SeaDAS can open the file, then the gpt of SeaDAS should be able to handle it too.

Best
Marco
Flag Flag

 

Welcome to the BEAM Forum!

We encourage you to sign in our forum and participate in the BEAM community. The forum is maintained by the BEAM project team who will most likely answer your questions within 24 hours (except during common holidays) - if not done by other community members. Collaborate, share your knowledge and learn from other users!

If you don't find what you are looking for, please also consider the following external forums: