Simone Giannecchini wrote:

Hi Simone,

> I would try with something as simple as gdal_translate in.tif out.tiff
> to see if it s fixes the problem.

Id did it. This - at least - changes the error message: Source or 
destination region is empty.

Error: One factory fails for the operation "ImageRead"
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
        at 
javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
        at 
javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
        at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
        at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
        at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
        at javax.media.jai.RenderedOp.getWidth(RenderedOp.java:2179)
        at org.geotools.gce.geotiff.GeoTiffReader.read(GeoTiffReader.java:480)
        at 
de.komoot.hcn.server.analyser.filter.DEMAltitudeReader.addHeight(DEMAltitudeReader.java:42)
        at 
de.komoot.hcn.server.analyser.calculators.DEMReaderTest.testAddHeight(DEMReaderTest.java:28)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: 
Source or destination region is empty.
        at 
com.sun.media.jai.imageioimpl.ImageReadCRIF.create(ImageReadCRIF.java:317)
        ... 38 more
Caused by: java.lang.IllegalArgumentException: Source or destination region 
is empty.
        at 
com.sun.media.jai.imageioimpl.ImageReadOpImage.computeRegions(ImageReadOpImage.java:454)
        at 
com.sun.media.jai.imageioimpl.ImageReadOpImage.layoutHelper(ImageReadOpImage.java:257)
        at 
com.sun.media.jai.imageioimpl.ImageReadOpImage.<init>(ImageReadOpImage.java:473)
        at 
com.sun.media.jai.imageioimpl.ImageReadCRIF.create(ImageReadCRIF.java:309)
        ... 38 more

The gdal_info output for the new image is now:
Driver: GTiff/GeoTIFF
Files: test.tiff
Size is 3601, 3601
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235630016,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (9.999861111111111,53.000138888888891)
Pixel Size = (0.000277777777778,-0.000277777777778)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_DOCUMENTNAME=created at
  TIFFTAG_IMAGEDESCRIPTION=SILC TIFF
  TIFFTAG_SOFTWARE=IDL 6.3, Research Systems, Inc.
  TIFFTAG_DATETIME=2008:10:28 18:53:14
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (   9.9998611,  53.0001389) (  9d59'59.50"E, 53d 0'0.50"N)
Lower Left  (   9.9998611,  51.9998611) (  9d59'59.50"E, 51d59'59.50"N)
Upper Right (  11.0001389,  53.0001389) ( 11d 0'0.50"E, 53d 0'0.50"N)
Lower Right (  11.0001389,  51.9998611) ( 11d 0'0.50"E, 51d59'59.50"N)
Center      (  10.5000000,  52.5000000) ( 10d30'0.00"E, 52d30'0.00"N)
Band 1 Block=3601x1 Type=Int16, ColorInterp=Gray


Which is (as far as I can see) the same output without the warning message.

Cheers,

Jan
-- 
>From address is valid until 01.06.2010


------------------------------------------------------------------------------

_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to