Re: [JPP-Devel] Some issue with raster color styles and legend

2020-01-13 Thread Giuseppe Aruta
AFAIF I found the same problem opening ASTER DEM TIF files. In that
case the file were coded as 16int and were reported into OJ as 2 band
raster files. No way to use Raster calculator of Sextante. The files
are quite big and Sextante was going out of memoryThe solution was to
use imagej+bio-format plugin (check on web). The alternative was Fiji
(an advanced version of imageJ)This solution was quite fast and useful
for larger raster files:a) OpenJUMP. open the original raster file into
OJ. OJ won't display it but it automatically detects coordinates and
saves the wordfileb) ImageJ. PlugIn>Bio-Format>Bio-Format Inporter and
load the file original raster filec)  ImageJ Image>Type. Choose 32-
bitd) ImageJ File>Save as>TIF. Overwrite the original raster file (in
order to use the worldfile)e) reload the saved image into OpenJUMP


Il giorno lun, 13/01/2020 alle 16.00 +0100, Giuseppe Aruta ha scritto:
> Hi Jukka, Ede.
> I had other raster like thayt in the past. A raster with two bands.
> Band 1 are the datas. Band 2 usually has a fixed value of 255 for all
> the pixels.
> OpenJUMP has tools to correct that problem. Just follow these steps:
> Analysisa) open the image (ex. crop.tif) as Sextante Raster Image.
> The color of the icon on layer tree will show if the image is
> monoband (the icon is gray) or multibands (the icon is coloured -
> currently OJ seems to manage only 3 bands+4° transparency)b) Using
> Raster Layer info tool on layer tree, it is possible to check the
> bands. Regarding the images that Jukka sent, Two bands were detected,
> one (band 1) with a range of values, the second (band 2) with only
> one value (255). Band 1 is what we need.
> Operationc) Open Sextante tools>Calculus tools for raster
> layer>Raster Calculator(*)d) On upper-left window double click on
> Layer> crop Band1 (in my linix PC it shows cropBand1)e) the windows
> in the middle of the panel should show "crop Band1" (or "cropBand1 in
> my linux PC).f) on "result" combo box choose the output file, ex
> crop_monog) click on OK
> The result file crop_mono.tif will be the the raster file depurated
> by the band 2
> Note that Sextante tool still save raster with its worldfile even if
> I think I did a mofication some yeras ago to save georeference info
> into the tif file (almost as a geotiff)
> Best regards
> Peppe
> (*) Raster Calculator is so useful for many problems that we should
> move in a upper menu one day
> 
> Il giorno lun, 13/01/2020 alle 11.03 +, Rahkonen Jukka (MML) ha
> scritto:
> > 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 
> > 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 +, 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
> > > > 
> 

Re: [JPP-Devel] Some issue with raster color styles and legend

2020-01-13 Thread Giuseppe Aruta
AFAIF I found the same problem opening ASTER DEM TIF files. In that
case the file were coded as 16int and were reported into OJ as 2 band
raster files. No way to use Raster calculator of Sextante. The files
are quite big and Sextante was going out of memoryThe solution was to
use imagej+bio-format plugin (check on web). The alternative was Fiji
(an advanced version of imageJ)This solution was quite fast and useful
for larger raster files:a) OpenJUMP. open the original raster file into
OJ. OJ won't display it but it automatically detects coordinates and
saves the wordfileb) ImageJ. PlugIn>Bio-Format>Bio-Format Importer and
load the file original raster filec)  ImageJ Image>Type. Choose 32-
bitd) ImageJ File>Save as>TIF. Overwrite the original raster file (in
order to use the worldfile)e) reload the saved image into OpenJUMP


Il giorno lun, 13/01/2020 alle 16.00 +0100, Giuseppe Aruta ha scritto:
> Hi Jukka, Ede.
> I had other raster like thayt in the past. A raster with two bands.
> Band 1 are the datas. Band 2 usually has a fixed value of 255 for all
> the pixels.
> OpenJUMP has tools to correct that problem. Just follow these steps:
> Analysisa) open the image (ex. crop.tif) as Sextante Raster Image.
> The color of the icon on layer tree will show if the image is
> monoband (the icon is gray) or multibands (the icon is coloured -
> currently OJ seems to manage only 3 bands+4° transparency)b) Using
> Raster Layer info tool on layer tree, it is possible to check the
> bands. Regarding the images that Jukka sent, Two bands were detected,
> one (band 1) with a range of values, the second (band 2) with only
> one value (255). Band 1 is what we need.
> Operationc) Open Sextante tools>Calculus tools for raster
> layer>Raster Calculator(*)d) On upper-left window double click on
> Layer> crop Band1 (in my linix PC it shows cropBand1)e) the windows
> in the middle of the panel should show "crop Band1" (or "cropBand1 in
> my linux PC).f) on "result" combo box choose the output file, ex
> crop_monog) click on OK
> The result file crop_mono.tif will be the the raster file depurated
> by the band 2
> Note that Sextante tool still save raster with its worldfile even if
> I think I did a mofication some yeras ago to save georeference info
> into the tif file (almost as a geotiff)
> Best regards
> Peppe
> (*) Raster Calculator is so useful for many problems that we should
> move in a upper menu one day
> 
> Il giorno lun, 13/01/2020 alle 11.03 +, Rahkonen Jukka (MML) ha
> scritto:
> > 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 
> > 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 +, 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
> > > > 
> 

Re: [JPP-Devel] Some issue with raster color styles and legend

2020-01-13 Thread Giuseppe Aruta
Hi Jukka, Ede.
I had other raster like thayt in the past. A raster with two bands.
Band 1 are the datas. Band 2 usually has a fixed value of 255 for all
the pixels.
OpenJUMP has tools to correct that problem. Just follow these steps:
Analysisa) open the image (ex. crop.tif) as Sextante Raster Image. The
color of the icon on layer tree will show if the image is monoband (the
icon is gray) or multibands (the icon is coloured - currently OJ seems
to manage only 3 bands+4° transparency)b) Using Raster Layer info tool
on layer tree, it is possible to check the bands. Regarding the images
that Jukka sent, Two bands were detected, one (band 1) with a range of
values, the second (band 2) with only one value (255). Band 1 is what
we need.
Operationc) Open Sextante tools>Calculus tools for raster layer>Raster
Calculator(*)d) On upper-left window double click on Layer> crop Band1
(in my linix PC it shows cropBand1)e) the windows in the middle of the
panel should show "crop Band1" (or "cropBand1 in my linux PC).f) on
"result" combo box choose the output file, ex crop_monog) click on OK
The result file crop_mono.tif will be the the raster file depurated by
the band 2
Note that Sextante tool still save raster with its worldfile even if I
think I did a mofication some yeras ago to save georeference info into
the tif file (almost as a geotiff)
Best regards
Peppe
(*) Raster Calculator is so useful for many problems that we should
move in a upper menu one day

Il giorno lun, 13/01/2020 alle 11.03 +, Rahkonen Jukka (MML) ha
scritto:
> 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 
> 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 +, 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.(MultipleGradientPaint.java:
> > > 169)
> > > at
> > > java.awt.LinearGradientPaint.(LinearGradientPaint.java:286)
> > > at
> > > java.awt.LinearGradientPaint.(LinearGradientPaint.java:244)
> > > at
> > > java.awt.LinearGradientPaint.(LinearGradientPaint.java:139)
> > > at
> > > org.openjump.core.rasterimage.styler.ui.GradientCanvas.paint(Grad
> > > ient
> > > 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(JCo

Re: [JPP-Devel] Some issue with raster color styles and legend

2020-01-13 Thread Rahkonen Jukka (MML)
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 
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 +, 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.(MultipleGradientPaint.java:169)
>> at
>> java.awt.LinearGradientPaint.(LinearGradientPaint.java:286)
>> at
>> java.awt.LinearGradientPaint.(LinearGradientPaint.java:244)
>> at
>> java.awt.LinearGradientPaint.(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)
>>   

Re: [JPP-Devel] Some issue with raster color styles and legend

2020-01-13 Thread edgar . soldin
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 +, 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.(MultipleGradientPaint.java:169)
>> at
>> java.awt.LinearGradientPaint.(LinearGradientPaint.java:286)
>> at
>> java.awt.LinearGradientPaint.(LinearGradientPaint.java:244)
>> at
>> java.awt.LinearGradientPaint.(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)
>>   

Re: [JPP-Devel] Some issue with raster color styles and legend

2020-01-13 Thread Rahkonen Jukka (MML)
Thanks Peppe,

Understood. I converted NoData into alpha band for avoiding another error, 
let's see if I can reproduce that one.

-Jukka-

-Alkuperäinen viesti-
Lähettäjä: Giuseppe Aruta  
Lähetetty: maanantai 13. tammikuuta 2020 11.33
Vastaanottaja: OpenJump develop and use 
Aihe: Re: [JPP-Devel] Some issue with raster color styles and legend

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 +, 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.(MultipleGradientPaint.java:169)
> at
> java.awt.LinearGradientPaint.(LinearGradientPaint.java:286)
> at
> java.awt.LinearGradientPaint.(LinearGradientPaint.java:244)
> at
> java.awt.LinearGradientPaint.(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)
&g

Re: [JPP-Devel] Some issue with raster color styles and legend

2020-01-13 Thread Giuseppe Aruta
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 +, 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.(MultipleGradientPaint.java:169)
> at
> java.awt.LinearGradientPaint.(LinearGradientPaint.java:286)
> at
> java.awt.LinearGradientPaint.(LinearGradientPaint.java:244)
> at
> java.awt.LinearGradientPaint.(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
>