[JPP-Devel] [jump-pilot:bugs] #512 Georeferenced RasterImage : useless dialog to create a worlfile

2020-11-11 Thread michael michaud via Jump-pilot-devel



---

** [bugs:#512] Georeferenced RasterImage : useless dialog to create a worlfile**

**Status:** open
**Milestone:** OJ_1.16
**Created:** Wed Nov 11, 2020 08:29 AM UTC by michael michaud
**Last Updated:** Wed Nov 11, 2020 08:29 AM UTC
**Owner:** nobody


Trying to open a georeferenced GeoTiff  as a (Sextante) RasterImage , I'm 
invited to define the worldfile through a dialog box. Whatever I enter in the 
diaog box, the image will be georeferenced using the geotags of the geotiff, 
which is fine, but the dialogbox is misleading and will create a tfw file which 
is inconsistant with the geotiff tags.


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] [jump-pilot:bugs] #511 CropWarp raster plugin can't overload existing file

2020-11-11 Thread michael michaud via Jump-pilot-devel
I try to reproduce  the problem this morning, but after I get a NPE in roughly 
similar conditions, I now try to describe the problem precisely, step by 
step... and the problem vanished.
I'm quite sure there are some conditions producing weird results or NPE, but it 
may not be normal conditions. Sorry for the noise, it will need more tests 
before I can describe the problem in a useful way.



---

** [bugs:#511] CropWarp raster plugin can't overload existing file**

**Status:** open
**Milestone:** undecided
**Created:** Tue Nov 10, 2020 10:01 PM UTC by michael michaud
**Last Updated:** Tue Nov 10, 2020 10:01 PM UTC
**Owner:** nobody


If one process an image with CropWarpPlugin and try to save the result with the 
name  of an existing image (want to replace the former image), there is no  
warning as in other plugins, and it produces a weird image (looks like a mixt 
between the old and the new image).


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6620] core/trunk/src/org/openjump/core/rasterimage/ RasterImageLayer.java

2020-11-11 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6620
  http://sourceforge.net/p/jump-pilot/code/6620
Author:   michaudm
Date: 2020-11-11 10:30:58 + (Wed, 11 Nov 2020)
Log Message:
---
Remove a System.out.println which could cause NPE

Modified Paths:
--
core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java

Modified: core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
===
--- core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java  
2020-11-08 23:39:40 UTC (rev 6619)
+++ core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java  
2020-11-11 10:30:58 UTC (rev 6620)
@@ -418,11 +418,6 @@
 } catch (Exception e){
 Logger.warn(e);
 }
