Re: [JPP-Devel] SVN: [5185] core/trunk/src/com/vividsolutions/jump/workbench/ui/ LayerNameRenderer.java

2016-11-14 Thread Stefan Steiniger


Hi,i used empty geomcollection so far, to have something there... I am not sure how much work it would be to introduce a new table/data layer without a geometry - as i am not sure if OJ is designed for that. Simplest may be to copy and make the field invisible for now. Perhaps Michaël has a better idea about the possibility to throw out the geom. cheers,stefan -- Originalnachricht --Von: Datum: 14.11.2016 9:45An: OpenJump develop and use;Betreff:Re: [JPP-Devel] SVN: [5185] core/trunk/src/com/vividsolutions/jump/workbench/ui/ LayerNameRenderer.javai guess the cleanest solution would be a new layer class eg. DataLayer, that simply does not allow adding/editing geometries or does not even have a geometry attribute.

in the 2nd case you would probably need a new featurecollection w/o a geometry column as well and the whole thing would throw some exceptions here and there, as OJ expects geometries in featurecollections, but apart from that it would be clean and the renderer would not need to monitor geom changes at all.

..ede

On 14.11.2016 10:39, Giuseppe Aruta wrote:
> Thanks Michael Ede
> Indeed I came across (as a side relative problem ) working on Saxtante.
> Sextante allows to work on Table files while Oj not. We can take advance of
> the Sextante table algorithms  allowing Sextante to decode the vector
> layers, with all features with empty geometries (see  for instance loading
> .csv on auto mode) as tables (I already added added into Sextante binding a
> Boolean method that allows to decode these files).
> I wondered if users would also have benefit  to visualize that a table is
> loaded into OJ workbench, with a table icon.
> I will check other solutions. Thanks for the hint.
> Peppe
> 
> Il 13/Nov/2016 23:21, "Michaël Michaud"  ha
> scritto:
> 
>> Hi Peppe,
>>
>> Seel also my answer on 2016-10-29.
>>
>> TreeLayerNamePanel has a listener, but to avoid a featureCollection scan
>> after each change
>> you probably need to keep a cache in the Layer as suggested by Ede, and
>> use the Layer's
>> listener to update the cache every time a feature is added, removed or
>> changed
>>
>> Michaël
>>
>>
>> Le 13/11/2016 à 19:51, edgar.sol...@web.de a écrit :
>>> thanks.. how about implementing the caching/listener approach if you
>> like to have icon? ..ede
>>>
>>> On 13.11.2016 18:57, Giuseppe Aruta wrote:
 Ok Ede, I didn't  know it. I will revert the change.
 Thanks again
 Peppe

 Il 13/Nov/2016 18:48,  ha scritto:

> Peppe,
>
> NACK.. this is going to get very slow for huge datasets containing
>> empty
> geoms only, as it is run on every redraw of the layer tree. please
>> cache
> the state and use a layer change listener or else users will complain
>> about
> a frozen OJ some time in the future and we will have a hard time to
> pinpoint the reason, again ;)
>
> ..ede
>
> On 13.11.2016 18:41, jump-pilot-...@lists.sourceforge.net wrote:
>> Revision: 5185
>>    http://sourceforge.net/p/jump-pilot/code/5185
>> Author:   ma15569
>> Date: 2016-11-13 17:41:37 + (Sun, 13 Nov 2016)
>> Log Message:
>> ---
>> The layer tree shows a table icon for layers that have features with
> empty geometries
>> Modified Paths:
>> --
>>  core/trunk/src/com/vividsolutions/jump/workbench/
> ui/LayerNameRenderer.java
>> Modified: core/trunk/src/com/vividsolutions/jump/workbench/
> ui/LayerNameRenderer.java
>> ===
>> --- core/trunk/src/com/vividsolutions/jump/workbench/
>> ui/LayerNameRenderer.java
>    2016-11-13 17:21:20 UTC (rev 5184)
>> +++ core/trunk/src/com/vividsolutions/jump/workbench/
>> ui/LayerNameRenderer.java
>    2016-11-13 17:41:37 UTC (rev 5185)
>> @@ -36,6 +36,7 @@
>>   import java.awt.Rectangle;
>>   import java.io.File;
>>   import java.util.Iterator;
>> +import java.util.List;
>>
>>   import javax.swing.DefaultListCellRenderer;
>>   import javax.swing.Icon;
>> @@ -54,9 +55,11 @@
>>   import org.openjump.core.rasterimage.RasterImageLayer;
>>
>>   import com.vividsolutions.jts.geom.Envelope;
>> +import com.vividsolutions.jts.geom.Geometry;
>>   import com.vividsolutions.jump.I18N;
>>   import com.vividsolutions.jump.feature.Feature;
>>   import com.vividsolutions.jump.feature.FeatureCollection;
>> +import com.vividsolutions.jump.feature.FeatureCollectionWrapper;
>>   import com.vividsolutions.jump.io.datasource.DataSourceQuery;
>>   import com.vividsolutions.jump.util.StringUtil;
>>   import com.vividsolutions.jump.workbench.JUMPWorkbench;
>> @@ -118,6 +121,7 @@
>>   private ImageIcon rasterIcon 

