Cannot Reproject L1 Browse files using gpt
Posted: Wed Mar 08, 2017 6:55 am America/New_York
Hi,
I was trying to batch process MODISA files from L1 to L3. When I tried to reproject or Mosaic the Local Area Coverage L1 browse files using gpt (Reproject & Mosaic operator) it is showing the following error.
java.lang.NullPointerException
at gov.nasa.gsfc.seadas.dataio.SeadasFileReader.<init>(SeadasFileReader.java:94)
at gov.nasa.gsfc.seadas.dataio.BrowseProductReader.<init>(BrowseProductReader.java:44)
at gov.nasa.gsfc.seadas.dataio.SeadasProductReader.readProductNodesImpl(SeadasProductReader.java:140)
at org.esa.beam.framework.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:173)
at org.esa.beam.gpf.operators.standard.ReadOp.initialize(ReadOp.java:77)
at org.esa.beam.framework.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:457)
at org.esa.beam.framework.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:236)
at org.esa.beam.framework.gpf.Operator.getTargetProduct(Operator.java:323)
at org.esa.beam.framework.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:74)
at org.esa.beam.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195)
at org.esa.beam.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.beam.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.beam.framework.gpf.graph.GraphContext.initOutput(GraphContext.java:162)
at org.esa.beam.framework.gpf.graph.GraphContext.<init>(GraphContext.java:91)
at org.esa.beam.framework.gpf.graph.GraphContext.<init>(GraphContext.java:64)
at org.esa.beam.framework.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:124)
at org.esa.beam.framework.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:84)
at org.esa.beam.framework.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:508)
at org.esa.beam.framework.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:356)
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:498)
at com.bc.ceres.launcher.Launcher.launch(Launcher.java:154)
at com.bc.ceres.launcher.Launcher.main(Launcher.java:56)
Error: java.lang.NullPointerException
But the brs file is opening in SeaDAS7.4 GUI and there I was able to reproject or mosaic these files.
Brs file is generated using the following command:
$SeaDASPath/run/bin/linux_64/l1brsgen ifile=$L1BFile ofile=$BrsFile geofile=$GEOFile atmocor=1 oformat=hdf4 oformat_depth=24bit subsamp=1 sline=1 \
eline=-999 spixl=1 epixl=-999 >$LogFile3
Gpt Command used for reprojection:
gpt.sh -e Reproject.xml -Ssource=$infile -PopReprojectFN=$ReprojOP
used xml file:(Reproject.xml)
--------------------------------------------------------------------------------------------------------------------------------------------------------------
graph id="Reproject">
<version>1.0</version>
<node id="Reprojection">
<operator>Reproject</operator>
<sources>
<source>${source}</source>
</sources>
<parameters>
<crs>GEOGCS["WGS84(DD)",
DATUM["WGS84",
SPHEROID["WGS84", 6378137.0, 298.257223563]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH]]</crs>
<resampling>Nearest</resampling>
<orthorectify>false</orthorectify>
<noDataValue>NaN</noDataValue>
<includeTiePointGrids>true</includeTiePointGrids>
<addDeltaBands>false</addDeltaBands>
</parameters>
</node>
<node id="writeNode">
<operator>Write</operator>
<sources>
<source>Reprojection</source>
</sources>
<parameters>
<file>${opReprojectFN}</file>
<formatName>NetCDF4-CF</formatName>
<writeEntireTileRows>true</writeEntireTileRows>
<clearCacheAfterRowWrite>false</clearCacheAfterRowWrite>
<deleteOutputOnFailure>true</deleteOutputOnFailure>
</parameters>
</node>
</graph>
-------------------------------------------------------------------------------------------------------------------------------------------------------------
These commands and graph files were working fine before installing SeaDAS 7.4 but Now SeaDAS GUI can do the job but GPT can't.
** Tried with increasing gpt memory, seadas memory upto 16 Gb.
Is it a problem of l1brsgen or GPT ?
Any suggestion is welcome.
I was trying to batch process MODISA files from L1 to L3. When I tried to reproject or Mosaic the Local Area Coverage L1 browse files using gpt (Reproject & Mosaic operator) it is showing the following error.
java.lang.NullPointerException
at gov.nasa.gsfc.seadas.dataio.SeadasFileReader.<init>(SeadasFileReader.java:94)
at gov.nasa.gsfc.seadas.dataio.BrowseProductReader.<init>(BrowseProductReader.java:44)
at gov.nasa.gsfc.seadas.dataio.SeadasProductReader.readProductNodesImpl(SeadasProductReader.java:140)
at org.esa.beam.framework.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:173)
at org.esa.beam.gpf.operators.standard.ReadOp.initialize(ReadOp.java:77)
at org.esa.beam.framework.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:457)
at org.esa.beam.framework.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:236)
at org.esa.beam.framework.gpf.Operator.getTargetProduct(Operator.java:323)
at org.esa.beam.framework.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:74)
at org.esa.beam.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195)
at org.esa.beam.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.beam.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.beam.framework.gpf.graph.GraphContext.initOutput(GraphContext.java:162)
at org.esa.beam.framework.gpf.graph.GraphContext.<init>(GraphContext.java:91)
at org.esa.beam.framework.gpf.graph.GraphContext.<init>(GraphContext.java:64)
at org.esa.beam.framework.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:124)
at org.esa.beam.framework.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:84)
at org.esa.beam.framework.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:508)
at org.esa.beam.framework.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:356)
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:498)
at com.bc.ceres.launcher.Launcher.launch(Launcher.java:154)
at com.bc.ceres.launcher.Launcher.main(Launcher.java:56)
Error: java.lang.NullPointerException
But the brs file is opening in SeaDAS7.4 GUI and there I was able to reproject or mosaic these files.
Brs file is generated using the following command:
$SeaDASPath/run/bin/linux_64/l1brsgen ifile=$L1BFile ofile=$BrsFile geofile=$GEOFile atmocor=1 oformat=hdf4 oformat_depth=24bit subsamp=1 sline=1 \
eline=-999 spixl=1 epixl=-999 >$LogFile3
Gpt Command used for reprojection:
gpt.sh -e Reproject.xml -Ssource=$infile -PopReprojectFN=$ReprojOP
used xml file:(Reproject.xml)
--------------------------------------------------------------------------------------------------------------------------------------------------------------
graph id="Reproject">
<version>1.0</version>
<node id="Reprojection">
<operator>Reproject</operator>
<sources>
<source>${source}</source>
</sources>
<parameters>
<crs>GEOGCS["WGS84(DD)",
DATUM["WGS84",
SPHEROID["WGS84", 6378137.0, 298.257223563]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH]]</crs>
<resampling>Nearest</resampling>
<orthorectify>false</orthorectify>
<noDataValue>NaN</noDataValue>
<includeTiePointGrids>true</includeTiePointGrids>
<addDeltaBands>false</addDeltaBands>
</parameters>
</node>
<node id="writeNode">
<operator>Write</operator>
<sources>
<source>Reprojection</source>
</sources>
<parameters>
<file>${opReprojectFN}</file>
<formatName>NetCDF4-CF</formatName>
<writeEntireTileRows>true</writeEntireTileRows>
<clearCacheAfterRowWrite>false</clearCacheAfterRowWrite>
<deleteOutputOnFailure>true</deleteOutputOnFailure>
</parameters>
</node>
</graph>
-------------------------------------------------------------------------------------------------------------------------------------------------------------
These commands and graph files were working fine before installing SeaDAS 7.4 but Now SeaDAS GUI can do the job but GPT can't.
** Tried with increasing gpt memory, seadas memory upto 16 Gb.
Is it a problem of l1brsgen or GPT ?
Any suggestion is welcome.
