Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Methods to write a Tool

>> There are 2 interfaces for most model elements.  One is for read/only
>> and the other permits read/write.  The reason for this is to push
>> you(developers) to use commands to interact with the model so that
>> undo and redo actions will work.  So you can create a MapCommand and
>> cast your layer to its Layer interface and call setCRS.
>> First check the existing Commands by checking the type Hierarchy on
>> UndoableCommand and MapCommand.
>> Here it is:  SetLayerCRSCommand
> Exactly how slould i do this?
> suppose i have not the 'new' crs althought i know how it should be.
> Using this code
> SetLayerCRSCommand setCrs = new SetLayerCRSCommand(ILayer l,
> CoordinateReferenceSystem crs);
> i can make the change of projection but how do i create an object
> CoordinateReferenceSystem containing what i want?

Here you find the snippets that answer your question:
http://docs.codehaus.org/display/GEOTDOC/01+CRS+Helper+Class

Andrea



>
> Thanks.
> Gabriele Lipari
> --
> View this message in context: http://www.nabble.com/basic-methods-to-write-a-udig-plugin-tp17123664p17276997.html
> Sent from the udig-devel mailing list archive at Nabble.com.
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>


Back to the top