Scala and SNAP

Hi there,

Apologies if this is the wrong place to ask but I’m planning to convert my Python processing pipeline for SAR imagery to Scala code to run on a Hadoop environment. As SNAP is written in Java I assume I could use it within Scala, is there a Maven dependency for the SNAP engine? How would I go about calling SNAP engine code within a Java development environment? It was somewhat easier with Python as snappy was a great interface between the two.

Sorry for the slightly inexperienced question!

Many thanks,


Have a look at the code here

For maven, you would need the snap-repo

        <name>Public Maven Repository for SNAP</name>

I don't believe there is a single snap artifact to include all modules. You may need to include dependencies to the modules you use.

Typically, we do not claim to offer first class support for a language/framework on Snap unless we provide some basic heuristics to help users set up their builds. Based on this defintion, Snap currently supports Ruby, Rails & Java builds. However, Snap can run builds for any JVM based language. In this post, I will talk about how to set up a build for simple Scala/Play project.

If you have your own project on GitHub you can use that. You would need to add sbt-laucher to your project if not present and a script to invoke it. This might look something like

curl -LO
echo ‘java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -jar dirname $0/sbt-launch.jar “$@”’ > sbt
chmod u+x sbt