[JPP-Devel] Smooth line or polygon as part of the Generalization sub-menu

2015-07-03 Thread Andrei Nacu
Hi,
I would like to know what do you think about adding some smoothing options in 
the Tools->Generalization menu.
Currently we have 2 plugins, one made by Mike and one by Stefan (Map 
generalization toolbox) that offer bezier or spline smoothing tools.I was 
wondering if we can include them in the Generalization sub-menu below the 
vector simplification tools.
Cheers,Andrei--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] Added Style plugin to WMS layers

2015-07-03 Thread Andrei Nacu
>Dear Jumpers,
>I added a basic WMS style plugin to WMS layer context menu: it currently 
>allows user to define wms transparency and visibility according to >scale
>I also uniformed theplugin icon ("palette.gif") and name ("Change Style") to 
>Vector/Raster/WMS style plugins (DeeChangesStylePlugIn, 
>>ChangeRasterImagePropertiesPlugIn and WMSStylePlugIn)
>>Best regard
>>Peppe

Hi Peppe,
This is a great plug in. Transparency for WMS layers is really useful. I 
sometimes struggled to distinguish digitized vector layers from a WMS 
topographic map with strong colors. And with the scale option we can zoom 
in/out through several WMS layers, each WMS layer/map with its own level of 
detail.
I found a small bug. If someone would swap scales by mistake (like in the 
attached screen capture), OJ will throw an Assertion Failed exception and will 
stop working:
com.vividsolutions.jts.util.AssertionFailedException at 
com.vividsolutions.jts.util.Assert.isTrue(Assert.java:68) at 
com.vividsolutions.jts.util.Assert.isTrue(Assert.java:54) at 
com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer.withinVisibleScaleRange(LayerRenderer.java:112)
 at 
com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer.render(LayerRenderer.java:105)
 at 
com.vividsolutions.jump.workbench.ui.renderer.WMSLayerRenderer.createRunnable(WMSLayerRenderer.java:57)
 at 
com.vividsolutions.jump.workbench.ui.renderer.RenderingManager.render(RenderingManager.java:250)
 at 
com.vividsolutions.jump.workbench.ui.renderer.RenderingManager.render(RenderingManager.java:229)
 at 
com.vividsolutions.jump.workbench.ui.LayerViewPanel.layerChanged(LayerViewPanel.java:494)
 at 
com.vividsolutions.jump.workbench.model.LayerManager$3.run(LayerManager.java:483)
 at 
com.vividsolutions.jump.workbench.ui.GUIUtil.invokeOnEventThread(GUIUtil.java:672)
 at 
com.vividsolutions.jump.workbench.model.LayerManager.fireLayerEvent(LayerManager.java:447)
 at 
com.vividsolutions.jump.workbench.model.LayerManager.fireLayerChanged(LayerManager.java:481)
 at 
com.vividsolutions.jump.workbench.model.LayerManager.fireLayerChanged(LayerManager.java:505)
 at 
com.vividsolutions.jump.workbench.model.AbstractLayerable.fireLayerChanged(AbstractLayerable.java:95)
 at 
com.vividsolutions.jump.workbench.model.AbstractLayerable.fireAppearanceChanged(AbstractLayerable.java:107)
 at 
org.openjump.core.ui.plugin.wms.panels.WMSTransparencyPanel.updateStyles(WMSTransparencyPanel.java:132)
 at 
org.openjump.core.ui.plugin.wms.WMSStylePlugIn$1.actionPerformed(WMSStylePlugIn.java:97)
 at 
com.vividsolutions.jump.workbench.ui.ButtonPanel.fireActionPerformed(ButtonPanel.java:109)
 at 
com.vividsolutions.jump.workbench.ui.ButtonPanel.access$000(ButtonPanel.java:48)
 at 
