Can't open safed .dim files in SNAP ; Error: angle is too high

Hello,
sorry for asking this much today.
I have a problem with open products in SNAP Desktop, which I saved.

I can open any .xml-file in SNAP, which I downloaded and unzipped before, but when I save them as a .dim-file I can’t open them. Even if I changed nothing.

This is the error-message I get (show details):

java.lang.IllegalArgumentException: Angle 13,781,154,243.522 is too high.
at org.geotools.measure.AngleFormat.format(AngleFormat.java:702)
at org.geotools.measure.AngleFormat.format(AngleFormat.java:939)
at org.geotools.measure.AngleFormat.format(AngleFormat.java:861)
at org.geotools.measure.Angle.toString(Angle.java:164)
at java.text.MessageFormat.subformat(MessageFormat.java:1280)
at java.text.MessageFormat.format(MessageFormat.java:865)
at java.text.Format.format(Format.java:157)
at org.geotools.resources.IndexedResourceBundle.getString(IndexedResourceBundle.java:490)
at org.geotools.resources.i18n.Errors.format(Errors.java:76)
at org.geotools.referencing.operation.projection.MapProjection.verifyGeographicRanges(MapProjection.java:500)
at org.geotools.referencing.operation.projection.MapProjection.access$000(MapProjection.java:86)
at org.geotools.referencing.operation.projection.MapProjection$Inverse.transform(MapProjection.java:1033)
at org.geotools.referencing.operation.projection.MapProjection$Inverse.transform(MapProjection.java:1072)
at org.geotools.referencing.operation.transform.AbstractMathTransform.transform(AbstractMathTransform.java:236)
at org.geotools.referencing.operation.transform.ConcatenatedTransformDirect.transform(ConcatenatedTransformDirect.java:68)
at org.geotools.referencing.CRS.transform(CRS.java:1283)
at org.geotools.referencing.CRS.transform(CRS.java:1349)
at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:631)
at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:586)
at org.esa.snap.core.datamodel.CrsGeoCoding.detect180MeridianCrossing(CrsGeoCoding.java:291)
at org.esa.snap.core.datamodel.CrsGeoCoding.(CrsGeoCoding.java:162)
at org.esa.snap.core.dataio.dimap.DimapProductHelpers.createCrsGeoCoding(DimapProductHelpers.java:507)
at org.esa.snap.core.dataio.dimap.DimapProductHelpers.createGeoCoding(DimapProductHelpers.java:268)
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.dataio.ProductIO.readProduct(ProductIO.java:161)
at org.esa.snap.rcp.actions.file.ReadProductOperation.run(ReadProductOperation.java:51)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)

If I go first over the red error sign in the bottom right corner there stands something about angle xxxx is to high.
And every time it’s the same error. With modified versions of the product, too.

Somebody an idea how to fix this?
Thank you, Mara

I guess you are using S2 data.
This error has been already reported some time ago.

But it seems it is not fixed yet.

Is there any other method to save a session? Or only a mask and use this later?
Without saving it is kind of useless for me to create masks. :neutral_face:

EDIT:

I updated my SNAP and it is really not fixed.

Hi @MaraM,

I am not able to reproduce the error, please, could you explain in detail what are you doing exactly to get the error and with what product?

Hello,

of course.

I open the normal xml-file in SNAP Desktop. I used the product “S2A_MSIL1C_20170307T130941_N0204_R052_T22ECQ_20170307T130935”.

Next I want to save the product - with changes or without doesn’t matter for the error message. Thus, I save the product as a “MTD_MSIL1C.dim” .dim-file. And close the product, which I generated with the original .xml-file.

As a next step I try to open the “MTD_MSIL1C.dim” file again. But SNAP opens nothing. The only reaction is the red error sign in the bottom right corner which says:
“Unexpected Exception
Show and Report Problem
Angle 13.781.154.243.522 is too high.”

And if I click on this button I get the following details:

java.lang.IllegalArgumentException: Angle 13,781,154,243.522 is too high.
at org.geotools.measure.AngleFormat.format(AngleFormat.java:702)
at org.geotools.measure.AngleFormat.format(AngleFormat.java:939)
at org.geotools.measure.AngleFormat.format(AngleFormat.java:861)
at org.geotools.measure.Angle.toString(Angle.java:164)
at java.text.MessageFormat.subformat(MessageFormat.java:1280)
at java.text.MessageFormat.format(MessageFormat.java:865)
at java.text.Format.format(Format.java:157)
at org.geotools.resources.IndexedResourceBundle.getString(IndexedResourceBundle.java:490)
at org.geotools.resources.i18n.Errors.format(Errors.java:76)
at org.geotools.referencing.operation.projection.MapProjection.verifyGeographicRanges(MapProjection.java:500)
at org.geotools.referencing.operation.projection.MapProjection.access$000(MapProjection.java:86)
at org.geotools.referencing.operation.projection.MapProjection$Inverse.transform(MapProjection.java:1033)
at org.geotools.referencing.operation.projection.MapProjection$Inverse.transform(MapProjection.java:1072)
at org.geotools.referencing.operation.transform.AbstractMathTransform.transform(AbstractMathTransform.java:236)
at org.geotools.referencing.operation.transform.ConcatenatedTransformDirect.transform(ConcatenatedTransformDirect.java:68)
at org.geotools.referencing.CRS.transform(CRS.java:1283)
at org.geotools.referencing.CRS.transform(CRS.java:1349)
at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:631)
at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:586)
at org.esa.snap.core.datamodel.CrsGeoCoding.detect180MeridianCrossing(CrsGeoCoding.java:291)
at org.esa.snap.core.datamodel.CrsGeoCoding.(CrsGeoCoding.java:162)
at org.esa.snap.core.dataio.dimap.DimapProductHelpers.createCrsGeoCoding(DimapProductHelpers.java:507)
at org.esa.snap.core.dataio.dimap.DimapProductHelpers.createGeoCoding(DimapProductHelpers.java:268)
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.dataio.ProductIO.readProduct(ProductIO.java:161)
at org.esa.snap.rcp.actions.file.ReadProductOperation.run(ReadProductOperation.java:51)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)

EDIT:

I checked it with an other product. This time I used: “S2A_MSIL1C_20170303T115251_N0204_R137_T21CVU_20170303T115251” and it’s an other angle - but basically the error message is the same.

SECOND EDIT:

I have an other computer with SNAP Desktop with other products and I tried it there. I used: “S2A_MSIL1C_20170125T102141_N0204_R036_T24CWC_20170125T102143” and saved it and tried to open it. But it’s the same error message with a different angle. Thus it’s not my computer. :slight_smile:

Thank you @MaraM, finally I have been able to reproduce the error. It is not exactly the same that was reported here:
https://senbox.atlassian.net/projects/SIITBX/issues/SIITBX-252
In this case, it seems to be a problem with the Dimap reader. It should be fixed in the coming module update.

Meanwhile, if you are not interested in the sun and view angles, if you remove them before saving the product, it should work.

Thank you.
I have found an other way to save my masks. :slight_smile:

But probably I need it later.

Just for your info: I updated my snap and the problem is still the same. :slight_smile:

EDIT: I have an “Not all of the plugins have been successfully downloaded. The server may be unavailable at the moment. Try again later.” error-message. I will test it later. Sorry. :slight_smile:

Hi Mara,

the last update concerns only to the Sentinel-2 Toolbox, the problem should be fixed in the coming update for SNAP Engine kit module.

Ok thanks for the info. I thought it would be this update. :slight_smile: