#290 TIF image fails to add with error

Windows
open
nobody
5
2013-03-14
2013-03-14
Anonymous
No

Using the latest OpenJump 1.6.0RC1 PLUS version, I am trying to add a TIF image to a project using File->Add image layer and the application fails with the following error:

com.vividsolutions.jump.JUMPException: There were errors loading some images. Please check for imageless features with error attributes for details.
at com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatureCreator.getImages(ImageFeatureCreator.java:91)
at com.vividsolutions.jump.workbench.ui.plugin.imagery.AddImageLayerPlugIn.execute(AddImageLayerPlugIn.java:54)
at com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.actionPerformed(AbstractPlugIn.java:130)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Discussion

1 2 > >> (Page 1 of 2)
  • Jukka Rahkonen
    Jukka Rahkonen
    2013-03-14

    There are many kind of tiff files and OpenJUMP cannot open all variants. It would help to get a sample image or image info created with the gdalinfo utility
    http://www.gdal.org/gdalinfo.html

     

  • Anonymous
    2013-03-14

    The image that throws the error is larger than the maximum allowed size for uploading so I have uploaded it at this link:

    https://www.dropbox.com/s/6nxysqnju2g6jjs/crop_production_value.zip

     

  • Anonymous
    2013-03-14

    gdal info for tif file

     
    Attachments

  • Anonymous
    2013-03-14

    If I use the pirol raster image plugin, it works fine, but I encountered the following scenarios:

    Open OJ, Layers -> Add raster image layer works fine -> close OJ

    Open OK, File -> Add image layer -> error occurs -> Layers -> Add raster image layer -> error: you`re missing JAI? all factories fail for the operation fileload

    So apparently, when the Add image layer failed, it locked the JAI maybe, somehow, so that the pirol plugin cannot access it anymore

     
  • Jukka Rahkonen
    Jukka Rahkonen
    2013-03-14

    This is the gdalinfo report of the image

    C:\temp\crop_production_value>gdalinfo act2000_all_2000_val.tif
    Driver: GTiff/GeoTIFF
    Files: act2000_all_2000_val.tif
    Size is 4320, 2160
    Coordinate System is:
    GEOGCS["WGS 84",
    DATUM["WGS_1984",
    SPHEROID["WGS 84",6378137,298.257223563,
    AUTHORITY["EPSG","7030"]],
    AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
    Origin = (-180.000000000000000,90.000000000000000)
    Pixel Size = (0.083333333333333,-0.083333333333333)
    Metadata:
    AREA_OR_POINT=Area
    Image Structure Metadata:
    COMPRESSION=LZW
    INTERLEAVE=BAND
    Corner Coordinates:
    Upper Left (-180.0000000, 90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"N)
    Lower Left (-180.0000000, -90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"S)
    Upper Right ( 180.0000000, 90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"N)
    Lower Right ( 180.0000000, -90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"S)
    Center ( 0.0000000, 0.0000000) ( 0d 0' 0.01"E, 0d 0' 0.01"N)
    Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
    NoData Value=0
    Overviews: 2160x1080, 1080x540, 540x270, 270x135, 135x68
    Unit Type: unspecified

    Analysis:
    1) It is a 32-bit greyscale image and standard OJ image drivers can not handle it.
    2) It is compressed with LZW algorithm and Sextante cannot open it

    How to cure:
    1) Convert to uncompressed tiff file with TFW file. TFW is needed because Sextante seems to require it. Conversion can be done with gdal_translate with this command:

    gdal_translate -co TFW=YES act2000_all_2000_val.tif converted.tif

    The converted image works OK through Sextante image.

     
  • ede
    ede
    2013-03-15

    as you have a worldfile accompanying the tiff file, you can as well use the image editor of your choice to open and save an uncompressed tiff file.

    a quick test using irfanview worked flawlessly. open via
    Add image layer
    Sextante image
    worked fine with the latest snapshot.

    ..ede

     

  • Anonymous
    2013-03-16

    Regarding this issue, I have another problem, after throwing the error when adding an image layer, OJ seems to lock the file so that when I try JAI.create("fileload", filepath) or JAI.create("stream", filepath) I get an error are you missing JAI

    Does anyone have any idea on how to unlock the file or avoid this error?

     
  • ede
    ede
    2013-03-16

    aside from closing OJ probably nothing you can do. probably a bug where the resource is not released properly.

    ..ede

     

  • Anonymous
    2013-03-16

    What about inside OJ? Is there a way to release the file in GeoTIFFImage or GeoReferencedRaster or in ImageFeatureCreator when creating the features or after creating them?
    Or is the image locked by JAI itself?

     
  • ede
    ede
    2013-03-16

    just had a look, seems like cleaning up was never implemented ;(.. and i remember we have a general issue, read "memleak", with image layers in general, as they are not properly cleaned up.

    ..ede

     
1 2 > >> (Page 1 of 2)