Which I see the xml graph in SNAP Desktop, then use the parameters in command line is ok. But when I am running biophysical after resample it has error like above.
I also try using the gpt in command like this using the xml graph that build from graph builder like this in graph attachmentgraph.xml (1.2 KB)
then I run it and there is an error like this
gpt C:\Users\Iqbal.snap\snap-python\snappy\20180901\MEN\graph.xml C:\Users\Iqbal.snap\snap-python\snappy\20180901\MEN\biophysical.dim
INFO: org.esa.snap.python.gpf.PyOperatorSpi: Python operator ‘py_sambuca_snap_op’ registered (Python module: ‘sambuca_snap_op’, class: ‘sambuca_snap_op’, root: ‘C:\Users\Iqbal\AppData\Roaming\SNAP\modules\org-esa-sen2coral-sen2coral-inversion.jar’)
INFO: org.esa.snap.python.gpf.PyOperatorSpi: Python operator ‘S2RutOp’ registered (Python module: ‘s2_rut’, class: ‘S2RutOp’, root: ‘C:\Users\Iqbal\AppData\Roaming\SNAP\modules\org-esa-snap-snap-rut.jar’)
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
Executing processing graph
INFO: org.hsqldb.persist.Logger: dataFileCache open start
done.
java.lang.IllegalArgumentException: Angle 9,796,329,224,981.223 is too high.
at org.geotools.measure.AngleFormat.format(AngleFormat.java:703)
at org.geotools.measure.AngleFormat.format(AngleFormat.java:940)
at org.geotools.measure.AngleFormat.format(AngleFormat.java:862)
at org.geotools.measure.Angle.toString(Angle.java:165)
at java.text.MessageFormat.subformat(Unknown Source)
at java.text.MessageFormat.format(Unknown Source)
at java.text.Format.format(Unknown Source)
at org.geotools.resources.IndexedResourceBundle.getString(IndexedResourceBundle.java:491)
at org.geotools.resources.i18n.Errors.format(Errors.java:77)
at org.geotools.referencing.operation.projection.MapProjection.verifyGeographicRanges(MapProjection.java:508)
at org.geotools.referencing.operation.projection.MapProjection.access$000(MapProjection.java:86)
at org.geotools.referencing.operation.projection.MapProjection$Inverse.transform(MapProjection.java:1066)
at org.geotools.referencing.operation.projection.MapProjection$Inverse.transform(MapProjection.java:1105)
at org.geotools.referencing.operation.transform.AbstractMathTransform.transform(AbstractMathTransform.java:237)
at org.geotools.referencing.operation.transform.ConcatenatedTransformDirect.transform(ConcatenatedTransformDirect.java:68)
at org.geotools.referencing.CRS.transform(CRS.java:1345)
at org.geotools.referencing.CRS.transform(CRS.java:1413)
at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:689)
at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:635)
at org.esa.snap.core.datamodel.CrsGeoCoding.detect180MeridianCrossing(CrsGeoCoding.java:367)
at org.esa.snap.core.datamodel.CrsGeoCoding.(CrsGeoCoding.java:162)
at org.esa.snap.core.dataio.dimap.DimapProductHelpers.createCrsGeoCoding(DimapProductHelpers.java:578)
at org.esa.snap.core.dataio.dimap.DimapProductHelpers.createGeoCoding(DimapProductHelpers.java:289)
at org.esa.snap.core.dataio.dimap.DimapProductReader.initGeoCodings(DimapProductReader.java:164)
at org.esa.snap.core.dataio.dimap.DimapProductReader.processProduct(DimapProductReader.java:153)
at org.esa.snap.core.dataio.dimap.DimapProductReader.readProductNodesImpl(DimapProductReader.java:117)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:169)
at org.esa.snap.core.gpf.common.ReadOp.initialize(ReadOp.java:116)
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)
at org.esa.snap.core.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:77)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.core.gpf.graph.GraphContext.initOutput(GraphContext.java:162)
at org.esa.snap.core.gpf.graph.GraphContext.(GraphContext.java:91)
at org.esa.snap.core.gpf.graph.GraphContext.(GraphContext.java:64)
at org.esa.snap.core.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:128)
at org.esa.snap.core.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:86)
at org.esa.snap.core.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:534)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:388)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:287)
at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:188)
at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:121)
at org.esa.snap.core.gpf.main.GPT.run(GPT.java:54)
at org.esa.snap.core.gpf.main.GPT.main(GPT.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.esa.snap.runtime.Launcher.lambda$run$0(Launcher.java:55)
at org.esa.snap.runtime.Engine.runClientCode(Engine.java:189)
at org.esa.snap.runtime.Launcher.run(Launcher.java:51)
at org.esa.snap.runtime.Launcher.main(Launcher.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:62)
at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:101)
at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:16)
The error is not related to the Biophysical operator, but to the input product.
How have you resampled the product? Which parameters?
Can you open the product in SNAP Desktop with this product?
The step I use is first to resample using the command line snappy then try to use biophysical parameter and it has error like above but for ‘NdviOp’ is ok. I try to open the result of resample in SNAP it doesnt show anything or the open file. Now I am trying to run again but save it in my external disk. Hope it is ok. I’ll let you know after this.
I try to save in external disk, it doesnt work or cant open the resample product process from command line snappy. But the processing of resample using command line snappy is working. Hope you can help what is the problem? Thank you.
Without more information about how you resample it is hard to say what’s going on.
Can you provide the resampled data?
I’ll send you a link where you can upload it.
I had a look at your data.
The one processed with SNAP Desktop is healthy. The one from the command line done with gpt is not resampled. It still has the bands in multiple resolutions. Actually, this should also work. The Dimap format supports it. But for some reason, the product is corrupted. I don’t know why.
In general, if you want to resample on the command line you only need to do:
-PreferenceBand=B2 - this selects the band which defines the target resolution. So no need to specify other bands. All bands will be resampled to the resolution of this band. -t <FILE_PATH> - the ‘-t’ option defines the location of the target file.
You can get more help by calling gpt -h for general help. Or gpt resample -h for the resampling operator
in addition to what @marpet replied: no need to use B2; B2 is just one example. you can choose whichever of the bands you want as the reference - all (other) bands will be resampled to your chosen reference band’s resolution.