Migrating BEAM code to SNAP

I have some BEAM java code that runs an algorithm on MERIS data. The code could be launched from the command line or the UI. I will be migrating it to Sentinel-2.

Can anyone give any advice on how to port something from BEAM to SNAP? Any documents, utilities, advice?

Some examples of the imports used:

import org.esa.beam.framework.dataio.ProductIO;
import org.esa.beam.framework.dataio.ProductIOPlugInManager;
import org.esa.beam.framework.datamodel.Product;
import org.esa.beam.framework.param.ParamProperties;
import org.esa.beam.framework.processor.ProcessorUtils;
import org.esa.beam.util.math.MathUtils;
import org.esa.beam.framework.processor.ui.ProcessorUI;

Many thanks for any help !!!

Olly

I’m sorry, but for the migration there is no documentation.

Most of the classes are now in some other packages. The easiest way to find out in which is to simply delete the import statements and let your IDE find classes and add the new import statements.

import org.esa.snap.core.dataio.ProductIO
import org.esa.snap.core.dataio.ProductIOPlugInManager
import org.esa.snap.core.datamodel.Product
import org.esa.snap.core.util.math.MathUtils

I think you don’t need the classes ParamProperties, ProcessorUtils and ProcessorUI any more.
They belong to the old processing framework of BEAM 3. This is not supported any more.
You should move to GPF. How to implement a processor for GPF is documented in our Developer Guide.
You can also have a look at the example on GitHub.

The documentation could be more exhaustive. If you have further question feel free to ask again.