This is weird but for me the eka.tif opens as 1-band image through the Sextante 
Raster Image. However, a subsample that I made by cropping and saving with the 
OpenJUMP crop tool opens as 2-band. I could not find any fundamental difference 
between the tiffs with gdalinfo and tiffdump.

And now while writing I got it! The 2-band tiff written with the GDAL defaults 
is using per band interleaving but at least on my machine Sextante reports the 
second band only if tiff has been written as pixel interleaved.

This is so difficult issue that it may be better to forget it for now.

-Jukka-


________________________________________
Lähettäjä: edgar.sol...@web.de <edgar.sol...@web.de>
Lähetetty: 13. tammikuuta 2020 12:18
Vastaanottaja: jump-pilot-devel@lists.sourceforge.net
Aihe: Re: [JPP-Devel] Some issue with raster color styles and legend

Peppe,

if you want the fixed RasterLegendPlugin in the OJ 1.15, please do so soonish. 
generally i'm inclined to release this month still.

..ede

On 13.01.2020 10:32, Giuseppe Aruta wrote:
> Hi Jukka,
> the file that you attached (eka.tif) seems to have 2 bands (raster
> layer info too on layer tree). Raster style legend should be
> deactivated in this case as it works only with monoband raster layers.
>
> Best regard
> Peppe
>
>
>
> Il giorno dom, 12/01/2020 alle 18.31 +0000, Rahkonen Jukka (MML) ha
> scritto:
>> Hi,
>>
>> My environment:
>> openjdk version "1.8.0_232"; OpenJDK Runtime Environment Corretto-
>> 8.232.09.1 (build 1.8.0_232-b09); OpenJDK 64-Bit Server VM Corretto-
>> 8.232.09.1 (build 25.232-b09 mixed mode)
>>
>> OJ-r6217-Plus
>>
>> Issue: Open the attached 16-bit image (I will send a link later if
>> attachment is dropped) as Sextante image and try to open the raster
>> style legend by pressing the + in the layer lists. This leads to an
>> exception:
>>
>> Exception in thread "AWT-EventQueue-0"
>> java.lang.IllegalArgumentException: User must specify at least 2
>> colors
>>         at
>> java.awt.MultipleGradientPaint.<init>(MultipleGradientPaint.java:169)
>>         at
>> java.awt.LinearGradientPaint.<init>(LinearGradientPaint.java:286)
>>         at
>> java.awt.LinearGradientPaint.<init>(LinearGradientPaint.java:244)
>>         at
>> java.awt.LinearGradientPaint.<init>(LinearGradientPaint.java:139)
>>         at
>> org.openjump.core.rasterimage.styler.ui.GradientCanvas.paint(Gradient
>> Canvas.java:92)
>>         at javax.swing.JComponent.paintChildren(JComponent.java:889)
>>         at javax.swing.JComponent.paint(JComponent.java:1065)
>>         at javax.swing.JComponent.paintChildren(JComponent.java:889)
>>         at javax.swing.JComponent.paint(JComponent.java:1065)
>>         at javax.swing.JComponent.paintChildren(JComponent.java:889)
>>         at javax.swing.JComponent.paint(JComponent.java:1065)
>>         at
>> org.openjump.core.rasterimage.styler.RasterLegendPlugIn.save(RasterLe
>> gendPlugIn.java:314)
>>         at
>> org.openjump.core.rasterimage.styler.RasterLegendPlugIn$3.actionPerfo
>> rmed(RasterLegendPlugIn.java:226)
>>         at
>> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:20
>> 22)
>>         at
>> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
>> a:2348)
>>         at
>> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
>> .java:402)
>>         at
>> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259
>> )
>>         at
>> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
>> istener.java:252)
>>         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.doIntersectionP
>> rivilege(ProtectionDomain.java:74)
>>         at
>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP
>> rivilege(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.doIntersectionP
>> rivilege(ProtectionDomain.java:74)
>>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
>>         at
>> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
>> ad.java:205)
>>         at
>> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
>> java:116)
>>         at
>> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
>> ad.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)
>>
>> -Jukka Rahkonen-
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>



_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Attachment: crop.tfw
Description: crop.tfw

_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to