Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] How can I handle changing of layers projection programmatically?

Well I suspect there is a command .. since any change to Map/Layer stuff needs to be done via a command or we deadlock.

Not sure; let us look at how that operation does.... 

Looks like CRSPropertyPage has a applyCoordinateReferenceSystem method with the following:

UndoableComposite commands=new UndoableComposite();
List<MapCommand> commandList = commands.getCommands();
commandList.add(new SetLayerCRSCommand(layer, crs));

...

layer.getMap().sendCommandASync(commands);            


Since you just have one command; there is no need to do the UndoableComposte() thing.

On 08/06/2010, at 6:05 PM, Artemij Amanzi wrote: 
Hi,
 
How can I handle changing of layers projection programmatically?
(I selected Properties of necessary Layer and in projection tab changed CRS. Can I handle changing of CRS in my code? Maybe add some listener?)
 
Thanks
Artemij
 
 
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top