AngleFormat Rounding Up
-----------------------
Key: GEOT-3551
URL: http://jira.codehaus.org/browse/GEOT-3551
Project: GeoTools
Issue Type: Bug
Components: core referencing
Affects Versions: 2.7.0, 2.6.1
Environment: Ubuntu 10.04, Java 1.6_10
Reporter: Oliver Tupran
AngleFormat is not rounding up seconds to minutes and minutes to degrees and
it's not representing degrees in a 360 form. Please consider the following unit
test lines that I hope express better the problem at hand.
1. Rounding seconds to minutes; one would expect 60 seconds to be translated
into 1 minute
...
AngleFormat af = new AngleFormat("DD MM SS");
double value = 59.99d / 3600d; // 59.99 seconds
assertEquals("00 01 00", af.format(value));
...
2. Rounding minutes to degrees; one would expect 60 minutes to be translated
into 1 degree
...
AngleFormat af = new AngleFormat("DD MM");
double value = 59.99d / 60d; // 59.99 minutes
assertEquals("01 00", af.format(value));
...
3. 360 module; one would expect to be able to have degree values between 0
(inclusive) and 360 (exclusive) [0, 360)
...
AngleFormat af = new AngleFormat("DDD");
double value = 360d; // 360 degrees
assertEquals("000", af.format(value));
...
AngleFormat af = new AngleFormat("DDD");
double value = 361d; // 361 degrees
assertEquals("001", af.format(value));
...
I hope that my report is relevant and useful for improving GeoTools.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel