Changeset 7236 in josm for trunk/src


Ignore:
Timestamp:
2014-06-10T11:38:47+02:00 (5 years ago)
Author:
bastiK
Message:

fixed #10115 - increase number of digits saved to file

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r6990 r7236  
    5656    private static DecimalFormat cDmMinuteFormatter = new DecimalFormat("00.000");
    5757    public static final DecimalFormat cDdFormatter;
     58    public static final DecimalFormat cDdHighPecisionFormatter;
    5859    static {
    5960        // Don't use the localized decimal separator. This way we can present
     
    6162        cDdFormatter = (DecimalFormat) NumberFormat.getInstance(Locale.UK);
    6263        cDdFormatter.applyPattern("###0.0######");
     64        cDdHighPecisionFormatter = (DecimalFormat) NumberFormat.getInstance(Locale.UK);
     65        cDdHighPecisionFormatter.applyPattern("###0.0##########");
    6366    }
    6467
  • trunk/src/org/openstreetmap/josm/io/OsmWriter.java

    r7233 r7236  
    1313
    1414import org.openstreetmap.josm.data.coor.CoordinateFormat;
     15import org.openstreetmap.josm.data.coor.LatLon;
    1516import org.openstreetmap.josm.data.osm.Changeset;
    1617import org.openstreetmap.josm.data.osm.DataSet;
     
    182183        } else {
    183184            if (n.getCoor() != null) {
    184                 out.print(" lat='" +n.getCoor().latToString(CoordinateFormat.DECIMAL_DEGREES)+
    185                           "' lon='"+n.getCoor().lonToString(CoordinateFormat.DECIMAL_DEGREES)+"'");
     185                out.print(" lat='"+LatLon.cDdHighPecisionFormatter.format(n.getCoor().lat())+
     186                          "' lon='"+LatLon.cDdHighPecisionFormatter.format(n.getCoor().lon())+"'");
    186187            }
    187188            addTags(n, "node", true);
Note: See TracChangeset for help on using the changeset viewer.