Sen2Coral - Grid-tie error

Hi,

I have been trying to process some files using the Sen2Coral Empirical Bathymetry tool. I keep running into the same error with multiple files where upon pressing Run it instantly fails with the error “already contains a tie-point grid with the name ‘tco3’”. No idea what this is or where this name came from. Below is the full error code.

I would be vert grateful for some feedback on how to debug this.

java.lang.IllegalArgumentException: The Product 'S2B_MSIL1C_20220118T143719_N0301_R096_T19HCD_20220118T180443_empiricalBathymetry' already contains a tie-point grid with the name 'tco3'.
	at org.esa.snap.core.datamodel.Product.addTiePointGrid(Product.java:1014)
	at org.esa.snap.core.util.ProductUtils.copyTiePointGrid(ProductUtils.java:793)
	at org.esa.snap.core.gpf.pointop.PointOperator$ProductConfigurerImpl.copyTiePointGrids(PointOperator.java:620)
	at org.esa.snap.core.gpf.pointop.PointOperator.configureTargetProduct(PointOperator.java:176)
	at org.esa.snap.core.gpf.pointop.PointOperator.initialize(PointOperator.java:92)
	at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:528)
	at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:298)
	at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:385)
	at org.esa.snap.core.gpf.GPF.createProductNS(GPF.java:333)
	at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:308)
	at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:287)
	at org.esa.snap.core.gpf.ui.DefaultSingleTargetProductDialog.createTargetProduct(DefaultSingleTargetProductDialog.java:138)
[catch] at org.esa.snap.core.gpf.ui.SingleTargetProductDialog.onApply(SingleTargetProductDialog.java:131)
	at org.esa.snap.ui.AbstractDialog.lambda$initUI$6(AbstractDialog.java:519)
	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.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6539)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6304)
	at java.awt.Container.processEvent(Container.java:2239)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
	at java.awt.Container.dispatchEventImpl(Container.java:2283)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
	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:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	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)

Hi,

from the major S2 update the Sentinel2 reader embedded the EMCWFT data as tiepoint grids.
Try to disable the sentinel 2 auxilary data in the option panel Tools>Options>S2TBX>Sentinel2 reader.

Hi,

Thanks for this. I unchecked EMCWFT, leaving CAMS still checked and it worked a charm.

Thanks, made my week with this. Almost threw my computer in the bin. :smiley:

Hi FlorianD,
I have got a similar problem but these solutions do not seem to be working. I am trying to complete the deglint process but I get this:

Thanks in advance

java.lang.IllegalArgumentException: The Product ‘subset_4_of_subset_0_of_June_20_2B_resampled_deglint’ already contains a tie-point grid with the name ‘tco3’.
at org.esa.snap.core.datamodel.Product.addTiePointGrid(Product.java:1014)
at org.esa.snap.core.util.ProductUtils.copyTiePointGrid(ProductUtils.java:793)
at org.esa.sen2coral.algorithms.PointOperatorMultisize$ProductConfigurerImpl.copyTiePointGrids(PointOperatorMultisize.java:603)
at org.esa.sen2coral.algorithms.PointOperatorMultisize.configureTargetProduct(PointOperatorMultisize.java:154)
at org.esa.sen2coral.algorithms.PointOperatorMultisize.initialize(PointOperatorMultisize.java:91)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:528)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:298)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:385)
at org.esa.snap.core.gpf.GPF.createProductNS(GPF.java:333)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:308)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:287)
at org.esa.snap.core.gpf.ui.DefaultSingleTargetProductDialog.createTargetProduct(DefaultSingleTargetProductDialog.java:138)
[catch] at org.esa.snap.core.gpf.ui.SingleTargetProductDialog.onApply(SingleTargetProductDialog.java:131)
at org.esa.snap.ui.AbstractDialog.lambda$initUI$6(AbstractDialog.java:519)
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.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
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)

Hi Amar,

The error indicate the same kind of issue due to the creation of ECMWFT tiepoint grid during the process. The same workaround consisting to exclude ECMWFT data should be work.
(Try to disable the sentinel 2 auxilary data in the option panel Tools>Options>S2TBX>Sentinel2 reader.)
Otherwise, how do you use sen2coral ?
-from SNAP GUI
-from SNAP CLI
-from pyhton API
Maybe the option to exclude the tiepointgrid data is not considered.

Best regards,
Florian

2 Likes

Dear Florian
I’m also encountering the same error “already contains a tie-point grid with the name ‘tco3’”. I also tried your solution of disabling the sentinel 2 auxilary data in the option panel Tools>Options>S2TBX>Sentinel2 reader.

But sill the error persists. Could you please help me?
Thanks in advance

1 Like

Hi Elamurrp

I had the same issue, with no success with the suggestions above.

If found however another way of achiving deglinting in SNAP, by using the algorithms as demonstrated in this tutorial video:

2 Likes

hello, i have a same problem, but its not ‘tco3’, i got ‘aod550’

java.lang.IllegalArgumentException: The Product ‘subset_0_of_S2A_MSIL1C_20231014T030651_N0509_R075_T48MWU_20231014T054513_deglint’ already contains a tie-point grid with the name ‘aod550’.
at org.esa.snap.core.datamodel.Product.addTiePointGrid(Product.java:1021)
at org.esa.snap.core.util.ProductUtils.copyTiePointGrid(ProductUtils.java:793)
at org.esa.sen2coral.algorithms.PointOperatorMultisize$ProductConfigurerImpl.copyTiePointGrids(PointOperatorMultisize.java:603)
at org.esa.sen2coral.algorithms.PointOperatorMultisize.configureTargetProduct(PointOperatorMultisize.java:154)
at org.esa.sen2coral.algorithms.PointOperatorMultisize.initialize(PointOperatorMultisize.java:91)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:528)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:298)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:385)
at org.esa.snap.core.gpf.GPF.createProductNS(GPF.java:333)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:308)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:287)
at org.esa.snap.core.gpf.ui.DefaultSingleTargetProductDialog.createTargetProduct(DefaultSingleTargetProductDialog.java:138)
[catch] at org.esa.snap.core.gpf.ui.SingleTargetProductDialog.onApply(SingleTargetProductDialog.java:131)
at org.esa.snap.ui.AbstractDialog.lambda$initUI$6(AbstractDialog.java:519)
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.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
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)

Hi there, I was running SNAP V6, operating the Empirical Bathymetry Processor. I then upgraded to V9, and have started getting this exact error. I was wondering if you ever found a fix for this?

@Iqbal Apologies. After unticking the auxiliary data checkbox, I reloaded SNAP and the error has gone

I fixed this error by unchecking aux data in the GUI. However, now I want to work in the command line. I was wondering if there was a way to apply these settings in the cmd line.