Re: [JPP-Devel] SVN: [5185] core/trunk/src/com/vividsolutions/jump/workbench/ui/ LayerNameRenderer.java

2016-11-14 Thread edgar . soldin
i guess the cleanest solution would be a new layer class eg. DataLayer, that 
simply does not allow adding/editing geometries or does not even have a 
geometry attribute.

in the 2nd case you would probably need a new featurecollection w/o a geometry 
column as well and the whole thing would throw some exceptions here and there, 
as OJ expects geometries in featurecollections, but apart from that it would be 
clean and the renderer would not need to monitor geom changes at all.

..ede

On 14.11.2016 10:39, Giuseppe Aruta wrote:
> Thanks Michael Ede
> Indeed I came across (as a side relative problem ) working on Saxtante.
> Sextante allows to work on Table files while Oj not. We can take advance of
> the Sextante table algorithms  allowing Sextante to decode the vector
> layers, with all features with empty geometries (see  for instance loading
> .csv on auto mode) as tables (I already added added into Sextante binding a
> Boolean method that allows to decode these files).
> I wondered if users would also have benefit  to visualize that a table is
> loaded into OJ workbench, with a table icon.
> I will check other solutions. Thanks for the hint.
> Peppe
> 
> Il 13/Nov/2016 23:21, "Michaël Michaud"  ha
> scritto:
> 
>> Hi Peppe,
>>
>> Seel also my answer on 2016-10-29.
>>
>> TreeLayerNamePanel has a listener, but to avoid a featureCollection scan
>> after each change
>> you probably need to keep a cache in the Layer as suggested by Ede, and
>> use the Layer's
>> listener to update the cache every time a feature is added, removed or
>> changed
>>
>> Michaël
>>
>>
>> Le 13/11/2016 à 19:51, edgar.sol...@web.de a écrit :
>>> thanks.. how about implementing the caching/listener approach if you
>> like to have icon? ..ede
>>>
>>> On 13.11.2016 18:57, Giuseppe Aruta wrote:
 Ok Ede, I didn't  know it. I will revert the change.
 Thanks again
 Peppe

 Il 13/Nov/2016 18:48,  ha scritto:

