[mkgmap-dev] [PATCH] NumberFormat in Splitter
From Johann Gail johann.gail at gmx.de on Tue Feb 17 22:07:48 GMT 2009
OK, my previous patch has been tested and worked. But to minimize further risk of locale problems I would prefer the following patch: Index: src/uk/me/parabola/splitter/SubArea.java =================================================================== --- src/uk/me/parabola/splitter/SubArea.java (Revision 21) +++ src/uk/me/parabola/splitter/SubArea.java (Arbeitskopie) @@ -25,6 +25,7 @@ import java.util.Formatter; import java.util.Iterator; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.zip.GZIPOutputStream; @@ -105,13 +106,11 @@ writer.append("<?xml version='1.0' encoding='UTF-8'?>\n"); writer.append("<osm version='0.5' generator='splitter'>\n"); - Formatter fmt = new Formatter(writer); - fmt.format("<bounds minlat='%f' minlon='%f' maxlat='%f' maxlon='%f'/>\n", - Utils.toDegrees(bounds.getMinLat()), - Utils.toDegrees(bounds.getMinLong()), - Utils.toDegrees(bounds.getMaxLat()), - Utils.toDegrees(bounds.getMaxLong())); - fmt.flush(); + writer.append("<bounds minlat="+Utils.toDegrees(bounds.getMinLat())); + writer.append(" minlon="+Utils.toDegrees(bounds.getMinLong())); + writer.append(" maxlat="+Utils.toDegrees(bounds.getMaxLat())); + writer.append(" maxlon="+Utils.toDegrees(bounds.getMaxLon())); + writer.append("/>\n"); } public void finishWrite() {
- Previous message: [mkgmap-dev] [PATCH] Print error message if no reading bounding box
- Next message: [mkgmap-dev] [PATCH] NumberFormat in Splitter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list