GeoSelectionService, ISelectionService and Programmatically Creating Selection

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

GeoSelectionService, ISelectionService and Programmatically Creating Selection

tbanchuin
Hi uDigers,

I am trying to synchronize selection in my application (based on Tupelo, another RCP project) with map selection in uDig.  I am a bit confused about two different selection services in uDig: GeoSelectionService and ISelectionService.  Which one should I register my listener to?  Are you in the process of moving towards using GeoSelectionService for geo-objects selection?

If I should work with GeoSelectionService, the info I found below is not very useful  Is there a better documentation?

http://udig.refractions.net/confluence/display/DEV/03+GeoSelectionService

On the other hand, I can easily register my listener to ISelectionService following this document: 


I am also trying to find a selection tool for my uDig map view plug-in.  I could not find a modal tool for selection in the package: 

net.refractions.udig.tools.internal

Is there one?

I wonder whether this is the correct way to create a map selection programmatically: I create an OpenGIS filter and then send it to the map view as follows:

map.sendCommandASync(SelectionCommandFactory.getInstance().createSelectCommand(layer, filter))

As you can see, the SelectionCommandFactory class has been deprecated.  What class should I use?

Thanks bunches for your help.

Regards,
Tawan



_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
Reply | Threaded
Open this post in threaded view
|

Re: GeoSelectionService, ISelectionService and Programmatically Creating Selection

Jody Garnett-2
Hi Tawan:

The idea of a global GeoSelectionService was proposed by another developer but not yet implemented. I think I myself know enough to implement it now.
I actually have the answer to this one since I was fussing over it with the the table of contents community module.

The workbench selection service is the way to go; the Map advertises what it is doing when the select tool is in use.
However that kind of changes depending on what tool the user is using.

You may also wish to listen to the map directly; the edit manager tracks the currently selected layer, and from there you can ask it for its current filter.

Jody

On 27/05/2010, at 8:38 AM, Tawan Banchuen wrote:

Hi uDigers,

I am trying to synchronize selection in my application (based on Tupelo, another RCP project) with map selection in uDig.  I am a bit confused about two different selection services in uDig: GeoSelectionService and ISelectionService.  Which one should I register my listener to?  Are you in the process of moving towards using GeoSelectionService for geo-objects selection?

If I should work with GeoSelectionService, the info I found below is not very useful  Is there a better documentation?

http://udig.refractions.net/confluence/display/DEV/03+GeoSelectionService

On the other hand, I can easily register my listener to ISelectionService following this document: 


I am also trying to find a selection tool for my uDig map view plug-in.  I could not find a modal tool for selection in the package: 

net.refractions.udig.tools.internal

Is there one?

I wonder whether this is the correct way to create a map selection programmatically: I create an OpenGIS filter and then send it to the map view as follows:

map.sendCommandASync(SelectionCommandFactory.getInstance().createSelectCommand(layer, filter))

As you can see, the SelectionCommandFactory class has been deprecated.  What class should I use?

Thanks bunches for your help.

Regards,
Tawan


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
Reply | Threaded
Open this post in threaded view
|

Re: GeoSelectionService, ISelectionService and Programmatically Creating Selection

tbanchuin
In reply to this post by tbanchuin
Hi Jody,

Thank you for the clarification.  That's very helpful.  I can focus on working with the workbench selection service until you perform your magic then. :-)

You may also know the answer to a related question: My map view do not synchronize with any other views except for the Web view (see a snapshot of my application attached).  I can click on a Web link to a WMS server, and add a WMS layer to the map.  The layer, however, does not show up in the Projects view or the Layers view.  When I add a shapefile to the map, it also does not show up in either of those views.  

Btw, I added a uDig plug-in to my application following the Seagull Tracking example and turned on the Web, Projects and Layers view from the Window > Show View dialog.  Will the views link up if I define them in the same perspective like in the Custom Application example?

Thanks again for your help.

