Write/Export image as a GeoTIFF file with GPT
Posted: Sun Jun 03, 2018 1:25 pm America/New_York
Hi everyone,
I am trying to export an image as a GeoTIFF file with the GPT. The input file(iFile.dim) is a Landsat 8 C1 image that I processed with L2gen, reprojected and subsetted to keep a few bands only.
I used the following command:
gpt.sh write.xml -Ssource=iFile.dim -t test.tif
where "write.xml" is:
<node id="anyNodeId">
<operator>Write</operator>
<sources>
<source>${anySourceNodeId}</source>
</sources>
<parameters>
<file>test.tif</file>
<formatName>GeoTIFF</formatName>
<deleteOutputOnFailure>true</deleteOutputOnFailure>
<writeEntireTileRows>true</writeEntireTileRows>
<clearCacheAfterRowWrite>true</clearCacheAfterRowWrite>
</parameters>
</node>
I am getting the error message below. Can anyone help me figure this out?
Thank you!
Alice
java.lang.ClassCastException: org.esa.beam.framework.gpf.graph.Node cannot be cast to org.esa.beam.framework.gpf.graph.Graph
at org.esa.beam.framework.gpf.graph.GraphIO.read(GraphIO.java:83)
at org.esa.beam.framework.gpf.main.DefaultCommandLineContext.readGraph(DefaultCommandLineContext.java:71)
at org.esa.beam.framework.gpf.main.CommandLineTool.readGraph(CommandLineTool.java:504)
at org.esa.beam.framework.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:305)
at org.esa.beam.framework.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:249)
at org.esa.beam.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:150)
at org.esa.beam.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:122)
at org.esa.beam.framework.gpf.main.GPT.run(GPT.java:54)
at org.esa.beam.framework.gpf.main.GPT.main(GPT.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.bc.ceres.launcher.Launcher.launch(Launcher.java:154)
at com.bc.ceres.launcher.Launcher.main(Launcher.java:56)
Error: org.esa.beam.framework.gpf.graph.Node cannot be cast to org.esa.beam.framework.gpf.graph.Graph
I am trying to export an image as a GeoTIFF file with the GPT. The input file(iFile.dim) is a Landsat 8 C1 image that I processed with L2gen, reprojected and subsetted to keep a few bands only.
I used the following command:
gpt.sh write.xml -Ssource=iFile.dim -t test.tif
where "write.xml" is:
<node id="anyNodeId">
<operator>Write</operator>
<sources>
<source>${anySourceNodeId}</source>
</sources>
<parameters>
<file>test.tif</file>
<formatName>GeoTIFF</formatName>
<deleteOutputOnFailure>true</deleteOutputOnFailure>
<writeEntireTileRows>true</writeEntireTileRows>
<clearCacheAfterRowWrite>true</clearCacheAfterRowWrite>
</parameters>
</node>
I am getting the error message below. Can anyone help me figure this out?
Thank you!
Alice
java.lang.ClassCastException: org.esa.beam.framework.gpf.graph.Node cannot be cast to org.esa.beam.framework.gpf.graph.Graph
at org.esa.beam.framework.gpf.graph.GraphIO.read(GraphIO.java:83)
at org.esa.beam.framework.gpf.main.DefaultCommandLineContext.readGraph(DefaultCommandLineContext.java:71)
at org.esa.beam.framework.gpf.main.CommandLineTool.readGraph(CommandLineTool.java:504)
at org.esa.beam.framework.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:305)
at org.esa.beam.framework.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:249)
at org.esa.beam.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:150)
at org.esa.beam.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:122)
at org.esa.beam.framework.gpf.main.GPT.run(GPT.java:54)
at org.esa.beam.framework.gpf.main.GPT.main(GPT.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.bc.ceres.launcher.Launcher.launch(Launcher.java:154)
at com.bc.ceres.launcher.Launcher.main(Launcher.java:56)
Error: org.esa.beam.framework.gpf.graph.Node cannot be cast to org.esa.beam.framework.gpf.graph.Graph