-System.out.println(
-"" + getCommittedMemory() + " " + imageFileName + " " +
-image.getWidth()+"x"+image.getHeight() + " - " +
-
scaledBufferedImage.getWidth()+"x"+scaledBufferedImage.getHeight()
-);
 if (imageToDraw != null) {
 return imageToDraw;
 } else {



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


[JPP-Devel] [jump-pilot:bugs] #511 CropWarp raster plugin can't overload existing file

2020-11-11 Thread ede via Jump-pilot-devel
maybe it's related to memory usage?  ..ede


---

** [bugs:#511] CropWarp raster plugin can't overload existing file**

**Status:** open
**Milestone:** undecided
**Created:** Tue Nov 10, 2020 10:01 PM UTC by michael michaud
**Last Updated:** Wed Nov 11, 2020 09:02 AM UTC
**Owner:** nobody


If one process an image with CropWarpPlugin and try to save the result with the 
name  of an existing image (want to replace the former image), there is no  
warning as in other plugins, and it produces a weird image (looks like a mixt 
between the old and the new image).


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6621] core/trunk/src/org/openjump/core/rasterimage/algorithms/ VectorizeAlgorithm.java

2020-11-11 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6621
  http://sourceforge.net/p/jump-pilot/code/6621
Author:   michaudm
Date: 2020-11-11 11:01:59 + (Wed, 11 Nov 2020)
Log Message:
---
Fix #510 + acceleration

Modified Paths:
--

core/trunk/src/org/openjump/core/rasterimage/algorithms/VectorizeAlgorithm.java

Modified: 
core/trunk/src/org/openjump/core/rasterimage/algorithms/VectorizeAlgorithm.java
===
--- 
core/trunk/src/org/openjump/core/rasterimage/algorithms/VectorizeAlgorithm.java 
2020-11-11 10:30:58 UTC (rev 6620)
+++ 
core/trunk/src/org/openjump/core/rasterimage/algorithms/VectorizeAlgorithm.java 
2020-11-11 11:01:59 UTC (rev 6621)
@@ -3,8 +3,7 @@
 import java.awt.Point;
 import java.awt.geom.Point2D;
 import java.awt.image.DataBuffer;
-import java.util.ArrayList;
-import java.util.Collections;
+import java.util.*;
 
 import org.openjump.core.rasterimage.sextante.OpenJUMPSextanteRasterLayer;
 import 
org.openjump.core.rasterimage.sextante.rasterWrappers.GridWrapperNotInterpolated;
@@ -43,24 +42,21 @@
 
 public static WorkbenchFrame frame = 
JUMPWorkbench.getInstance().getFrame();
 
-private static int arrPos(int valIn, double[] arrayIn) {
+//private static int arrPos(double valIn, double[] arrayIn) {
+//for (int i = 0; i < arrayIn.length; i++) {
+//if (arrayIn[i] == valIn) {
+//return i;
+//}
+//}
+//return -1;
+//}
 
-int valOut = -;
-for (int i = 0; i < arrayIn.length; i++) {
-if (arrayIn[i] == valIn) {
-valOut = i;
-break;
-}
-}
-return valOut;
-}
-
 /**
  * Create a FeatureCollection of polygons defining a 
GridWrapperNotInterpolated and number of band
  * AdbToolbox algorithm
- * @param gwrapper. GridWrapperNotInterpolated
- * @param explodeMultipolygons. Explode MultiPolygons in Polygons
- * @param band. Number of band (0,1,2,etc)
+ * @param gwrapper GridWrapperNotInterpolated
+ * @param explodeMultipolygons Explode MultiPolygons in Polygons
+ * @param band Number of band (0,1,2,etc)
  * @return
  */
 public static FeatureCollection toPolygonsAdbToolBox(
@@ -74,11 +70,12 @@
 // Find unique values
 final double[] uniqueVals = findUniqueVals(gwrapper, noData, band);
 final int uniqueValsCount = uniqueVals.length;
+final Map index = index(uniqueVals);
 // Scan lines
 @SuppressWarnings("unchecked")
 final ArrayList[] arrAll = new ArrayList[uniqueValsCount];
 for (int i = 0; i < arrAll.length; i++) {
-arrAll[i] = new ArrayList();
+arrAll[i] = new ArrayList<>();
 }
 final Coordinate[] coords = new Coordinate[5];
 final PackedCoordinateSequenceFactory pcsf = new 
PackedCoordinateSequenceFactory();
@@ -110,7 +107,8 @@
 final CoordinateSequence cs = pcsf.create(coords);
 lr = new LinearRing(cs, geomFactory);
 polygon = new Polygon(lr, null, geomFactory);
-arrAll[arrPos((int) oldVal, uniqueVals)].add(polygon);
+//arrAll[arrPos((int) oldVal, 
uniqueVals)].add(polygon);
+arrAll[index.get(oldVal)].add(polygon);
 }
 oldVal = val;
 cStart = c;
@@ -134,7 +132,7 @@
 for (int g = 0; g < geom.getNumGeometries(); g++) {
 feature = new BasicFeature(featSchema);
 feature.setGeometry(geom.getGeometryN(g));
-feature.setAttribute(1, new Integer(ID));
+feature.setAttribute(1, ID);
 feature.setAttribute(2, uniqueVals[i]);
 featColl.add(feature);
 ID++;
@@ -141,7 +139,7 @@
 }
 } else {
 feature = new BasicFeature(featSchema);
-feature.setAttribute(1, new Integer(ID));
+feature.setAttribute(1, ID);
 feature.setGeometry(geom);
 feature.setAttribute(2, uniqueVals[i]);
 featColl.add(feature);
@@ -183,6 +181,14 @@
 return uniqueVals;
 }
 
+private static Map index(double[] values) {
+Map map = new HashMap<>(values.length);
+for (int i = 0 ; i < values.length ; i++) {
+map.put(values[i],i);
+}
+return map;
+}
+
 private static int[][] m_Lock;
 private static char[][] m_Area;
 private static int m_iNX;



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


Re: [JPP-Devel] [jump-pilot:bugs] #512 Georeferenced RasterImage : useless dialog to create a worlfile

