Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Eclipse framework comments

Hello,

As Jody mentioned, it is not too difficult to add a new projection to
geotools. An outdated tutorial about the process is here:

http://docs.codehaus.org/display/GEOTOOLS/How+to+add+new+projections

For geotools 2.1.x the process is similar, but we are dealing with
parameters differently now. The necessary steps are described in the
geotools developer email list. I think I descibed them for the last
person to ask out the NZ projection and Martin described the steps
recently for someone requesting the equirectangular. Start from
Mercator.java and pattern your new class on it. 

To add your new projection, you just need the new class in a jar on your
classpath with a META-INF/services entry like:

http://svn.geotools.org/geotools/trunk/gt/module/referencing/src/META-INF/services/org.geotools.referencing.operation.MathTransformProvider

Theoretically the MathTransformFactory should pick up your new class and
add it to the list of projections (note, you are probably the first to
try having a projection class in a separate jar, let us know if it does
not work). No modifications to geotools or udig should be needed. You
can see the list of projection providers by running
org.geotools.referencing.operation.DefaultMathTransformFactory.

I am trying to get back into geotools stuff (took the summer off) and
would be happy to answer any questions about projections you run into.
Just email the geotools developer list and cc me so I see it. It would
usually take me one saturday to implement a basic projection (after
researching it the previous week) and then a few more weeks of spare
time to get all the parameters correct and the projection properly
tested.

Rueben


On Wed, 2005-12-10 at 19:33 -0700, jgarnett wrote:
> Mark Presling wrote:

> 
> > That's also very good news about the NZ projection,  we are going to 
> > need that working in coming weeks. Any idea how long it will take to be 
> > incorporated into uDig once it is completed in geotools?
> 
> Just drop a new jar into libs (actually post a new version to 
> lists.refractions.net/geotools/gt/ but who is counting).
> 
> Justin is working on it - but simply as a curiosity after having a nice chat 
> with Rueben over beers (both are CCed on this email). My understanding is that 
> Ruben ports the occasional thing over from from Proj when people ask nicely, and 
> has hinted at writing Justin some documentation as he figures out the CRS API 
> from the inside.
> 
> I think they are both crazy, but that is why I like open-source.
> 
> Jody
> 



Back to the top