Vegetation index - batch process

Hi everyone,

My aim in this project is to calculate various index for multiple images at the same time.

I’m using SNAP in MAC.

Firstly, I created a GRAPH BUILDER (Read -> Tndviop -> Write)

When I try to run the batch process, the Tndviop model has some problems:

“Unable to load graph /Users/.snap/graphs/Tndviop.xml”

"Unexpected exception:

java.lang.NullPointerException
at org.esa.s2tbx.radiometry.RadiometricIndicesPanel.setMessage(RadiometricIndicesPanel.java:236)
at org.esa.s2tbx.radiometry.RadiometricIndicesPanel.checkResampling(RadiometricIndicesPanel.java:195)
at org.esa.s2tbx.radiometry.RadiometricIndicesPanel.lambda$null$2(RadiometricIndicesPanel.java:88)
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:328)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
at com.bc.ceres.binding.Property.setValue(Property.java:176)
at com.bc.ceres.binding.PropertyContainer.setValue(PropertyContainer.java:297)
at com.bc.ceres.swing.binding.internal.BindingImpl.setPropertyValue(BindingImpl.java:114)
at com.bc.ceres.swing.binding.internal.ComboBoxAdapter.adjustProperty(ComboBoxAdapter.java:112)
at com.bc.ceres.swing.binding.internal.ComboBoxAdapter.adjustComboBoxModel(ComboBoxAdapter.java:104)
at com.bc.ceres.swing.binding.internal.ComboBoxAdapter.bindComponents(ComboBoxAdapter.java:56)
at com.bc.ceres.swing.binding.BindingContext.bind(BindingContext.java:217)
at com.bc.ceres.swing.binding.internal.SingleSelectionEditor.createEditorComponent(SingleSelectionEditor.java:47)
at com.bc.ceres.swing.binding.PropertyEditor.createComponents(PropertyEditor.java:53)
at com.bc.ceres.swing.binding.PropertyPane.createPanel(PropertyPane.java:74)
at org.esa.s2tbx.radiometry.RadiometricIndicesPanel.createPanel(RadiometricIndicesPanel.java:100)
at org.esa.s2tbx.radiometry.RadiometricIndicesUI.CreateOpTab(RadiometricIndicesUI.java:46)
at org.esa.snap.graphbuilder.rcp.dialogs.BatchGraphDialog.addGraphTabs(BatchGraphDialog.java:448)
[catch] at org.esa.snap.graphbuilder.rcp.dialogs.BatchGraphDialog.LoadGraph(BatchGraphDialog.java:245)
at org.esa.snap.graphbuilder.rcp.dialogs.support.GraphsMenu$1.actionPerformed(GraphsMenu.java:94)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:157)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

“”

Anyone can help me??

Thank you!!

What input data are you using?

Hi,

I’m using “sen2cor” corrected files (2A).

I think this is fixed in the latest update of the S2 Toolbox.

How can I update that?

Thanks

You should see regularly messages popping up and also a little globe with an arrow in the lower right corner. When you click on it you get to the update dialog.
You can also go to Help / Check for Updates or to Tools / Plugins to get the latest module updates.

Okey,

So I have a new problem,

I did a model to resample images.

Read --> Resample --> write

My problem is when reading files in the batch process. What do I have to read??

I read this:

S2A_USER_PRD_MSIL2A_PDMC_20160710T182241_R051_V20160710T105247_20160710T105247.SAFE
S2A_USER_PRD_MSIL2A_PDMC_20160913T083419_R094_V20160911T105652_20160911T110438.SAFE

Problem: “No product reader found file ./…/…/S2A_USER_PRD_MSIL2A_PDMC_20160710T182241_R051_V20160710T105247_20160710T105247.SAFE”

What can i do?

Thanks

did you check if the data is complete? Are the sizes of both folders more or less the same?

Hi,

Now its working but just with this files:

S2A_USER_PRD_MSIL2A_PDMC_20160710T182241_R051_V20160710T105247_20160710T105247.SAFE

No with this ones:

S2A_MSIL2A_20170218T110111_N0204_R094_T30TXM_20170218T110125.SAFE

I mean, it works with the second ones, but they overwrite as:

MTD_MSIL2A.xml

So there is no point on batch processing them

How can I save them in a different name?

Thanks