2020-11-11 Thread Giuseppe Aruta
Originally the worldfile dialog was activated only:
fist
a) if there were no georeference tag into the file (GeoTIFF)
than
b) if there is no worldfile

Possibly, when we move to new framework to read TIFF something was broken.

Peppe

Il giorno mer 11 nov 2020 alle ore 09:30 michael michaud via
Jump-pilot-devel  ha scritto:

> --
>
> * [bugs:#512] 
> Georeferenced RasterImage : useless dialog to create a worlfile*
>
> *Status:* open
> *Milestone:* OJ_1.16
> *Created:* Wed Nov 11, 2020 08:29 AM UTC by michael michaud
> *Last Updated:* Wed Nov 11, 2020 08:29 AM UTC
> *Owner:* nobody
>
> Trying to open a georeferenced GeoTiff as a (Sextante) RasterImage , I'm
> invited to define the worldfile through a dialog box. Whatever I enter in
> the diaog box, the image will be georeferenced using the geotags of the
> geotiff, which is fine, but the dialogbox is misleading and will create a
> tfw file which is inconsistant with the geotiff tags.
> --
>
> Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net
> is subscribed to https://sourceforge.net/p/jump-pilot/bugs/
>
> To unsubscribe from further messages, a project admin can change settings
> at https://sourceforge.net/p/jump-pilot/admin/bugs/options. Or, if this
> is a mailing list, you can unsubscribe from the mailing list.
> ___
> 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


Re: [JPP-Devel] [jump-pilot:bugs] #511 CropWarp raster plugin can't overload existing file

2020-11-11 Thread Giuseppe Aruta
I will check too, later. Anyhow I was planning to make some changes on this
tool in order to save cell size whenever the tool is used on Crop mode.
Peppe

Il giorno mer 11 nov 2020 alle ore 12:00 ede via Jump-pilot-devel <
jump-pilot-devel@lists.sourceforge.net> ha scritto:

> maybe it's related to memory usage? ..ede
> --
>
> * [bugs:#511]  CropWarp
> raster plugin can't overload existing file*
>
> *Status:* open
> *Milestone:* undecided
> *Created:* Tue Nov 10, 2020 10:01 PM UTC by michael michaud
> *Last Updated:* Wed Nov 11, 2020 09:02 AM UTC
> *Owner:* nobody
>
> If one process an image with CropWarpPlugin and try to save the result
> with the name of an existing image (want to replace the former image),
> there is no warning as in other plugins, and it produces a weird image
> (looks like a mixt between the old and the new image).
> --
>
> Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net
> is subscribed to https://sourceforge.net/p/jump-pilot/bugs/
>
> To unsubscribe from further messages, a project admin can change settings
> at https://sourceforge.net/p/jump-pilot/admin/bugs/options. Or, if this
> is a mailing list, you can unsubscribe from the mailing list.
> ___
> 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


Re: [JPP-Devel] SVN: [6621] core/trunk/src/org/openjump/core/rasterimage/algorithms/ VectorizeAlgorithm.java

2020-11-11 Thread Giuseppe Aruta
Interesting. Thanks MIchael! I will study this modification... (Integer(ID)
was a left over from an old code.)
Peppe


Il giorno mer 11 nov 2020 alle ore 12:02 jump-pilot-svn--- via
Jump-pilot-devel  ha scritto:

> Revision: 6621
>   http://sourceforge.net/p/jump-pilot/code/6621
> Author:   michaudm
> Date: 2020-11-11 11:01:59 + (Wed, 11 Nov 2020)
> Log Message:
> ---
> Fix #510 + acceleration
>
> Modified Paths:
> --
>
> core/trunk/src/org/openjump/core/rasterimage/algorithms/VectorizeAlgorithm.java
>
> Modified:
> core/trunk/src/org/openjump/core/rasterimage/algorithms/VectorizeAlgorithm.java
> ===
> ---
> core/trunk/src/org/openjump/core/rasterimage/algorithms/VectorizeAlgorithm.java
>2020-11-11 10:30:58 UTC (rev 6620)
> +++
> core/trunk/src/org/openjump/core/rasterimage/algorithms/VectorizeAlgorithm.java
>2020-11-11 11:01:59 UTC (rev 6621)
> @@ -3,8 +3,7 @@
>  import java.awt.Point;
>  import java.awt.geom.Point2D;
>  import java.awt.image.DataBuffer;
> -import java.util.ArrayList;
> -import java.util.Collections;
> +import java.util.*;
>
>  import org.openjump.core.rasterimage.sextante.OpenJUMPSextanteRasterLayer;
>  import
> org.openjump.core.rasterimage.sextante.rasterWrappers.GridWrapperNotInterpolated;
> @@ -43,24 +42,21 @@
>
>  public static WorkbenchFrame frame =
> JUMPWorkbench.getInstance().getFrame();
>
> -private static int arrPos(int valIn, double[] arrayIn) {
> +//private static int arrPos(double valIn, double[] arrayIn) {
> +//for (int i = 0; i < arrayIn.length; i++) {
> +//if (arrayIn[i] == valIn) {
> +//return i;
> +//}
> +//}
> +//return -1;
> +//}
>
> -int valOut = -;
> -for (int i = 0; i < arrayIn.length; i++) {
> -if (arrayIn[i] == valIn) {
> -valOut = i;
> -break;
> -}
> -}
> -return valOut;
> -}
> -
>  /**
>   * Create a FeatureCollection of polygons defining a
> GridWrapperNotInterpolated and number of band
>   * AdbToolbox algorithm
> - * @param gwrapper. GridWrapperNotInterpolated
> - * @param explodeMultipolygons. Explode MultiPolygons in Polygons
> - * @param band. Number of band (0,1,2,etc)
> + * @param gwrapper GridWrapperNotInterpolated
> + * @param explodeMultipolygons Explode MultiPolygons in Polygons
> + * @param band Number of band (0,1,2,etc)
>   * @return
>   */
>  public static FeatureCollection toPolygonsAdbToolBox(
> @@ -74,11 +70,12 @@
>  // Find unique values
>  final double[] uniqueVals = findUniqueVals(gwrapper, noData,
> band);
>  final int uniqueValsCount = uniqueVals.length;
> +final Map index = index(uniqueVals);
>  // Scan lines
>  @SuppressWarnings("unchecked")
>  final ArrayList[] arrAll = new
> ArrayList[uniqueValsCount];
>  for (int i = 0; i < arrAll.length; i++) {
> -arrAll[i] = new ArrayList();
> +arrAll[i] = new ArrayList<>();
>  }
>  final Coordinate[] coords = new Coordinate[5];
>  final PackedCoordinateSequenceFactory pcsf = new
> PackedCoordinateSequenceFactory();
> @@ -110,7 +107,8 @@
>  final CoordinateSequence cs = pcsf.create(coords);
>  lr = new LinearRing(cs, geomFactory);
>  polygon = new Polygon(lr, null, geomFactory);
> -arrAll[arrPos((int) oldVal,
> uniqueVals)].add(polygon);
> +//arrAll[arrPos((int) oldVal,
> uniqueVals)].add(polygon);
> +arrAll[index.get(oldVal)].add(polygon);
>  }
>  oldVal = val;
>  cStart = c;
> @@ -134,7 +132,7 @@
>  for (int g = 0; g < geom.getNumGeometries(); g++) {
>  feature = new BasicFeature(featSchema);
>  feature.setGeometry(geom.getGeometryN(g));
> -feature.setAttribute(1, new Integer(ID));
> +feature.setAttribute(1, ID);
>  feature.setAttribute(2, uniqueVals[i]);
>  featColl.add(feature);
>  ID++;
> @@ -141,7 +139,7 @@
>  }
>  } else {
>  feature = new BasicFeature(featSchema);
> -feature.setAttribute(1, new Integer(ID));
> +feature.setAttribute(1, ID);
>  feature.setGeometry(geom);
>  feature.setAttribute(2, uniqueVals[i]);
>  featColl.add(feature);
> @@ -183,6 +181,14 @@
>  return uniqueVals;
>  }
>
> +private static Map index(double[] values) {
> +Map map = new HashMap<>(values.length);
> +for (int i = 0 ; i < values.length ; i++) {
> +map.pu

[JPP-Devel] [jump-pilot:bugs] #510 Create Polygon From a Raster bug

2020-11-11 Thread michael michaud via Jump-pilot-devel
I just made a fix as if it was a bug : floating values was not recognized 
because of a conversion to int  which , I think, was not necessary.
I also changed a piece of code to make it faster.
Peppe, the change is quite small. Please, have a look and check if I have 
respected the original intention.
I don't mind warning the user that there are too many different values in the 
image if it is the case, but it's a bit more work and somewhat subjective.


---

** [bugs:#510] Create Polygon From a Raster bug**

**Status:** open
**Milestone:** OJ_1.16
**Created:** Tue Nov 10, 2020 12:59 PM UTC by michael michaud
**Last Updated:** Tue Nov 10, 2020 02:16 PM UTC
**Owner:** nobody


The plugin has two modes : AdbToolbox and Sextante. With tiff images of type 
float like DTM084 from Roberto Rossi, I can vectorize with Sextante, but Adb 
throws en exception :
java.lang.ArrayIndexOutOfBoundsException: Index - out of bounds for length 
1925123
at 
org.openjump.core.rasterimage.algorithms.VectorizeAlgorithm.toPolygonsAdbToolBox(VectorizeAlgorithm.java:113)
at 
org.openjump.core.ui.plugin.raster.VectorizeToPolygonsPlugIn.run(VectorizeToPolygonsPlugIn.java:170)
at 
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:151)



---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] [jump-pilot:bugs] #511 CropWarp raster plugin can't overload existing file

2020-11-11 Thread michael michaud via Jump-pilot-devel
Maybe. I think at least NPE was a bug left in a recent commit I did. For other 
remarks, I really must repeat the process step by step.


---

** [bugs:#511] CropWarp raster plugin can't overload existing file**

**Status:** open
**Milestone:** undecided
**Created:** Tue Nov 10, 2020 10:01 PM UTC by michael michaud
**Last Updated:** Wed Nov 11, 2020 11:00 AM UTC
**Owner:** nobody


If one process an image with CropWarpPlugin and try to save the result with the 
name  of an existing image (want to replace the former image), there is no  
warning as in other plugins, and it produces a weird image (looks like a mixt 
between the old and the new image).


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] [jump-pilot:bugs] #513 displaying raster layers in a correct way

2020-11-11 Thread Giuseppe Aruta via Jump-pilot-devel



---

** [bugs:#513] displaying raster layers in a correct way**

**Status:** open
**Milestone:** undecided
**Labels:** raster display 
**Created:** Wed Nov 11, 2020 12:35 PM UTC by Giuseppe Aruta
**Last Updated:** Wed Nov 11, 2020 12:35 PM UTC
**Owner:** nobody
**Attachments:**

- 
[correct_display.png](https://sourceforge.net/p/jump-pilot/bugs/513/attachment/correct_display.png)
 (27.4 kB; image/png)
- 
[wrong_display.png](https://sourceforge.net/p/jump-pilot/bugs/513/attachment/wrong_display.png)
 (169.1 kB; image/png)


This bug has been described by Roberto Rossi on post:
[JPP-Devel] 6506 loading raster test
It comes out when the RAM  used by OpenJUMP is largely engaged to load and 
display many raster (Sextante) layers, together with big shape files.
It affects only continuous raster layer with a single band (like DTM or DEM)
Roberto provided some test files and a video that discribes the bug.

The link for the video is provided here: 
https://mediaspace.unipd.it/id/1_varzgomj
The files to test the bug are available here:
https://drive.google.com/file/d/1sWFahWBxJnaEherHy3ywGEI5b-CYweOP/view?usp=sharing
In the zip file there 2 shapefile and 26 raster images.

description of the test bug:

1) load the shapefiles
2) load the rasters and wait that they are all displayed
3) zoom to an area that covers a part of the raster set
4) deactivate visibility to all the vector and raster layers
5) start to activate visibility to the layers one by one, starting from vectors 
(which should be the last below in the pile of layers)
6) when you reach at one of the continuous raster layer (DTMxx and Depitxx, 
Aspect, Slope) it may be show a wrong display (see wrong_display.png) instead 
of the right one (see right_display.png).