com.vividsolutions.jump.workbench.ui.ButtonPanel$1.actionPerformed(ButtonPanel.java:91)
 at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at 
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at 
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at 
javax.swing.DefaultButtonModel.setPressed(Unknown Source) at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at 
java.awt.Component.processMouseEvent(Unknown Source) at 
javax.swing.JComponent.processMouseEvent(Unknown Source) at 
java.awt.Component.processEvent(Unknown Source) at 
java.awt.Container.processEvent(Unknown Source) at 
java.awt.Component.dispatchEventImpl(Unknown Source) at 
java.awt.Container.dispatchEventImpl(Unknown Source) at 
java.awt.Component.dispatchEvent(Unknown Source) at 
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at 
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at 
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at 
java.awt.Container.dispatchEventImpl(Unknown Source) at 
java.awt.Window.dispatchEventImpl(Unknown Source) at 
java.awt.Component.dispatchEvent(Unknown Source) at 
java.awt.EventQueue.dispatchEventImpl(Unknown Source) at 
java.awt.EventQueue.access$500(Unknown Source) at 
java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown 
Source) at java.security.AccessController.doPrivileged(Native Method) at 
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at 
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at 
java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown 
Source) at java.security.AccessController.doPrivileged(Native Method) at 
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at 
java.awt.EventQueue.dispatchEvent(Unknown Source) at 
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at 
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at 
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at 
java.awt.WaitDispatchSupport$2.run(Unknown Source) at 
java.awt.WaitDispatchSupport$4.run(Unknown Source) at 
java.awt.WaitDispatchSupport$4.run(Unknown So

Re: [JPP-Devel] Raster capabilities

2015-07-03 Thread Giuseppe Aruta
>why not making it accessible from the Styling icon of the main ToolBar ?

And why not making it accessible to WMS layers, too.

It was a good idea, Michael. I added to OJ a WMS change style plugin
(accessible via WMS layer context menu - only transparency and scale for
now,  I was already testing the code) and I rearranged the tyle access on
the main toolbar.
Now, depending to selected layer (Layer, WMSLayer, RasterImageLayer),   the
plugin opens the conresponding style dialog.
Meanwhile I uniformed plugins icons and names.
I hope that everything works - see final project on OJ 4525

Peppe

2015-06-29 21:25 GMT+02:00 Michaël Michaud :

> Hi all,
>
> Thanks Peppe for the clarification, and also Alberto for the work.
> I really needed this upgrade in my knowledge of all the work done in the
> "raster" area.
>
> I have now a better understanding. I agree that the different plugins
> dealing with
> raster styling should finally be gathered in one place, preceded by the
> styling icon.
> And as we are there, why not making it accessible from the Styling icon
> of the main
> ToolBar ?
>
> Michaël
>
> Le 29/06/2015 18:40, Stefan Steiniger a écrit :
> > Thanks for the clardification Peppe.
> >
> > As this is a development version there is not so much of an issue to
> > have 3 different options for testing. I guess the decision on what to
> > leave in and works best can be defererd until the next official version
> > release (with 2-3 devs testing and selecting their favourite?).
> >
> > cheers,
> > stefan
> >
> > PS: one english hint: I took advanced => I took advantage ;)
> >
> > Am 29.06.15 um 05:48 schrieb Giuseppe Aruta:
> >> Hi Michael,
> >> you are right. The test is ambiguous. It refers to *Raster Layer right
> >> click menu>Change Raster Layer properties>Raster color editor panel
> >> *(2), as I described here(*), and not to *Menu Raster>Raster color
> >> plugin* (1).
> >>
> >> I added the (2) some months ago when I rearranged "Change Raster Layer
> >> properties" adding adding tansparency options as panels. I thought is
> >> was a good position for this type of raster styling options.t: I left
> >> (1) thinking about users who were still using this plugin.
> >>
> >> During the last months,  I upgraded the panel (2) with new features
> >> (invert schemas, colorize by intervals, etc). Making this panel more
> >> flexible and featured than the original (1). I took advanced of the new
> >> raster framework added by Arlberto.
> >> Note that (2) is deactivated if selected Raster is not a single bande
> raster
> >>
> >> A couple of weeks Alberto added an enhanced plugin to colorize single
> >> band rasters. It is located under *Raster Layer right click menu>Raster
> >> styles* (3).
> >> (3) is even far better than  (2) as it allows to choose between
> >> ramp/user-defined intervals and single raster values, users can define a
> >> color for no-data values, there is a legend displayed on the layer tree
> >> associated to the layer. The code has more potentialities for a future
> >> export color schemas and, eventually, legends.*
> >>
> >> *
> >> In synthesis,  there are actually three plugins - (1), (2) and (3) -
> >> that do the same thing: colorize a single band raster. Among them (3) is
> >> the most advanced (and recent) one.*
> >>
> >> *
> >> My idea was to deactivate both (1) and (2) and to promote (3), both for
> >> user and for future development. I have to modify also the wiki page
> >> about raster style (*)
> >>
> >> (1), (2) and (3) shares the same libraries (thanks to recent Raster
> >> enhancements by Alberto)*.
> >>
> >> *
> >> Sorry for the confusion, there is a progressive temporal modification
> >> and enhancement of the plugins during the last months*
> >>
> >> *
> >> Best regards
> >>
> >> Peppe*
> >> *
> >> *
> >>
> >> *
> >> *
> >>
> http://ojwiki.soldin.de/index.php?title=Single_band_raster_layer_symbology_%28Sextante%29
> >>
> >> 2015-06-28 16:34 GMT+02:00 Michaël Michaud  >> >:
> >>
> >>  Hi Peppe,
> >>
> >>  I'm reading the ChangeLog to discover new features I may have
> missed,
> >>
> >>  Did you commit the following feature ? I can't see it in the Raster
> >>  Color Editor
> >>  (or maybe I don't look at the right place)
> >>
> >>  2015-04-12 Giuseppe Aruta   giuseppe_ar...@yahoo.it>
> >> * Raster Color Editor Panel. Added an option to invert color
> range and an option to set
> >>   values outside choosen range to transparent. Optimized color
> ramp. Added more color ramps
> >>
> >>
> >>  Thanks,
> >>
> >>  Michaël
> >>
> >>
> --
> >>  Monitor 25 network devices or servers for free with OpManager!
> >>  OpManager is web-based network management software that monitors
> >>  network devices and physical & virtual servers, alerts via email &
> sms
> >>  for fault. Monitor 25 devices for free with no restriction.
>

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

2015-07-03 Thread jump-pilot-svn
Revision: 4525
  http://sourceforge.net/p/jump-pilot/code/4525
Author:   ma15569
Date: 2015-07-03 15:26:06 + (Fri, 03 Jul 2015)
Log Message:
---
Rearranged Style access on the main toolbar, now, depending to selected layer 
(Layer, WMSLayer, RasterImageLayer),   the plugin opens the conresponding style 
dialog

Modified Paths:
--
core/trunk/ChangeLog
core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java

Added Paths:
---
core/trunk/src/org/openjump/core/ui/plugin/layer/LayerableStylePlugIn.java

Modified: core/trunk/ChangeLog
===
--- core/trunk/ChangeLog2015-07-03 09:14:04 UTC (rev 4524)
+++ core/trunk/ChangeLog2015-07-03 15:26:06 UTC (rev 4525)
@@ -1,5 +1,13 @@
 # for display continuity sake please use 2 spaces instead of tabs
 
+2015-07-03 Giuseppe Aruta 
+  * Added "Change Style" plugin to WMS Layers - currently only general 
transaprency and scale visibility 
+are available
+  * Uniformed Plugin icon ("Palette.gif") and name ("Change Style") to 
Layer.class, RasterImage.class 
+and WMSLayer.class Styling plugins ( DeeChangeStylesPlugIn, WMSStylePlugIn 
and ChangeRasterPropertiesPlugIn
+  * Rearranged Style access on the main toolbar, now, depending to selected 
layer (Layer, WMSLayer, RasterImageLayer),
+the plugin opens the conresponding style dialog
+
 2015-06-28 mmichaud 
   * SelectOneItemTool : fix #404 (could select a feature juset deleted)
   * Add 4 morphologic indices to GeometryAttributes plugin :

Modified: 
core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java
===
--- core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java 
2015-07-03 09:14:04 UTC (rev 4524)
+++ core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java 
2015-07-03 15:26:06 UTC (rev 4525)
@@ -41,6 +41,7 @@
 import javax.swing.JToggleButton;
 
 import org.openjump.OpenJumpConfiguration;
+import org.openjump.core.ui.plugin.layer.LayerableStylePlugIn;
 //import org.openjump.core.ui.plugin.edit.CopyBBoxPlugin;
 //import org.openjump.core.ui.plugin.edit.InvertSelectionPlugIn;
 //import org.openjump.core.ui.plugin.layer.CombineSelectedLayersPlugIn;
@@ -297,7 +298,11 @@
 //
 //  private ZoomBarPlugIn zoomBarPlugIn = new ZoomBarPlugIn();
 //
-  private DeeChangeStylesPlugIn changeStylesPlugIn = new 
DeeChangeStylesPlugIn();
+  //Giuseppe Aruta - June 3 2015 Deactivate and substituted by a General 
Layerable Styling plugin
+ // private DeeChangeStylesPlugIn changeStylesPlugIn = new 
DeeChangeStylesPlugIn();
+  
+//Giuseppe Aruta - June 3 2015 - General Layerable Styling plugin
+  private LayerableStylePlugIn changeStylesPlugIn = new LayerableStylePlugIn();
 
   private UndoPlugIn undoPlugIn = new UndoPlugIn();
 

Added: 
core/trunk/src/org/openjump/core/ui/plugin/layer/LayerableStylePlugIn.java
===
--- core/trunk/src/org/openjump/core/ui/plugin/layer/LayerableStylePlugIn.java  
(rev 0)
+++ core/trunk/src/org/openjump/core/ui/plugin/layer/LayerableStylePlugIn.java  
2015-07-03 15:26:06 UTC (rev 4525)
@@ -0,0 +1,85 @@
+package org.openjump.core.ui.plugin.layer;
+
+import javax.swing.ImageIcon;
+import javax.swing.JOptionPane;
+
+import org.openjump.core.apitools.LayerTools;
+import org.openjump.core.rasterimage.RasterImageLayer;
+import 
org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn;
+import org.openjump.core.ui.plugin.wms.WMSStylePlugIn;
+
+import com.vividsolutions.jump.I18N;
+import com.vividsolutions.jump.workbench.WorkbenchContext;
+import com.vividsolutions.jump.workbench.model.Layer;
+import com.vividsolutions.jump.workbench.model.Layerable;
+import com.vividsolutions.jump.workbench.model.WMSLayer;
+import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn;
+import com.vividsolutions.jump.workbench.plugin.EnableCheckFactory;
+import com.vividsolutions.jump.workbench.plugin.MultiEnableCheck;
+import com.vividsolutions.jump.workbench.plugin.PlugInContext;
+import com.vividsolutions.jump.workbench.ui.images.IconLoader;
+
+import de.latlon.deejump.plugin.style.DeeChangeStylesPlugIn;
+import de.latlon.deejump.wfs.jump.WFSLayer;
+
+public class LayerableStylePlugIn extends AbstractPlugIn {
+public boolean execute(final PlugInContext context) throws Exception {
+
+/**
+ * July 02 2015 [Giuseppe Aruta] - General class that substitute
+ * DeeChangeStylesPlugIn on the main toolbar. This plugin allows to set
+ * style according to selected layer type: Layer.class, WMSLayer.class
+ * and RasterImageLayer.class
+ */
+Layerable layer = (Layerable) LayerTools.getSelectedLayerable(context,
+Layerable.class);
+if (layer instanceof Layer) {
+DeeCh

[JPP-Devel] Added Style plugin to WMS layers

2015-07-03 Thread Giuseppe Aruta
Dear Jumpers,
I added a basic WMS style plugin to WMS layer context menu: it currently
allows user to define wms transparency and visibility according to scale
I also uniformed theplugin icon ("palette.gif") and name ("Change Style")
to Vector/Raster/WMS style plugins (DeeChangesStylePlugIn,
ChangeRasterImagePropertiesPlugIn and WMSStylePlugIn)

Best regard

Peppe
--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


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

2015-07-03 Thread jump-pilot-svn
Revision: 4524
  http://sourceforge.net/p/jump-pilot/code/4524
Author:   ma15569
Date: 2015-07-03 09:14:04 + (Fri, 03 Jul 2015)
Log Message:
---
Giuseppe Aruta June 3 2015
- Added Style plugin to WMS layer (currently only layer transparency and 
visibility according to scale are available)
- Uniformed icon ("palette.gif") and name ("Change Style") to Vector/Raster/WMS 
style menus (DeeChangesStylePlugIn, ChangeRasterImagePropertiesPlugIn and 
WMSStylePlugIn)
- Now Styles menus shows thename of selected layer (Top PlugIn Bar)

Modified Paths:
--
core/trunk/scripts/default-plugins.xml

core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/EditWMSQueryPlugIn.java
core/trunk/src/de/latlon/deejump/plugin/style/DeeChangeStylesPlugIn.java

core/trunk/src/org/openjump/core/ui/plugin/layer/pirolraster/ChangeRasterImagePropertiesPlugIn.java

Added Paths:
---
core/trunk/src/org/openjump/core/ui/plugin/wms/WMSStylePlugIn.java
core/trunk/src/org/openjump/core/ui/plugin/wms/panels/

core/trunk/src/org/openjump/core/ui/plugin/wms/panels/WMSScaleStylePanel.java

core/trunk/src/org/openjump/core/ui/plugin/wms/panels/WMSTransparencyPanel.java

Modified: core/trunk/scripts/default-plugins.xml
===
--- core/trunk/scripts/default-plugins.xml  2015-07-02 09:51:15 UTC (rev 
4523)
+++ core/trunk/scripts/default-plugins.xml  2015-07-03 09:14:04 UTC (rev 
4524)
@@ -1226,6 +1226,18 @@



+   org.openjump.core.ui.plugin.wms.WMSStylePlugIn
+   
+   
+   
+   
+   
+   org.openjump.core.ui.plugin.wms.WMSLegendPlugIn
+   
+   
+   
+   
+   
org.openjump.core.ui.plugin.wms.ZoomToWMSLayerPlugIn


@@ -1275,13 +1287,6 @@

 

-
-   
-   org.openjump.core.ui.plugin.wms.WMSLegendPlugIn
-   
-   
-   
-   

 


Modified: 
core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/EditWMSQueryPlugIn.java
===
--- 
core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/EditWMSQueryPlugIn.java
  2015-07-02 09:51:15 UTC (rev 4523)
+++ 
core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/EditWMSQueryPlugIn.java
  2015-07-03 09:14:04 UTC (rev 4524)
@@ -35,6 +35,7 @@
 import java.awt.GridBagConstraints;
 import java.util.Iterator;
 
+import javax.swing.Icon;
 import javax.swing.JLabel;
 
 import com.vividsolutions.jump.I18N;
@@ -51,55 +52,65 @@
 import com.vividsolutions.wms.MapLayer;
 
 public class EditWMSQueryPlugIn extends AbstractPlugIn {
-  public MultiEnableCheck createEnableCheck(
-  final WorkbenchContext workbenchContext) {
-EnableCheckFactory checkFactory = new EnableCheckFactory(workbenchContext);
+public MultiEnableCheck createEnableCheck(
+final WorkbenchContext workbenchContext) {
+EnableCheckFactory checkFactory = new EnableCheckFactory(
+workbenchContext);
 
-return new MultiEnableCheck().add(
-checkFactory.createWindowWithLayerNamePanelMustBeActiveCheck()).add(
-checkFactory.createExactlyNLayerablesMustBeSelectedCheck(1,
-Layerable.class));
-  }
+return new MultiEnableCheck().add(
+checkFactory.createWindowWithLayerNamePanelMustBeActiveCheck())
+.add(checkFactory.createExactlyNLayerablesMustBeSelectedCheck(
+1, Layerable.class));
+}
 
-  public boolean execute(PlugInContext context) throws Exception {
-WMSLayer layer = (WMSLayer) context.getLayerNamePanel()
-.selectedNodes(WMSLayer.class).iterator().next();
-MultiInputDialog dialog = new MultiInputDialog(context.getWorkbenchFrame(),
-I18N.get("ui.plugin.wms.EditWMSQueryPlugIn.edit-wms-query"), true);
+// [Giuseppe Aruta] - added plugin icon
+public Icon getIcon() {
+return IconLoader.icon("edit.gif");
+}
 
-dialog.setSideBarImage(IconLoader.icon("EditWMSLayer.jpg"));
-dialog
-.setSideBarDescription(I18N
-
.get("ui.plugin.wms.EditWMSQueryPlugIn.this-dialog-enables-you-to-change-the-layers-being-retrieved-from-a-web-map-server"));
+public boolean execute(PlugInContext context) throws Exception {
+WMSLayer layer = (WMSLayer) context.getLayerNamePanel()
+.selectedNodes(WMSLayer.class).iterator().next();
+MultiInputDialog dialog = new MultiInputDialog(
+context.getWorkbenchFrame(),
+I18N.get("ui.plugin.wms.EditWMSQueryPlugIn.edit-wms-query"),
+true);
 
-EditWMSQueryPanel panel = new EditWMSQueryPanel( layer );
+dialog.setSideBarImage(IconLoad