That would be a great bug report and patch :-) I do not think the limitation 
was intentional, but we will need to test to be sure. 

I have a small understanding of the snapping functionality performing a query 
against the other layers in order to pull in geometry to snap to. Where exactly 
it holds onto that information we will have to look into. It may be holding it 
in an "EditGeom" for each layer which would explain the check for 
Interaction.EDIT.

But yeah try removing the limitation and test, perhaps with debugger, and then 
you can tell us how it works out! 

-- 
Jody Garnett


On Tuesday, 29 January 2013 at 3:21 AM, Panagiotis Skintzos wrote:

> Hi,
> 
> is there a special reason why the "All layers" snapping option works only for 
> editable layers?
> 
> In my current project, one condition is that all the (wfs) layers are not 
> directly editable. 
> Instead I use only one editable layer ("blackboard"), to create (or edit 
> existing) geometries 
> and I update the real wfs store programmatically.
> 
> With the current snapping options, it's impossible to use snapping, 
> since I have only one editing layer which contains none or just one feature.
> 
> I need to snap into features from other wfs read-only layers. 
> 
> I see that the relevant code is in 
> net.refractions.udig.tools.edit.support.EditUtils
> In searchLayer function:
>         if (!layer.hasResource(FeatureSource.class) || 
>                 !layer.getInteraction(Interaction.EDIT) 
>                 || !layer.isVisible() )
>             return null;
> 
> 
> I guess this "layer.getInteraction(Interaction.EDIT)" condition, is the one 
> that I need to remove. 
> 
> I could create a bug & patch, to add another snapping option or to simply 
> remove this limitation.
> What do you think?
> 
> -Pana  
> _______________________________________________
> 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 via email to