Note that, depending to the quantity of RAM that your OS uses you may or may 
not see the bug:
a) Roberto Rossi who uses Windows 10 with 8 Gb got the bug after reactivating 
visibility of few rasters
b) I use Ubuntu Mate with 6 RAM and I had to (re)load other 11 raster layersto 
GOT the bug.

Usually the bug disapears if the user zoom in to another area withing the same 
raster (not sure about zoom out). The bug disapears if RAM is free removing 
some layers (shapefiles) from the OpenJUMP project.



---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] SVN: [6620] core/trunk/src/org/openjump/core/rasterimage/ RasterImageLayer.java

2020-11-11 Thread Giuseppe Aruta
Hi Michael,
I opened a bug ticket on RasterImage class following Roberto's description.
I will ad also some comments regarding your modifications

Il giorno mer 11 nov 2020 alle ore 11:31 jump-pilot-svn--- via
Jump-pilot-devel  ha scritto:

> Revision: 6620
>   http://sourceforge.net/p/jump-pilot/code/6620
> Author:   michaudm
> Date: 2020-11-11 10:30:58 + (Wed, 11 Nov 2020)
> Log Message:
> ---
> Remove a System.out.println which could cause NPE
>
> Modified Paths:
> --
> core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
>
> Modified:
> core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
> ===
> --- core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
> 2020-11-08 23:39:40 UTC (rev 6619)
> +++ core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
> 2020-11-11 10:30:58 UTC (rev 6620)
> @@ -418,11 +418,6 @@
>  } catch (Exception e){
>  Logger.warn(e);
>  }
> -System.out.println(
> -"" + getCommittedMemory() + " " + imageFileName + " " +
> -image.getWidth()+"x"+image.getHeight() + " - " +
> -
> scaledBufferedImage.getWidth()+"x"+scaledBufferedImage.getHeight()
> -);
>  if (imageToDraw != null) {
>  return imageToDraw;
>  } else {
>
>
>
> ___
> 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


[JPP-Devel] [jump-pilot:bugs] #513 displaying raster layers in a correct way

2020-11-11 Thread Giuseppe Aruta via Jump-pilot-devel
Test on OpenJUMP 6619.
I cannot reproduce Roberto's bug anymore but another problem comes out, 
possibly due to the memory.
a) when I load a raster (sextante) layers, if its position is outside the 
current view, I have an error message (yellow stripe) pointing to 
RasterImageLayer class, line 432, exception on method:
createImage(LayerViewPanel).
If I zoom to the layer, this is displayed in the correct way anyhow

