CoordinateWriter could use more efficient formatting for most real world 
coordinates
------------------------------------------------------------------------------------

                 Key: GEOT-2041
                 URL: http://jira.codehaus.org/browse/GEOT-2041
             Project: GeoTools
          Issue Type: Improvement
          Components: core main
    Affects Versions: 2.5.0, 2.6-M0
            Reporter: Andrea Aime
            Assignee: Andrea Aime
             Fix For: 2.5.0, 2.6-M0


DecimalFormat is a well known performance sink, see for example "Java 
Performance Tuning". Without going into the algorithm proposed in the book, 
whose usability in a open source library is dubious at best due to copyright 
issues, we can use Double.toString() for most of the real world coordinates. 
Double.toString() already generates the desired format for numbers between 
10e-3 and 10e7, that is, the vast majority of numbers used in real world 
geographic and projected srs, and rounding can be performed by simple double 
math. So, at least for that range, skip DecimalFormat and use a more efficient 
approach.

-- 
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

        

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to