Discussion:
[udig-devel] GeoSelectionService, ISelectionService and Programmatically Creating Selection
Tawan Banchuen
2010-05-26 22:38:02 UTC
Permalink
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:

http://udig.refractions.net/confluence/display/DEV/2+Training+Materials#2TrainingMaterials-WorkbenchSelection

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.refractions.net/pipermail/udig-devel/attachments/20100527/cbd70d79/attachment.html>
Jody Garnett
2010-05-27 10:16:50 UTC
Permalink
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
Post by Tawan Banchuen
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
http://udig.refractions.net/confluence/display/DEV/2+Training+Materials#2TrainingMaterials-WorkbenchSelection
net.refractions.udig.tools.internal
Is there one?
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.refractions.net/pipermail/udig-devel/attachments/20100527/11d99e9e/attachment-0001.html>
Tawan Banchuen
2010-05-28 00:58:23 UTC
Permalink
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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen shot 2010-05-28 at 12.37.49 PM.png
Type: image/png
Size: 387082 bytes
Desc: Screen shot 2010-05-28 at 12.37.49 PM.png
URL: <Loading Image...>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001..txt
URL: <http://lists.refractions.net/pipermail/udig-devel/attachments/20100528/19228335/attachment-0001.txt>
Jody Garnett
2010-05-28 01:09:17 UTC
Permalink
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
Post by Tawan Banchuen
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
Jody Garnett
2010-05-28 05:36:32 UTC
Permalink
Post by Tawan Banchuen
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
Post by Tawan Banchuen
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
tbanchuin
2010-06-01 06:00:41 UTC
Permalink
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
Post by Jody Garnett
Post by Tawan Banchuen
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
Post by Tawan Banchuen
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
--
View this message in context: http://old.nabble.com/GeoSelectionService%2C-ISelectionService-and-Programmatically-Creating-Selection-tp28687394p28737955.html
Sent from the udig-devel mailing list archive at Nabble.com.
Loading...