Re: Is there any rules to tranlate code from ANSI C to Java in the JEOTRANS Project?
- From: Steven Siebert <smsiebe@gmail.com>
- To: dev@jeotrans.kenai.com
- Subject: Re: Is there any rules to tranlate code from ANSI C to Java in the JEOTRANS Project?
- Date: Thu, 18 Mar 2010 18:37:40 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=fEVjLQzzVXrd+JIPhiPvqewH6CL35WW3Rr90aL1/4wbKLj+SF1+7wV7/wNEPE0MpCI pnOvgbHWsiiil5Ga9lOVdze3P9b2Hq5Lb0EOXk88xAxr9jEiyPSK2utQnAsfYHtPhH/p ea93+2oQBN6MA1mBdkt8M1o3dxv/8ITZkJEf8=
Hi Javier,
I wrote this for a DoD project and know where you're coming from. I would like to suggest contributing to the JEOTRANS project, of course, but understand the nature of contractor companies. BTW, the license allows you to just simply take the code and no need to contribute back - it may save you some time.
What I would suggest to be careful of is with the geodetic to MGRS conversion. MGRS projection isn't as clean as UTM, so to compute the projection 'anomalies' correctly, you must recalculate from transverse mercator back up the stack (geodetic->TM->UTM->MGRS). Same for the conversion back. When doing this, we change some of the parameters of the TM->UTM algorithm. I point this out specifically because I didn't think this through initially and ended up having to rewrite not just the algorithm but also the architecture.
This was the biggest 'gotcha', which may take some planing first in deciding on how to design your OO system. I built mine around the OGC API by leveraging the jscience library, which I would also suggest (OGC compliance). jscience also gave me unit safety (metrics and standard unit types are respected and handled abstractly). This helped prevent conversion errors and made unit testing a breeze!
If you're gonna go propritary, I would suggest starting with the jeotrans and build from there. The jscience backing is quite helpful for module add-ons. I don't see a c# port to jscience, but there may be something similar.
If you have any more questions, please don't hesitate to ask!
Steve
On Thu, Mar 18, 2010 at 6:13 PM, <javi.martineztorres@gmail.com> wrote:
Dear Mr. Siebert,
I am translating some parts of GEOTRANS to Java and C#. Is there any
conventions to develop, any methodology to translate ANSI C to Java? I
mean, what must I know before programming in this project?
I am working in a defense company and I have developed a code to parse
MGRS--> UTM and UTM --> MGRS based on GEOTRANS.
Regards.
Javier Martínez
|
Is there any rules to tranlate code from ANSI C to Java in the JEOTRANS Project? |
javi.martineztorres | 03/18/2010 |
|
Re: Is there any rules to tranlate code from ANSI C to Java in the JEOTRANS Project? |
Steven Siebert | 03/18/2010 |