b) Following Roberto's procedure, when I reach the maximum of RAM that OpenJUMP 
could use (supposing that the bug is connected to RAM)
- on previous version the raster was displayed in that B/W spaghetti mode
- on 6619 raster is not displayed.
- I have to zoom in an area of the raster to see datas. If I zoom out back to 
the previous display the raster disapears


---

** [bugs:#513] displaying raster layers in a correct way**

**Status:** open
**Milestone:** undecided
**Labels:** raster display 
**Created:** Wed Nov 11, 2020 12:35 PM UTC by Giuseppe Aruta
**Last Updated:** Wed Nov 11, 2020 12:35 PM UTC
**Owner:** nobody
**Attachments:**

- 
[correct_display.png](https://sourceforge.net/p/jump-pilot/bugs/513/attachment/correct_display.png)
 (27.4 kB; image/png)
- 
[wrong_display.png](https://sourceforge.net/p/jump-pilot/bugs/513/attachment/wrong_display.png)
 (169.1 kB; image/png)


This bug has been described by Roberto Rossi on post:
[JPP-Devel] 6506 loading raster test
It comes out when the RAM  used by OpenJUMP is largely engaged to load and 
display many raster (Sextante) layers, together with big shape files.
It affects only continuous raster layer with a single band (like DTM or DEM)
Roberto provided some test files and a video that discribes the bug.

The link for the video is provided here: 
https://mediaspace.unipd.it/id/1_varzgomj
The files to test the bug are available here:
https://drive.google.com/file/d/1sWFahWBxJnaEherHy3ywGEI5b-CYweOP/view?usp=sharing
In the zip file there 2 shapefile and 26 raster images.

description of the test bug:

1) load the shapefiles
2) load the rasters and wait that they are all displayed
3) zoom to an area that covers a part of the raster set
4) deactivate visibility to all the vector and raster layers
5) start to activate visibility to the layers one by one, starting from vectors 
(which should be the last below in the pile of layers)
6) when you reach at one of the continuous raster layer (DTMxx and Depitxx, 
Aspect, Slope) it may be show a wrong display (see wrong_display.png) instead 
of the right one (see right_display.png).

