[OSRS-PROJ] java port of proj4j
j.macgill at geography.leeds.ac.uk
Sat Feb 23 12:18:01 EST 2002
(apologies if this reaches the list twice. I am sending again as I think
my first post was blocked by the new anti-spam filter - my address has
changed slightly since I subscribed)
I suggested on this list a LONG time ago that I would look at porting PROJ
into java, well at long last I have finally got round to doing it!
Prepare for the world's most unexciting screen grab....
>java org.geotools.proj4j.Proj +proj=tmerc
>java org.geotools.proj4j.Proj +proj=tmerc +es=0.2
OK, so its not all there yet by a long shot, but the core architecture has
been replicated, though with some moves to take advantage of OO.
It's been a bit of a balancing act to keep a structure that is similar
enough to PROJ to be familiar and easy to update as PROJ develops whilst
not producing awkward Java but I think I have it about right for now,
though I may well do a little more OO design over time.
So far I have only implemented tmerc and utm (ok so not hard) but I will be
moving through the others quite rapidly I hope, though support from others
at this stage would be excellent. (Not much is involved if you understand
a little Java as the structure is almost identical to the PJ_* files.)
What I could really do with is a good set of test files and typical
settings (and pathological cases) for each projection so that I can
continue to build up the library of unit tests I have created alongside the
port to ensure it is as faithful to PROJ as possible.
The brave can access the code from the geotools.org cvs repository:
cvs -z3 -d:pserver:anonymous at cvs.geotools.org:/cvsroot/geotools co proj4j
In addition to a java compiler you will need ant (a java make tool) and
junit (a testing suite) if you want to replicate the build and test process
that I am using.
Eventually proj4j will be available as a stand alone .jar file together
with .sh and .bat files to make running it almost identical to proj.
I would very much welcome comments on the approach I have taken with this port.
There is a long list of things still to do, as a taster:
lots of testing
formatting control (input and output)
rtodms (dmstor is done)
input from files (binary and ascii)
full replication of public api (transform is done but is untested)
lots more testing
Center for Computational Geography
Spell Checker (c) Creative Spelling inc (aka my dyslexic brain)
http://www.geotools.org the open source java mapping toolkit.
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
More information about the Proj