An easy fix will be the welcome for now.
Peppe


2016-01-21 11:15 GMT+01:00 Alberto De Luca <berta...@gmail.com>:

> Jumping in late as usual.
>
> I believe the NPE error happens when a project including a raster is
> loaded and no other project (task) is present. That happens also with
> rasters others than PNG.
>
> An easy fix would be putting a check in RasterImageLayer#setSymbology at
> line 1674, to verify that LayerViewPanel is not null. Nevertheless, I think
> the actual problem is somewhere related to XML2Java, and eventually leads
> to setSymbology being called too early, before the lauyerviewpanel is
> created.
>
> What do you reckon?
> Alberto
>
>
> On 20 January 2016 at 18:47, Giuseppe Aruta <giuseppe.ar...@gmail.com>
> wrote:
>
>> I did some test from my side with no NPE
>> We probably need a test image ( as I can see
>> RasterImageLayer.setSymbology is invoked on Error. This is a method only
>> for monobad raster file. Freelon talks about PNG).
>> We should know what exactly was  his procedure.
>>
>>
>>
>>
>> 2016-01-20 18:28 GMT+01:00 <edgar.sol...@web.de>:
>>
>>> any idea about the NPE during loading? do you need a test image from
>>> Freelon? ..ede
>>>
>>> On 20.01.2016 18:14, Giuseppe Aruta wrote:
>>> > *3) >although I don't unterstand why it puts a 800x800px image to have
>>> a
>>> > size of ~2500x2500*
>>> >
>>> > I tested it. Not my fault. At this moment I don't understand the
>>> problem.
>>> >
>>> > 2016-01-20 16:01 GMT+01:00 Giuseppe Aruta <giuseppe.ar...@gmail.com>:
>>> >
>>> >> Hi Ede,
>>> >> maybe I can answer to those questions
>>> >>
>>> >> 1) > *I can't select it though with the select tool and thus cannot
>>> >> resize it*
>>> >> Currently is not possible to resize Sextante Layers by dragging them.
>>> The
>>> >> only way to resize it is a) Draw a Fence, b) Apply "Resize raster to
>>> the
>>> >> fence" from Sextante  Layer context menu
>>> >>
>>> >>
>>> >> *2) >In OpenJump 1.9 (1.8 as well) I create a new project and add a
>>> PNG
>>> >> image in a new image layer. Then I resize the image and save layer and
>>> >> project. When I reopen the project the resizing information is
>>> missing and
>>> >> the image is displayed in its original pixel size again. The .jml file
>>> >> contains the correct outline values in feature-geometry-Polygon-...-*
>>> >> *coordinates*.
>>> >> In This case he is talking about an image loaded via ReferencedImage
>>> >> (Layer.class). In this case it is true that resizing the image and
>>> save
>>> >> nothing happens. But I feel this is a good politics as it is easy
>>> that an
>>> >> user can resize an image by mistake and save it on a project.
>>> >> We can skip this adding the possibility to save resized image as new
>>> file
>>> >> and using the envelope info to create a new worldfile
>>> >>
>>> >> *3) >although I don't unterstand why it puts a 800x800px image to
>>> have a
>>> >> size of ~2500x2500*
>>> >> Probably my fault.It comes from "Raster property" plugin on Sextante
>>> >> Raster conetxt layer menu. What is written as "Pixel", it should go as
>>> >> "meter" or other Unit of the map. I recognize that this plugin is too
>>> >> big/redundant and somehow slow, I planned to rewrite, similar to
>>> >> LayerPropertiesPlugIn. on Layer context menu
>>> >>
>>> >> Regarding the point 2), we should also take into account that (when
>>> >> closing a project or a task)  OpenJUMP warns only the presence of
>>> >> a) modified vector layers with datasource and b) temporary vector
>>> with no
>>> >> datasource.
>>> >> As far as I know OpenJUMP doesn't warn other "modified" aspects of a
>>> >> projects
>>> >> - Sextante Raster Layers generated by Sextante or by
>>> >> ExtractSelectedPartOfImage and WarpImageToFencePlugIn which are saved
>>> into
>>> >> a temporary folder (eg. in windows C:\Users\Beppe\AppData\Local\Temp).
>>> >> Those files should be treated as "Raster with no datasource" (thinking
>>> >> about Linux/MacOSX user: whenever they shut PC /temp folder is
>>> cleaned up)
>>> >> -  (as Freloon pointed out) ReferencedImage Layers which envelope has
>>> been
>>> >> modified
>>> >>
>>> >> For the next day I will work to solve problem 3
>>> >>
>>> >> Best
>>> >> Peppe
>>> >>
>>> >> 2016-01-20 14:39 GMT+01:00 <edgar.sol...@web.de>:
>>> >>
>>> >>> Alberto,
>>> >>>
>>> >>> any idea? s.b. ..ede
>>> >>>
>>> >>>
>>> >>> -------- Forwarded Message --------
>>> >>> Subject: [jump-pilot:bugs] #414 Image Layer Resizing lost after
>>> loading
>>> >>> project
>>> >>> Date: Wed, 20 Jan 2016 12:18:25 +0000
>>> >>> From: Freelon Xamar <free...@users.sf.net>
>>> >>> Reply-To: [jump-pilot:bugs]  <4...@bugs.jump-pilot.p.re.sf.net>
>>> >>> To: [jump-pilot:bugs]  <4...@bugs.jump-pilot.p.re.sf.net>
>>> >>>
>>> >>> When loading as a sextant raster (FIle..Open..Sextant Raster Image)
>>> it
>>> >>> gets loaded (although I don't unterstand why it puts a 800x800px
>>> image to
>>> >>> have a size of ~2500x2500). I can't select it though with the select
>>> tool
>>> >>> and thus cannot resize it.
>>> >>> Anyway, if I save the project (just the project in this case,
>>> because I
>>> >>> don't have the save option for the raster image layer) now and try
>>> to open
>>> >>> it again I get a "null" exception:
>>> >>>
>>> >>>
>>> >>> ~~~~
>>> >>> java.lang.Exception: Loading project file '/home/XYZ/ffm.jmp' failed
>>> with
>>> >>> the error:
>>> >>> null.
>>> >>>         at
>>> >>>
>>> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.open(OpenProjectWizard.java:175)
>>> >>>         at
>>> >>>
>>> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.open(OpenProjectWizard.java:113)
>>> >>>         at
>>> >>>
>>> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.run(OpenProjectWizard.java:108)
>>> >>>         at
>>> >>>
>>> org.openjump.core.ui.plugin.AbstractWizardPlugin.run(AbstractWizardPlugin.java:73)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)
>>> >>>         at java.lang.Thread.run(Thread.java:745)
>>> >>> Caused by: java.lang.reflect.InvocationTargetException
>>> >>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>> Method)
>>> >>>         at
>>> >>>
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>> >>>         at
>>> >>>
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> >>>         at java.lang.reflect.Method.invoke(Method.java:497)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.setValue(XML2Java.java:263)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.setValueFromTag(XML2Java.java:255)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.setValuesFromTags(XML2Java.java:250)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.access$100(XML2Java.java:50)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java$1.normalTagSpecFound(XML2Java.java:108)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java$1.tagSpecFound(XML2Java.java:127)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XMLBinder.visit(XMLBinder.java:375)
>>> >>>         at
>>> >>> com.vividsolutions.jump.util.java2xml.XML2Java.read(XML2Java.java:91)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.read(XML2Java.java:233)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.read(XML2Java.java:181)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.setValueFromTag(XML2Java.java:255)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.setValuesFromTags(XML2Java.java:250)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.access$100(XML2Java.java:50)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java$1.normalTagSpecFound(XML2Java.java:108)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java$1.tagSpecFound(XML2Java.java:127)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XMLBinder.visit(XMLBinder.java:375)
>>> >>>         at
>>> >>> com.vividsolutions.jump.util.java2xml.XML2Java.read(XML2Java.java:91)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.read(XML2Java.java:233)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.setValueFromTag(XML2Java.java:255)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.setValuesFromTags(XML2Java.java:250)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.access$100(XML2Java.java:50)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java$1.normalTagSpecFound(XML2Java.java:108)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java$1.tagSpecFound(XML2Java.java:127)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XMLBinder.visit(XMLBinder.java:375)
>>> >>>         at
>>> >>> com.vividsolutions.jump.util.java2xml.XML2Java.read(XML2Java.java:91)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.access$000(XML2Java.java:50)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java$1.fillerTagSpecFound(XML2Java.java:103)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java$1.tagSpecFound(XML2Java.java:125)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XMLBinder.visit(XMLBinder.java:375)
>>> >>>         at
>>> >>> com.vividsolutions.jump.util.java2xml.XML2Java.read(XML2Java.java:91)
>>> >>>         at
>>> >>>
>>> com.vividsolutions.jump.util.java2xml.XML2Java.read(XML2Java.java:233)
>>> >>>         at
>>> >>> com.vividsolutions.jump.util.java2xml.XML2Java.read(XML2Java.java:71)
>>> >>>         at
>>> >>>
>>> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.open(OpenProjectWizard.java:132)
>>> >>>         ... 5 more
>>> >>> Caused by: java.lang.NullPointerException
>>> >>>         at
>>> >>>
>>> org.openjump.core.rasterimage.RasterImageLayer.setSymbology(RasterImageLayer.java:1674)
>>> >>>         ... 42 more
>>> >>>
>>> >>> ~~~~
>>> >>>
>>> >>>
>>> >>> ---
>>> >>>
>>> >>> ** [bugs:#414] Image Layer Resizing lost after loading project**
>>> >>>
>>> >>> **Status:** open
>>> >>> **Created:** Wed Jan 20, 2016 10:16 AM UTC by Freelon Xamar
>>> >>> **Last Updated:** Wed Jan 20, 2016 10:16 AM UTC
>>> >>> **Owner:** nobody
>>> >>>
>>> >>>
>>> >>> In OpenJump 1.9 (1.8 as well) I create a new project and add a PNG
>>> image
>>> >>> in a new image layer. Then I resize the image and save layer and
>>> project.
>>> >>> When I reopen the project the resizing information is missing and
>>> the image
>>> >>> is displayed in its original pixel size again.
>>> >>> The .jml file contains the correct outline values in
>>> >>> feature-geometry-Polygon-...-coordinates.
>>> >>>
>>> >>>
>>> >>> ---
>>> >>>
>>> >>> Sent from sourceforge.net because you indicated interest in <
>>> >>> https://sourceforge.net/p/jump-pilot/bugs/414/>
>>> >>>
>>> >>>
>>> >>>
>>> >>> To unsubscribe from further messages, please visit <
>>> >>> https://sourceforge.net/auth/subscriptions/>
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> ------------------------------------------------------------------------------
>>> >>> Site24x7 APM Insight: Get Deep Visibility into Application
>>> Performance
>>> >>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>>> >>> Monitor end-to-end web transactions and take corrective actions now
>>> >>> Troubleshoot faster and improve end-user experience. Signup Now!
>>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>>> >>> _______________________________________________
>>> >>> Jump-pilot-devel mailing list
>>> >>> Jump-pilot-devel@lists.sourceforge.net
>>> >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>> >>>
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > Site24x7 APM Insight: Get Deep Visibility into Application Performance
>>> > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>>> > Monitor end-to-end web transactions and take corrective actions now
>>> > Troubleshoot faster and improve end-user experience. Signup Now!
>>> > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > Jump-pilot-devel mailing list
>>> > Jump-pilot-devel@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>> >
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>>> Monitor end-to-end web transactions and take corrective actions now
>>> Troubleshoot faster and improve end-user experience. Signup Now!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>>> _______________________________________________
>>> Jump-pilot-devel mailing list
>>> Jump-pilot-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to