Best,
Tawan


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Screen shot 2010-05-28 at 12.37.49 PM.png (517K) Download Attachment
ATT00001..txt (6 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GeoSelectionService, ISelectionService and Programmatically Creating Selection

Jody Garnett-2
Thought that was covered in the tracking example.
The various layer and projects view track what is going on - and check
if the current workbench selection can adapt to a Map.  They may also
check the WorkbenchPart and if its selection can adapt to a Map. And
then as your map view is selected, the layers view looks at it - and
checks its getSite() etc...

Jody

On Fri, May 28, 2010 at 10:58 AM, Tawan Banchuen
<[hidden email]> wrote:

> Hi Jody,
>
> Thank you for the clarification.  That's very helpful.  I can focus on working with the workbench selection service until you perform your magic then. :-)
>
> You may also know the answer to a related question: My map view do not synchronize with any other views except for the Web view (see a snapshot of my application attached).  I can click on a Web link to a WMS server, and add a WMS layer to the map.  The layer, however, does not show up in the Projects view or the Layers view.  When I add a shapefile to the map, it also does not show up in either of those views.
>
> Btw, I added a uDig plug-in to my application following the Seagull Tracking example and turned on the Web, Projects and Layers view from the Window > Show View dialog.  Will the views link up if I define them in the same perspective like in the Custom Application example?
>
> Thanks again for your help.
>
> Best,
> Tawan
>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
Reply | Threaded
Open this post in threaded view
|

Re: GeoSelectionService, ISelectionService and Programmatically Creating Selection

Jody Garnett-2
In reply to this post by tbanchuin
On 28/05/2010, at 10:58 AM, Tawan Banchuen wrote:

> Hi Jody,
>
> Thank you for the clarification.  That's very helpful.  I can focus on working with the workbench selection service until you perform your magic then. :-)

As for magic - there will be magic. The magic of collaboration :-) What do we actually want out of a GeoSelectionService?

As an interested party you get to set the pace of things - what do you want?

From my stand point I would like to replace the magic UDIGView interface and ask views to listen to and tract a GeoSelectionServerice instead. I am not sure if that is what the author had in mind here...
- http://www.refractions.net:8080/confluence/display/HACK/GeoSelection+Service

In short we should review this page and see if we can make sense of it.
Jody

>
> You may also know the answer to a related question: My map view do not synchronize with any other views except for the Web view (see a snapshot of my application attached).  I can click on a Web link to a WMS server, and add a WMS layer to the map.  The layer, however, does not show up in the Projects view or the Layers view.  When I add a shapefile to the map, it also does not show up in either of those views.  
>
> Btw, I added a uDig plug-in to my application following the Seagull Tracking example and turned on the Web, Projects and Layers view from the Window > Show View dialog.  Will the views link up if I define them in the same perspective like in the Custom Application example?
>
> Thanks again for your help.
>
> Best,
> Tawan
>
> <Screen shot 2010-05-28 at 12.37.49 PM.png><ATT00001..txt>_______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
Reply | Threaded
Open this post in threaded view
|

Re: GeoSelectionService, ISelectionService and Programmatically Creating Selection

tbanchuin
I read the GeoSelectionService document again.  I cannot claim that I quite understand the differeces between SelectionService and GeoSelectionService just yet.  However, the ability to select geographic objects accross multiple maps and contexts will be very handy.  A simple usage would be to contruct a spatial query by selecting land use types, businesses and community services accross maps and creating buffers around them.  

Our research group will be working with the workbench selection service over the next coming months as we try to coordinate our graph view with the uDig map view.  I will report back to the list what we find the current workbench selection service to be lacking.

Cheers,
Tawan



Jody Garnett-3 wrote
On 28/05/2010, at 10:58 AM, Tawan Banchuen wrote:

> Hi Jody,
>
> Thank you for the clarification.  That's very helpful.  I can focus on working with the workbench selection service until you perform your magic then. :-)

As for magic - there will be magic. The magic of collaboration :-) What do we actually want out of a GeoSelectionService?

As an interested party you get to set the pace of things - what do you want?

From my stand point I would like to replace the magic UDIGView interface and ask views to listen to and tract a GeoSelectionServerice instead. I am not sure if that is what the author had in mind here...
- http://www.refractions.net:8080/confluence/display/HACK/GeoSelection+Service

In short we should review this page and see if we can make sense of it.
Jody

>
> You may also know the answer to a related question: My map view do not synchronize with any other views except for the Web view (see a snapshot of my application attached).  I can click on a Web link to a WMS server, and add a WMS layer to the map.  The layer, however, does not show up in the Projects view or the Layers view.  When I add a shapefile to the map, it also does not show up in either of those views.  
>
> Btw, I added a uDig plug-in to my application following the Seagull Tracking example and turned on the Web, Projects and Layers view from the Window > Show View dialog.  Will the views link up if I define them in the same perspective like in the Custom Application example?
>
> Thanks again for your help.
>
> Best,
> Tawan
>
> <Screen shot 2010-05-28 at 12.37.49 PM.png><ATT00001..txt>_______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel