Re: [JPP-Devel] @Michael. Bug on LayerView and other observations

2018-08-19 Thread Michaël Michaud

Hi Peppe,

Thanks a lot for letting me know. I'll try to check that as soon as 
possible.


Michaël


Le 19/08/2018 à 18:04, Giuseppe Aruta a écrit :

Hi Michael,
I gave a look at the usage of LayerView class and I found a bug on 
opening project if layerViews are saved into a project file

This is the sequence:

1) I create a project and load (or create) a new layer
2) I create a layerView of selected layer and click to save the project
3) OpenJUMP asks to save the newly created layer (=layerView) as JMP 
or SHP.
4) I select to create a new layer. The the saving project is finalized 
and a project file is saved.
5) I try to open the project.the _project is not opened_ and an error 
message shows the problem is in OpenProjectWizard, possibly on 
loadLayers(...) method:


j/ava.lang.Exception: Caricando il file progetto 
'C:\Users\Beppe\Desktop\2.jmp' fallito con errore:

com.vividsolutions.jump.workbench.model.LayerView.
    at 
org.openjump.core.ui.plugin.file.open.OpenProjectWizard.open(OpenProjectWizard.java:195)
    at 
org.openjump.core.ui.plugin.file.open.OpenProjectWizard.open(OpenProjectWizard.java:132)
    at 
org.openjump.core.ui.plugin.file.open.OpenProjectWizard.run(OpenProjectWizard.java:127)
    at 
org.openjump.core.ui.plugin.AbstractWizardPlugin.run(AbstractWizardPlugin.java:73)/

/   .../

I opened the project file with a text editor and substitute
any
layer class="com.vividsolutions.jump.workbench.model.LayerView"
with
layer class="com.vividsolutions.jump.workbench.model.Layer"

In this case I can open the project file in openjump with no problem.

--
Apart from the bug, I have some observations for possible further 
development


a) a LayerView is be a simple "view" of a layer: the modification 
action is syncroniozed: whenever I modified the geometries of a layer, 
the modification affects also the conresponding LayerView. In this 
case the "view" could be a parameter to save only into the project 
file without  the need to create a clone of the layer.


b) II found the LayerView can have a great positive impact on OJ style 
as users can create multiple views of the same layer with different 
styles.
I explored the possibility to create subviews of a selected layer, 
according to defined attribute (*). The easy way was to create sub 
feature collections according to the attribute, create conresponding 
sub-layers (which are not opened into the view, create conresponding 
views to load into the view.
Of coarse  those subviews are not subviews of the original layer but 
subviews of sub-layers. The syncronized modification is lost.




(*) This could be extremely useful as OJ lacks of a good 
point/linestring decoration symbology according to attribute. I am 
Thinking about vertex symbol rotation, the usage of wkt files, text 
display next to symbols - what is available in CadPlann symbology 
plugin available only for basic style



Best regards and thanks for your job

Peppe



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


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


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] @Michael. Bug on LayerView and other observations

2018-08-19 Thread Giuseppe Aruta
Hi Michael,
I gave a look at the usage of LayerView class and I found a bug on opening
project if layerViews are saved into a project file
This is the sequence:

1) I create a project and load (or create) a new layer
2) I create a layerView of selected layer and click to save the project
3) OpenJUMP asks to save the newly created layer (=layerView) as JMP or
SHP.
4) I select to create a new layer. The the saving project is finalized and
a project file is saved.
5) I try to open the project.the *project is not opened* and an error
message shows the problem is in OpenProjectWizard, possibly on
loadLayers(...) method:

j




*ava.lang.Exception: Caricando il file progetto
'C:\Users\Beppe\Desktop\2.jmp' fallito con
errore:com.vividsolutions.jump.workbench.model.LayerView.at
org.openjump.core.ui.plugin.file.open.OpenProjectWizard.open(OpenProjectWizard.java:195)
at
org.openjump.core.ui.plugin.file.open.OpenProjectWizard.open(OpenProjectWizard.java:132)
at
org.openjump.core.ui.plugin.file.open.OpenProjectWizard.run(OpenProjectWizard.java:127)
at
org.openjump.core.ui.plugin.AbstractWizardPlugin.run(AbstractWizardPlugin.java:73)*
*   ...*

I opened the project file with a text editor and substitute
any
layer class="com.vividsolutions.jump.workbench.model.LayerView"
with
layer class="com.vividsolutions.jump.workbench.model.Layer"

In this case I can open the project file in openjump with no problem.

--
Apart from the bug, I have some observations for possible further
development

a) a LayerView is be a simple "view" of a layer: the modification action is
syncroniozed: whenever I modified the geometries of a layer, the
modification affects also the conresponding LayerView. In this case the
"view" could be a parameter to save only into the project file without  the
need to create a clone of the layer.

b) II found the LayerView can have a great positive impact on OJ style as
users can create multiple views of the same layer with different styles.
I explored the possibility to create subviews of a selected layer,
according to defined attribute (*). The easy way was to create sub feature
collections according to the attribute, create conresponding sub-layers
(which are not opened into the view, create conresponding views to load
into the view.
Of coarse  those subviews are not subviews of the original layer but
subviews of sub-layers. The syncronized modification is lost.



(*) This could be extremely useful as OJ lacks of a good point/linestring
decoration symbology according to attribute. I am Thinking about vertex
symbol rotation, the usage of wkt files, text display next to symbols -
what is available in CadPlann symbology plugin available only for basic
style


Best regards and thanks for your job

Peppe
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [5917] core/trunk

2018-08-19 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 5917
  http://sourceforge.net/p/jump-pilot/code/5917
Author:   michaudm
Date: 2018-08-19 07:27:05 + (Sun, 19 Aug 2018)
Log Message:
---
Add SelectAllOrderedFeaturesFromAttributeTablePlugIn

Modified Paths:
--
core/trunk/ChangeLog
core/trunk/scripts/default-plugins.xml
core/trunk/src/language/jump.properties
core/trunk/src/language/jump_cz.properties
core/trunk/src/language/jump_de.properties
core/trunk/src/language/jump_es.properties
core/trunk/src/language/jump_fi.properties
core/trunk/src/language/jump_fr.properties
core/trunk/src/language/jump_hu.properties
core/trunk/src/language/jump_it.properties
core/trunk/src/language/jump_ja_JP.properties
core/trunk/src/language/jump_ml.properties
core/trunk/src/language/jump_pt.properties
core/trunk/src/language/jump_pt_BR.properties
core/trunk/src/language/jump_ta_IN.properties
core/trunk/src/language/jump_te.properties
core/trunk/src/language/jump_zh_CN.properties
core/trunk/src/language/jump_zh_HK.properties

core/trunk/src/org/openjump/core/ui/plugin/edit/SelectAllLayerItemsPlugIn.java

Added Paths:
---

core/trunk/src/org/openjump/core/ui/plugin/mousemenu/SelectAllOrderedFeaturesFromAttributeTablePlugIn.java

Modified: core/trunk/ChangeLog
===
--- core/trunk/ChangeLog2018-08-18 10:16:05 UTC (rev 5916)
+++ core/trunk/ChangeLog2018-08-19 07:27:05 UTC (rev 5917)
@@ -3,6 +3,11 @@
 # 2. make sure that lines break at 80 chars for constricted display situations
 #< 80 chars 
-->#
 
+2018-08-19 mmichaud 
+  * Add two plugins :
+- GenerateUniqueRandomIdPlugIn (menu tools/edit attributes)
+- SelectAllOrderedFeaturesFromAttributeTablePlugIn (AttributeTable context 
menu)
+
 2018-07-01 mmichaud 
   * Update GraphToolbox and MatchingPlugIn extensions
 

Modified: core/trunk/scripts/default-plugins.xml
===
--- core/trunk/scripts/default-plugins.xml  2018-08-18 10:16:05 UTC (rev 
5916)
+++ core/trunk/scripts/default-plugins.xml  2018-08-19 07:27:05 UTC (rev 
5917)
@@ -1715,6 +1715,12 @@
 
 
 
+
org.openjump.core.ui.plugin.mousemenu.SelectAllOrderedFeaturesFromAttributeTablePlugIn
+
+
+
+
+
 
com.vividsolutions.jump.workbench.ui.plugin.clipboard.CutSelectedItemsPlugIn
 
 

Modified: core/trunk/src/language/jump.properties
===
--- core/trunk/src/language/jump.properties 2018-08-18 10:16:05 UTC (rev 
5916)
+++ core/trunk/src/language/jump.properties 2018-08-19 07:27:05 UTC (rev 
5917)
@@ -1000,6 +1000,8 @@
 org.openjump.core.ui.plugin.mousemenu.SaveDatasetsPlugIn.replaces-file = 
replaces file
 org.openjump.core.ui.plugin.mousemenu.SaveDatasetsPlugIn.with-empty-geometry = 
with empty geometry
 
org.openjump.core.ui.plugin.mousemenu.SaveDatasetsPlugIn.with-mixed-geometry-types
 = with mixed geometry types
+org.openjump.core.ui.plugin.mousemenu.SelectAllOrderedFeaturesFromAttributeTablePlugIn
 = Select all ordered features
+org.openjump.core.ui.plugin.mousemenu.SelectAllOrderedFeaturesFromAttributeTablePlugIn.selected-features
 = objets s\xE9lectionn\xE9s
 
org.openjump.core.ui.plugin.mousemenu.SelectLayersWithSelectedItemsPlugIn.SelectLayersWithSelectedItems
 = Select Layers With Selected Items
 org.openjump.core.ui.plugin.mousemenu.SplitFeaturesPlugIn = Split features
 org.openjump.core.ui.plugin.mousemenu.SplitPolygonsNodeLinesPlugIn = Split 
polygons and node lines

Modified: core/trunk/src/language/jump_cz.properties
===
--- core/trunk/src/language/jump_cz.properties  2018-08-18 10:16:05 UTC (rev 
5916)
+++ core/trunk/src/language/jump_cz.properties  2018-08-19 07:27:05 UTC (rev 
5917)
@@ -2907,4 +2907,6 @@
 ui.GenericNames.downhill=\#T\:downhill speed
 ui.GenericNames.select-layers=\#T\:Select layers
 
org.openjump.core.ui.plugin.raster.DEMStatisticsPlugIn.select-multiple-layers=\#T\:Ctrl/Shift
 and mouse click to select more layers
-org.openjump.core.ui.plugin.tools.GenerateUniqueRandomIdPlugIn=#T:Generate 
unique random identifier
\ No newline at end of file
+org.openjump.core.ui.plugin.tools.GenerateUniqueRandomIdPlugIn=#T:Generate 
unique random identifier
+org.openjump.core.ui.plugin.mousemenu.SelectAllOrderedFeaturesFromAttributeTablePlugIn=#T:Select
 all ordered features
+org.openjump.core.ui.plugin.mousemenu.SelectAllOrderedFeaturesFromAttributeTablePlugIn.selected-features=#T:objets
 s\xE9lectionn\xE9s
\ No newline at end of file

Modified: core/trunk/src/language/jump_de.properties
===
---