[OpenMap Users] Errors using openmap LL -> UTM convsersions

From: Peter Wilkes <pwilkes_at_cowpie.acm.vt.edu>
Date: Wed, 29 Jun 2005 08:56:24 -0400 (EDT)

the application i'm working on needs to support LL, milgrid and UTM.

we recently got a new requirement to allow the user to select a convex
polygon by selecting the points on a map.

for whatever reason we've been using 0,0 (LL) for recentering of the map
for testing. what i've noticed however is that there is an issue with the
LL -> UTM conversion method in openmap.

i have a method to wrap conversion from LL -> UTM

public static UTMPoint decimalDegreesToUTMPoint(LatLonPoint pt)
        UTMPoint utm = UTMPoint.LLtoUTM(pt,Ellipsoid.WGS_84,null);
        return utm;

here is a snip of my mouseclicked event
Point point = new Point(event.getX(), event.getY());
// Get the current projection
Projection proj = getMapBean().getProjection();
// Project the x/y to lat/lon coordinates
LatLonPoint projPoint = proj.inverse(event.getX(), event.getY());
and here is the output of the system.out.printlns
UTMPoint[zone_number=30, easting=796875.0, northing=20827.0, hemisphere=N]
UTMPoint[zone_number=31, easting=206352.0, northing=32041.0, hemisphere=N]
UTMPoint[zone_number=31, easting=203129.0, northing=9958346.0, hemisphere=S]
UTMPoint[zone_number=30, easting=783963.0, northing=9943933.0, hemisphere=S]
it looks like the first two points converted fine. however it seems the
second two points did not.  the GUI appears fine as the points are placed
on the map via the LL coordinates however if i update the text areas which
display the UTM coordinate (just add and remove space to trigger change
event) then the points get moved based on the UTM coordinate. when that
occurs the 2nd two points seem to "wrap" themselves around to above the
north pole.
Is this a known bug? any recommendations on how i could resolve this
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Jun 29 2005 - 09:05:42 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT