Hi Alberto,
It seems that everything is going fine, except, as you wrote, loading gif
file.
I took time to see the other job you did on OJ raster capabilities
a) some method to save .FLT and .ASC files. I was working around, with my
limited java skills, to a similar project. It is my intention to add an
"Export to grid" plugin to save to ASC, FLT, GRD (Surfer grid file 6) and
XYZ table file. The latter two options (GRD and XYZ) came out from a couple
of costumers who had to work with those two types of file.
I have the code for this plugin that I wanted to add in the next days - I
am glad to discuss with you, if you have other ideas about. - and find a
common solution
b) Now "Feature Info" Tool also shows raster cell value in a <R> panel. We
should change the name of the plugin to "Info Tool".
This option makes Raster>Pixel Inspection tool obsolete. I think we can
save this plugin, that I added two years ago, and transform as a
ArcGIS-like "Pixel Inspection" tool to query individual or areas of cells
which values can be saved in a vector layer. Even in this case I have a
partial solution (individual cells) for this plugin and your (or others)
opinion is welcome.
c) Raster ColorModels. I gave a look to your RasterStyles and RasterLegend
plugins. These are definitely more efficient than Raster Color Editor
(RasterColorEditor.class and package) embedded into OJ (Legend, pixel
transparency, etc).
I think we talked about few weeks ago - and I changed my mind.
I feel that we can add your plugin, if you agree, into OJ code.
As you wrote, It could be as panel of ChangeRasterImagePropertiesPlugIn,
Hiding RasterColorEditorPanel and adding an enablkecheck to activate it
only for single band raster.
In this case I can help you adding more color schemas (see the one I
embedded into
RasterColorEditorPanel).
Regarding RasterColorEditor.class, we can save the access under "Raster"
menu, if any user are using it. In any case there are no problems of
compatibility as ColorModels are not saved into OpenJUMP project files.
I can go on for more. I checked AdBToolbox and GvSIG code and there are
many opportunities to extend OJ raster capabilities and I am really glad
that you decide to collaborate with your java competence and interests.
Alberto, if you want, you can write me personally in Italian, for any kind
of details and information.
Best regards
Peppe
2015-01-29 11:28 GMT+01:00 Alberto De Luca - GeA <
alberto.del...@geomaticaeambiente.com>:
> Hey Peppe,
>
> I've commited some changes that should fix most of the issues. I don't
> know how to solve the problem of the GIF files being read as monoband: it's
> something related to javax.imageio classes, I'lll see what I can do.
>
> Alberto
>
>
> On 28/01/2015 16:16 PM, Giuseppe Aruta wrote:
>
> Hi Alberto,
> I tested this new OpenJump.jar, using RasterImage Layer class. I did a
> large test to check also the other file formats. I listed below the results
>
> *Loading multiband files: *
> 1) JPG, OK
> 2) PNG, OK
> 3) TIF, OK
> 4) GIF. Only one band is loaded, It seems to me band 0 and the image is
> displayed as B/W
>
> *Loading monoband raster*
> 1) TIF, OK
> 2) ASC, OK
> 3) FLT, OK
> 4) PNG, OK
>
> *Saving multiband files as TIF*
> 1) save JPG to TIF Null point exception
> java.lang.NullPointerException
> at
> org.openjump.core.ui.plugin.layer.pirolraster.SaveRasterImageAsImagePlugIn.execute(SaveRasterImageAsImagePlugIn.java:131)
> 2) save PNG to TIFF, OK
> 3) Save TIF to TIF, OK
> 4) Save GIF to TIF, OK (Saved file is monoband , as the displayed)
>
> *Saving monoband as TIF*
> 1) TIF, OK
> 2) ASC, OK
> 3) FLT, OK
> 4) PNG, OK
>
> *Extract part of selected image (monoband files)*
> 1) TIF, OK
> 2) ASC, OK
> 3) FLT, OK
> 4) PNG, OK
>
> *Extract part of selected image (multiband files)*
> I had problems. All extractions failed with a error message. I listed
> below all these messages
> 1) *JPG,* java.lang.NullPointerException
> at
> org.openjump.core.rasterimage.RasterImageIO.writeImage(RasterImageIO.java:664)
> at
> org.openjump.core.ui.plugin.layer.pirolraster.ExtractSelectedPartOfImage.execute(ExtractSelectedPartOfImage.java:89)
> 2) *PNG,* Javax.media.jai.util.ImagingException: All factories fail for
> the operation "scale"
> at
> javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1687)
> 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.openjump.core.rasterimage.TiffUtils.readImage(TiffUtils.java:85)
> at
> org.openjump.core.rasterimage.RasterImageIO.loadImage(RasterImageIO.java:131)
> at
> org.openjump.core.ui.plugin.layer.pirolraster.ExtractSelectedPartOfImage.execute(ExtractSelectedPartOfImage.java:102)
> 3) *TIF,* java.lang.NullPointerException
> at
> org.openjump.core.ui.plugin.layer.pirolraster.ExtractSelectedPartOfImage.execute(ExtractSelectedPartOfImage.java:90)
> at
> com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.actionPerformed(AbstractPlugIn.java:342)
> at
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
> at
> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
> at
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
> at
> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
> at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
> 4) *GIF. *javax.media.jai.util.ImagingException: All factories fail for
> the operation "scale"
> at
> javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1687)
> 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.openjump.core.rasterimage.TiffUtils.readImage(TiffUtils.java:85)
> at
> org.openjump.core.rasterimage.RasterImageIO.loadImage(RasterImageIO.java:131)
> at
> org.openjump.core.ui.plugin.layer.pirolraster.ExtractSelectedPartOfImage.execute(ExtractSelectedPartOfImage.java:102)
>
> Loading, saving extracting parts of monoband raster is fine. Problems
> come with multiband files.
> Peppe
>
> 2015-01-28 12:06 GMT+01:00 Alberto De Luca - GeA <
> alberto.del...@geomaticaeambiente.com>:
>
>> Peppe,
>>
>> I fixed an issue related to single-band PNGs.
>>
>> With regards to JPGs, I can load with no problem in my Windows machine
>> all the samples you attached to your mail. Nevertheless, the problem you
>> see should be related to JAI: in snapshot 4090 the read operation was made
>> using ImageIO.read, while in snapshot 4283 is made using
>> JAI.create("fileload", ...). I've now modified the code so that
>> ImageIO.read() is used first, and JAI.create() only as a fallback if
>> ImageIO fails. The weird thing is that in r4283 JAI is however used to load
>> TIFF files, but it appears that you can load them no problem...
>>
>> Since I cannot reproduce your error, before committing I'd like you to
>> test these changes. Could you please download this
>> <https://www.dropbox.com/s/fexjyucup49hihn/OpenJUMP-0.0.0-rnull.jar?dl=0>
>> OpenJUMP.jar, replace it to the one you have in snapshot 4283 and tell me
>> how it behaves?
>>
>> Thanks
>> Alberto
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>> your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
>
>
>
> _______________________________________________
> Jump-pilot-devel mailing
> listJump-pilot-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel