Hi,

Here are some hints about the pb

It happens because the selection is done on "cloned" features, not on 
source features
You can see it on line 199 in SpatialQueryExecutor.
Just removing the clone part of the function will fix the bug... but it 
will have a side effect that may be considered as worst as the bug :-(
If you don't clone the feature and the user ask for a new layer, you 
will have references to the same java object in both layers, which is 
probably not very safe (1).

Returning the source feature or a copy will depend on what did the user ask.
selection --> no clone
new layer --> clone

You may need to pass a new parameter in SpatialQueryExecutor to achieve that

Michaël

(1) in fact, I'm not sure if having the same feature in several layers 
(without clone) is a good or a dangerous idea. I think it could be nice 
to have a kind of "view" (like in database) to be able to work easily on 
a small part of a large featurecollection or to apply different styles 
to a featureCollection without cloning objects...

Sunburned Surveyor a écrit :
> Before I examined the source code for the spatial query bug, I decided
> to see if I could duplicate the incorrect behavior.
>
> I was not able to do this.
>
> I successfully executed a spatial query and was able to copy & cut the
> resulting selection from the source layer, pasting the selected
> features to a destination layer.
>
> Has anyone else been able to duplicate this bug? As far as I can tell,
> the selections created by the spatial query tool behave like all other
> JUMP selections.
>
> If someone can confirm this isn't a real bug, I will close the bug
> report. In this case, I will take a look at the other bug that Stefan
> mentioned.
>
> The Sunburned Surveyor
>
> On Fri, Mar 6, 2009 at 2:51 PM, Sunburned Surveyor
> <sunburned.surve...@gmail.com> wrote:
>   
>> I meant to say "check with you on the desired behavior of the plug-in"...
>>
>> SS
>>
>> On Fri, Mar 6, 2009 at 1:51 PM, Sunburned Surveyor
>> <sunburned.surve...@gmail.com> wrote:
>>     
>>> Thanks for the help Stefan. I hope to start work on this bug next
>>> week. I may need to check on the desired behavior of the plug-in again
>>> after I have looked at the code.
>>>
>>> SS
>>>
>>> On Fri, Mar 6, 2009 at 12:09 PM, Stefan Steiniger <sst...@geo.uzh.ch> wrote:
>>>       
>>>> Hei,
>>>>
>>>> so I just had to check... it is the plugin:
>>>> ui.plugin.analysis.SpatialQueryPlugIn of the original JUMP
>>>>
>>>> the case where the selection is needed is for instance if feature in one
>>>> layer appear also in a second layer and one wants to find those using
>>>> "equal".
>>>> Then the goal would be to delete or modify the features that appear in both
>>>> layers (e.g. "cut selected items" doesn't work) - I attach two datasets.
>>>>
>>>> stefan
>>>>
>>>> Sunburned Surveyor wrote:
>>>>         
>>>>> Here is the link to the bug tracker page for the bug I am talking about:
>>>>>
>>>>>
>>>>> http://sourceforge.net/tracker/index.php?func=detail&aid=2660272&group_id=118054&atid=679906
>>>>>
>>>>> SS
>>>>>
>>>>> On Fri, Mar 6, 2009 at 11:08 AM, Sunburned Surveyor
>>>>> <sunburned.surve...@gmail.com> wrote:
>>>>>           
>>>>>> I will start work on squishing the bug that has to do with "phantom"
>>>>>> feature selections produced by the spatial query functionality in
>>>>>> OpenJUMP.
>>>>>>
>>>>>> Can anyone tell me if the spatial query functionality is part of the
>>>>>> core program, or part of a plug-in? That will help me track down the
>>>>>> source code so I can get started.
>>>>>>
>>>>>> SS
>>>>>>
>>>>>>             
>>>>> ------------------------------------------------------------------------------
>>>>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
>>>>> CA
>>>>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>>>>> Enterprise
>>>>> -Strategies to boost innovation and cut costs with open source
>>>>> participation
>>>>> -Receive a $600 discount off the registration fee with the source code:
>>>>> SFAD
>>>>> http://p.sf.net/sfu/XcvMzF8H
>>>>> _______________________________________________
>>>>> Jump-pilot-devel mailing list
>>>>> Jump-pilot-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>>
>>>>>
>>>>>           
>>>> ------------------------------------------------------------------------------
>>>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, 
>>>> CA
>>>> -OSBC tackles the biggest issue in open source: Open Sourcing the 
>>>> Enterprise
>>>> -Strategies to boost innovation and cut costs with open source 
>>>> participation
>>>> -Receive a $600 discount off the registration fee with the source code: 
>>>> SFAD
>>>> http://p.sf.net/sfu/XcvMzF8H
>>>> _______________________________________________
>>>> Jump-pilot-devel mailing list
>>>> Jump-pilot-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>
>>>>
>>>>         
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>   


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to