Note that, depending to the quantity of RAM that your OS uses you may or may 
not see the bug:
a) Roberto Rossi who uses Windows 10 with 8 Gb got the bug after reactivating 
visibility of few rasters
b) I use Ubuntu Mate with 6 RAM and I had to (re)load other 11 raster layersto 
GOT the bug.

Usually the bug disapears if the user zoom in to another area withing the same 
raster (not sure about zoom out). The bug disapears if RAM is free removing 
some layers (shapefiles) from the OpenJUMP project.



---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] [jump-pilot:bugs] #512 Georeferenced RasterImage : useless dialog to create a worlfile

2020-11-11 Thread Giuseppe Aruta via Jump-pilot-devel
AddRasterImageLayerWizard class
The dialog was used on original code in order to create a worldfile for raster 
(tif, gif, jpg, bmp) with no geolocation (=no worldfile). Reorganizing TIF 
import that part of code ended in a wrong position:, and dangerous because OJ 
creates a worldfile which is useless in this session od wirk. But it is read on 
the second or third session of work as the real geolocation. I prefer anyhow to 
deactivate the dialog or to reactivate the part of code ( protected Envelope 
getGeoReferencing(...)) for tiff into AddRasterImageLayerWizard.


---

** [bugs:#512] Georeferenced RasterImage : useless dialog to create a worlfile**

**Status:** open
**Milestone:** OJ_1.16
**Created:** Wed Nov 11, 2020 08:29 AM UTC by michael michaud
**Last Updated:** Wed Nov 11, 2020 08:29 AM UTC
**Owner:** nobody


Trying to open a georeferenced GeoTiff  as a (Sextante) RasterImage , I'm 
invited to define the worldfile through a dialog box. Whatever I enter in the 
diaog box, the image will be georeferenced using the geotags of the geotiff, 
which is fine, but the dialogbox is misleading and will create a tfw file which 
is inconsistant with the geotiff tags.


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] OpenJUMP Road map page

