[JSCIENCE-173] UTM getCentralMeridian Improvement Created: 13/Apr/14  Updated: 13/Apr/14

Status: Open
Project: jscience
Component/s: Geography
Affects Version/s: Version 5.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: dautelle Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


The method 'getCentralMeridian(int, char)' in 'org.jscience.geography.coordinates.UTM.java' makes exceptions for several zones.
But the central meridian depends only on the identifier of the longitudeZone.
The zone 32V is extended on the left side by 3°, even the zone 37X.
The zone 31V is cutted on right side by 3°, 31X is extended on right side. 33X and 35X are extended on both sides.
The central meridian for UTM stands in all cases on its original position.
The only exceptions are the polar zones, which has no central meridian.

So this is sufficient:

public static double getCentralMeridian(int longitudeZone, char latitudeZone) {
// polar zones
if (latitudeZone < 'C' || latitudeZone > 'X')

{ return 0.0; }

return (longitudeZone - 1) * 6 - 180 + 3;

Peer-Cedric Hänsel

Generated at Sun Oct 04 12:09:20 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.