> Peppe,
>
> NACK.. this is going to get very slow for huge datasets containing
>> empty
> geoms only, as it is run on every redraw of the layer tree. please
>> cache
> the state and use a layer change listener or else users will complain
>> about
> a frozen OJ some time in the future and we will have a hard time to
> pinpoint the reason, again ;)
>
> ..ede
>
> On 13.11.2016 18:41, jump-pilot-...@lists.sourceforge.net wrote:
>> Revision: 5185
>>http://sourceforge.net/p/jump-pilot/code/5185
>> Author:   ma15569
>> Date: 2016-11-13 17:41:37 + (Sun, 13 Nov 2016)
>> Log Message:
>> ---
>> The layer tree shows a table icon for layers that have features with
> empty geometries
>> Modified Paths:
>> --
>>  core/trunk/src/com/vividsolutions/jump/workbench/
> ui/LayerNameRenderer.java
>> Modified: core/trunk/src/com/vividsolutions/jump/workbench/
> ui/LayerNameRenderer.java
>> ===
>> --- core/trunk/src/com/vividsolutions/jump/workbench/
>> ui/LayerNameRenderer.java
>2016-11-13 17:21:20 UTC (rev 5184)
>> +++ core/trunk/src/com/vividsolutions/jump/workbench/
>> ui/LayerNameRenderer.java
>2016-11-13 17:41:37 UTC (rev 5185)
>> @@ -36,6 +36,7 @@
>>   import java.awt.Rectangle;
>>   import java.io.File;
>>   import java.util.Iterator;
>> +import java.util.List;
>>
>>   import javax.swing.DefaultListCellRenderer;
>>   import javax.swing.Icon;
>> @@ -54,9 +55,11 @@
>>   import org.openjump.core.rasterimage.RasterImageLayer;
>>
>>   import com.vividsolutions.jts.geom.Envelope;
>> +import com.vividsolutions.jts.geom.Geometry;
>>   import com.vividsolutions.jump.I18N;
>>   import com.vividsolutions.jump.feature.Feature;
>>   import com.vividsolutions.jump.feature.FeatureCollection;
>> +import com.vividsolutions.jump.feature.FeatureCollectionWrapper;
>>   import com.vividsolutions.jump.io.datasource.DataSourceQuery;
>>   import com.vividsolutions.jump.util.StringUtil;
>>   import com.vividsolutions.jump.workbench.JUMPWorkbench;
>> @@ -118,6 +121,7 @@
>>   private ImageIcon rasterIcon = IconLoader.icon("map_13.png");
>>   private ImageIcon sextante_rasterIcon =
>> IconLoader.icon("mapSv2_13.
> png");
>>   private ImageIcon sextante_rasterIcon2 =
> IconLoader.icon("mapSv2_13bw.png");
>> +private ImageIcon table_Icon = IconLoader.icon("Table.gif");
>>   private final static String LAYER_NAME = I18N
>>   .get("org.openjump.core.ui.plugin.layer.
> LayerPropertiesPlugIn.Layer-Name");
>>   private final static String FILE_NAME =
> I18N.get("ui.MenuNames.FILE");
>> @@ -379,6 +383,12 @@
>>   .getFeatureCollectionWrapper().size() > 1 ?
> multiRasterIcon
>>  

Re: [JPP-Devel] r5187

2016-11-14 Thread Giuseppe Aruta
Thanks Michael.
I will take time to translate all language codes before new real.
Peppe

Il 14/Nov/2016 09:02, "Michaël Michaud"  ha
scritto:

> Hi Jumpers,
>
> In r5187, I deactivated disjoint predicate in spatial query, simple
> query and simple join plugins.
>
> The reason is that this operation is generally felt as buggy by users
> even if it is not really.
> As for other operators, using this predicate with layers containing
> several features will return
> any feature having a disjoint relation with **any** of the reference
> layer, which often lead to
> return all features.
>
> Indeed, the user generally wants to get features disjoining **all*
> features of the reference layer.
> To get this result, the user generally have to select intersecting
> features and inverse the result
> (take the complement).
>
> Let me know if you know any use case where the user really wants to get
> feature disjoining
> **any** feature of the reference layer.
>
> r5187 also incudes the addition of two predicates
> - geometry A intersects interior point of geometry B
> - interior point of geometry A intersects geometry B
>
> Michaël
>
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] SVN: [5185] core/trunk/src/com/vividsolutions/jump/workbench/ui/ LayerNameRenderer.java

2016-11-14 Thread Giuseppe Aruta
Thanks Michael Ede
Indeed I came across (as a side relative problem ) working on Saxtante.
Sextante allows to work on Table files while Oj not. We can take advance of
the Sextante table algorithms  allowing Sextante to decode the vector
layers, with all features with empty geometries (see  for instance loading
.csv on auto mode) as tables (I already added added into Sextante binding a
Boolean method that allows to decode these files).
I wondered if users would also have benefit  to visualize that a table is
loaded into OJ workbench, with a table icon.
I will check other solutions. Thanks for the hint.
Peppe

Il 13/Nov/2016 23:21, "Michaël Michaud"  ha
scritto:

> Hi Peppe,
>
> Seel also my answer on 2016-10-29.
>
> TreeLayerNamePanel has a listener, but to avoid a featureCollection scan
> after each change
> you probably need to keep a cache in the Layer as suggested by Ede, and
> use the Layer's
> listener to update the cache every time a feature is added, removed or
> changed
>
> Michaël
>
>
> Le 13/11/2016 à 19:51, edgar.sol...@web.de a écrit :
> > thanks.. how about implementing the caching/listener approach if you
> like to have icon? ..ede
> >
> > On 13.11.2016 18:57, Giuseppe Aruta wrote:
> >> Ok Ede, I didn't  know it. I will revert the change.
> >> Thanks again
> >> Peppe
> >>
> >> Il 13/Nov/2016 18:48,  ha scritto:
> >>
> >>> Peppe,
> >>>
> >>> NACK.. this is going to get very slow for huge datasets containing
> empty
> >>> geoms only, as it is run on every redraw of the layer tree. please
> cache
> >>> the state and use a layer change listener or else users will complain
> about
> >>> a frozen OJ some time in the future and we will have a hard time to
> >>> pinpoint the reason, again ;)
> >>>
> >>> ..ede
> >>>
> >>> On 13.11.2016 18:41, jump-pilot-...@lists.sourceforge.net wrote:
>  Revision: 5185
> http://sourceforge.net/p/jump-pilot/code/5185
>  Author:   ma15569
>  Date: 2016-11-13 17:41:37 + (Sun, 13 Nov 2016)
>  Log Message:
>  ---
>  The layer tree shows a table icon for layers that have features with
> >>> empty geometries
>  Modified Paths:
>  --
>   core/trunk/src/com/vividsolutions/jump/workbench/
> >>> ui/LayerNameRenderer.java
>  Modified: core/trunk/src/com/vividsolutions/jump/workbench/
> >>> ui/LayerNameRenderer.java
>  ===
>  --- core/trunk/src/com/vividsolutions/jump/workbench/
> ui/LayerNameRenderer.java
> >>>2016-11-13 17:21:20 UTC (rev 5184)
>  +++ core/trunk/src/com/vividsolutions/jump/workbench/
> ui/LayerNameRenderer.java
> >>>2016-11-13 17:41:37 UTC (rev 5185)
>  @@ -36,6 +36,7 @@
>    import java.awt.Rectangle;
>    import java.io.File;
>    import java.util.Iterator;
>  +import java.util.List;
> 
>    import javax.swing.DefaultListCellRenderer;
>    import javax.swing.Icon;
>  @@ -54,9 +55,11 @@
>    import org.openjump.core.rasterimage.RasterImageLayer;
> 
>    import com.vividsolutions.jts.geom.Envelope;
>  +import com.vividsolutions.jts.geom.Geometry;
>    import com.vividsolutions.jump.I18N;
>    import com.vividsolutions.jump.feature.Feature;
>    import com.vividsolutions.jump.feature.FeatureCollection;
>  +import com.vividsolutions.jump.feature.FeatureCollectionWrapper;
>    import com.vividsolutions.jump.io.datasource.DataSourceQuery;
>    import com.vividsolutions.jump.util.StringUtil;
>    import com.vividsolutions.jump.workbench.JUMPWorkbench;
>  @@ -118,6 +121,7 @@
>    private ImageIcon rasterIcon = IconLoader.icon("map_13.png");
>    private ImageIcon sextante_rasterIcon =
> IconLoader.icon("mapSv2_13.
> >>> png");
>    private ImageIcon sextante_rasterIcon2 =
> >>> IconLoader.icon("mapSv2_13bw.png");
>  +private ImageIcon table_Icon = IconLoader.icon("Table.gif");
>    private final static String LAYER_NAME = I18N
>    .get("org.openjump.core.ui.plugin.layer.
> >>> LayerPropertiesPlugIn.Layer-Name");
>    private final static String FILE_NAME =
> >>> I18N.get("ui.MenuNames.FILE");
>  @@ -379,6 +383,12 @@
>    .getFeatureCollectionWrapper().size() > 1 ?
> >>> multiRasterIcon
>    : rasterIcon);
>    imageLabel.setVisible(true);
>  +} else if (showColorPanel && layerable instanceof Layer
>  +&& isTable((Layer) layerable)) {
>  +  //Show a table icon if the Layer has features with empty
> >>> geometries
>  +imageLabel.setIcon(table_Icon);
>  +imageLabel.setVisible(true);
>  +
>    } else if (showColorPanel && layerable instanceof Layer) {
>    colorPanel.init((Layer) layerable, isSelected,
>    

[JPP-Devel] r5187

2016-11-14 Thread Michaël Michaud
Hi Jumpers,

In r5187, I deactivated disjoint predicate in spatial query, simple 
query and simple join plugins.

The reason is that this operation is generally felt as buggy by users 
even if it is not really.
As for other operators, using this predicate with layers containing 
several features will return
any feature having a disjoint relation with **any** of the reference 
layer, which often lead to
return all features.

Indeed, the user generally wants to get features disjoining **all* 
features of the reference layer.
To get this result, the user generally have to select intersecting 
features and inverse the result
(take the complement).

Let me know if you know any use case where the user really wants to get 
feature disjoining
**any** feature of the reference layer.

r5187 also incudes the addition of two predicates
- geometry A intersects interior point of geometry B
- interior point of geometry A intersects geometry B

Michaël


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel