I can pass all tests org.esa.snap.dataio.geotiffGeoTiffWriteReadTest
from maven command line.
However, I stumbled on this problem when running org.esa.snap.dataio.geotiffGeoTiffWriteReadTest
on eclipse. By default, my eclipse turns on java enable assertions switch.
When the enable assertions switch is turned on the following test cases will fail:
- testWriteReadUTMProjection
- testWriteReadTransverseMercator
- testWriteReadLambertConformalConic
The same test cases will fail in maven command line if enable assertions switch is turned on through maven surefire enableAssertions flag.
The assertion is caught by:
Upon further checking, the assertion for testWriteReadUTMProjection
and testWriteReadTransverseMercator
were caused by the following Affine Transform operations:
while testWriteReadLambertConformalConic
was caused by similar Affine Transform operations:
I could make the assertion pass for testWriteReadUTMProjection
and testWriteReadTransverseMercator
by reducing the Affine Transform operations to
imageToMap.translate(827933.23, 3729820.29);
However, I couldn’t find Affine Transform operation to pass the assertion for testWriteReadLambertConformalConic
.
Can anyone help?