2020-11-11 Thread Michaud Michael


Thanks for the update Peppe,I dispatched todos in subsections and added a few comments.Indeed, I think that Ede did a good job with ticket classification but we now have a bit of workif we want the roadmap and ticket classification to be consistent.I can't remember where bug identifiers of the roadmap come from. Seems that it has changed.I did not remove "reviewing plugin architecture" and "style from kosmo" yet, but I agree with you, they are not goals for v2.0.Michaël envoyé : 10 novembre 2020 à 15:51de : Giuseppe Aruta à : OpenJump develop and use objet : [JPP-Devel] OpenJUMP Road map pageHi all,I started to upgrade the road map page on our wiki:http://ojwiki.soldin.de/index.php?title=OpenJUMP_Roadmap#OpenJUMP_2.0_.282021.3F.29Please, if you can give a look and make your modifications and comments. I think some voices could be removed (see plugin architecture or Kosmo style implementation)Thankspeppe___Jump-pilot-devel mailing listJump-pilot-devel@lists.sourceforge.nethttps://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


Re: [JPP-Devel] OpenJUMP Road map page

2020-11-11 Thread Giuseppe Aruta
"style from kosmo" came from an old request of mine. The time I
collaborated with Saig to translate Kosmo in Italian: I was attracted by
Kosmo way to define styles. In that time my experience with Java
programming was very low. It has not much increased nowadays but I
understand a little better to see that it is a long job (to port Kosmo
style to OpenJUMP) as it involves many classes and methods modified by Saig
developers. I will cancel it in the Road-map.
regarding "reviewing plugin architecture" I suppose it was before Ede did
the job FeatureInstaller class and to extend default-plugin.xml file usage.
We can consider it "closed" too


Il giorno mer 11 nov 2020 alle ore 17:50 Michaud Michael <
m.michael.mich...@orange.fr> ha scritto:

> Thanks for the update Peppe,
>
> I dispatched todos in subsections and added a few comments.
>
> Indeed, I think that Ede did a good job with ticket classification but we
> now have a bit of work
>
> if we want the roadmap and ticket classification to be consistent.
>
> I can't remember where bug identifiers of the roadmap come from. Seems
> that it has changed.
>
> I did not remove "reviewing plugin architecture" and "style from kosmo"
> yet, but I agree with you, they are not goals for v2.0.
>
> Michaël
>
> *envoyé :* 10 novembre 2020 à 15:51
> *de :* Giuseppe Aruta 
> *à :* OpenJump develop and use 
> *objet :* [JPP-Devel] OpenJUMP Road map page
>
> Hi all,
> I started to upgrade the road map page on our wiki:
>
> http://ojwiki.soldin.de/index.php?title=OpenJUMP_Roadmap#OpenJUMP_2.0_.282021.3F.29
> Please, if you can give a look and make your modifications and comments. I
> think some voices could be removed (see plugin architecture or Kosmo style
> implementation)
> Thanks
> peppe
> ___
> 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


