marpet
September 26, 2016, 2:44pm
2
Hi Mark
All operators from the command line are also available via snappy. But you should not instantiate the operator classes directly as long as there is no very good reason for it. (However I wonder why it didn’t work.)
It is much better to invoke the operators via GPF.
I just posted this one:
The statistics operator is called as any other operator from python. The same for the index operators.
On the command line you can typegpt -h to get a list of all available operators.
You can find examples in the following threads:
snappy-where-to-start?
Example script for multiple operations?
If you invoke the statistics operator only with one product it should work as you expect it.
regards
Marco
Also helpful might be the links in:
Put your question regarding the usage of snappy, the snap-python interface or anything else related to Python and SNAP into this category. This could be questions regarding the access of the SNAP API from Python or implementing an operator in Python, all questions like this are best suited here.
Question regarding Sen2Cor should go into the sen2cor category.
General documentation about snappy can be found in How to use the SNAP API from Python of the Developer Guide . There is also a page which…
Currently you have to call
snappy.GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis()
once at the beginning of you script. In the next version this will not be necessary any more.
1 Like