Hi Everyone,
I’m experiencing an odd problem when attempting to use gpt (snap 7.0, unix) in batch processing mode while trying to crop an S2 product via geo coordinates.
When running a command such as:
gpt ${graphXmlPath} -e -p ${parameterFilePath} -t ${targetFile} ${sourceFile}
I get the following stack trace:
java.lang.NullPointerException
at org.esa.snap.core.gpf.common.SubsetOp.initialize(SubsetOp.java:210)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:486)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:273)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:387)
…
Error: java.lang.NullPointerException
Some of the strangeness:
- This works just fine if I apply the same subset via the SNAP visual interface (same geo coordinates)
- This works just fine if I use my laptop’s windows installation to apply the same subset, both using the visual interface and gpt directly from command prompt (same xml graph, properties file, etc.)
- The line of code that throws the NPE shouldn’t even be run (?). If I’m reading things correctly, that line is only executed if the geo region defined is null (which I know it isn’t!)
Any thoughts on this? I did a search on this forum and JIRA and didn’t spot it as a duplicate, but please let me know if I have missed this discussion somewhere else.
Thanks for any insight, or help with the issue. It is much appreciated!