[JPP-Devel] [jump-pilot:bugs] #513 displaying raster layers in a correct way

2020-11-11 Thread michael michaud via Jump-pilot-devel
Peppe,

a) I cannot reproduce the problem. Can you test again with 6620+. In 6619, I 
let a println which could eventually throw a NPE. Also in 6619, line 432 is an 
empty line (?)

b) We probably must handle memory limitations in a more elegant way, but it is 
not easy because the current code may let you load more image than what can be 
rendered. Rendering uses more or less memory depending on wether raster is 
visible and on the zoom level.  I'll try to get a yellow warning  when the 
image cache is emptied du to the lack of memory.  



---

** [bugs:#513] displaying raster layers in a correct way**

**Status:** open
**Milestone:** undecided
**Labels:** raster display 
**Created:** Wed Nov 11, 2020 12:35 PM UTC by Giuseppe Aruta
**Last Updated:** Wed Nov 11, 2020 12:44 PM UTC
**Owner:** nobody
**Attachments:**

- 
[correct_display.png](https://sourceforge.net/p/jump-pilot/bugs/513/attachment/correct_display.png)
 (27.4 kB; image/png)
- 
[wrong_display.png](https://sourceforge.net/p/jump-pilot/bugs/513/attachment/wrong_display.png)
 (169.1 kB; image/png)


This bug has been described by Roberto Rossi on post:
[JPP-Devel] 6506 loading raster test
It comes out when the RAM  used by OpenJUMP is largely engaged to load and 
display many raster (Sextante) layers, together with big shape files.
It affects only continuous raster layer with a single band (like DTM or DEM)
Roberto provided some test files and a video that discribes the bug.

The link for the video is provided here: 
https://mediaspace.unipd.it/id/1_varzgomj
The files to test the bug are available here:
https://drive.google.com/file/d/1sWFahWBxJnaEherHy3ywGEI5b-CYweOP/view?usp=sharing
In the zip file there 2 shapefile and 26 raster images.

description of the test bug:

1) load the shapefiles
2) load the rasters and wait that they are all displayed
3) zoom to an area that covers a part of the raster set
4) deactivate visibility to all the vector and raster layers
5) start to activate visibility to the layers one by one, starting from vectors 
(which should be the last below in the pile of layers)
6) when you reach at one of the continuous raster layer (DTMxx and Depitxx, 
Aspect, Slope) it may be show a wrong display (see wrong_display.png) instead 
of the right one (see right_display.png).

Note that, depending to the quantity of RAM that your OS uses you may or may 
not see the bug:
a) Roberto Rossi who uses Windows 10 with 8 Gb got the bug after reactivating 
visibility of few rasters
b) I use Ubuntu Mate with 6 RAM and I had to (re)load other 11 raster layersto 
GOT the bug.

Usually the bug disapears if the user zoom in to another area withing the same 
raster (not sure about zoom out). The bug disapears if RAM is free removing 
some layers (shapefiles) from the OpenJUMP project.



---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6622] core/trunk/src/org/openjump/core/rasterimage/ RasterImageLayer.java

2020-11-11 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6622
  http://sourceforge.net/p/jump-pilot/code/6622
Author:   michaudm
Date: 2020-11-11 22:01:40 + (Wed, 11 Nov 2020)
Log Message:
---
Warning message if memory is too low to display images

Modified Paths:
--
core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java

Modified: core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
===
--- core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java  
2020-11-11 11:01:59 UTC (rev 6621)
+++ core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java  
2020-11-11 22:01:40 UTC (rev 6622)
@@ -345,6 +345,11 @@
 symbologyChanged = false;
 this.setNeedToKeepImage(false);
 clearImageAndRaster(true);
+if (getAvailRAM()-getCommittedMemory() < 
origImageWidth*origImageHeight*4 + getAvailRAM()*0.01) {
+layerViewPanel.getContext().warnUser("Low Memory : image " 
+
+imageFileName + " will not be displayed");
+return null;
+}
 // Load the part of the image intersecting the viewport and 
setting this.image
 reLoadImage();
 if(image == null) {



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