Changeset 8132 in josm for trunk/src/com/drew/lang/GeoLocation.java
- Timestamp:
- 2015-03-10T01:17:39+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/drew/lang/GeoLocation.java
r6127 r8132 1 1 /* 2 * Copyright 2002-201 2Drew Noakes2 * Copyright 2002-2015 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 * More information about this project is available at: 17 17 * 18 * http ://drewnoakes.com/code/exif/19 * http ://code.google.com/p/metadata-extractor/18 * https://drewnoakes.com/code/exif/ 19 * https://github.com/drewnoakes/metadata-extractor 20 20 */ 21 21 … … 25 25 import com.drew.lang.annotations.Nullable; 26 26 27 import java.text.DecimalFormat; 28 27 29 /** 28 30 * Represents a latitude and longitude pair, giving a position on earth in spherical coordinates. 31 * <p> 29 32 * Values of latitude and longitude are given in degrees. 33 * <p> 30 34 * This type is immutable. 31 35 */ … … 79 83 { 80 84 double[] dms = decimalToDegreesMinutesSeconds(decimal); 81 return dms[0] + "° " + dms[1] + "' " + dms[2] + '"'; 85 DecimalFormat format = new DecimalFormat("0.##"); 86 return String.format("%s° %s' %s\"", format.format(dms[0]), format.format(dms[1]), format.format(dms[2])); 82 87 } 83 88
Note:
See TracChangeset
for help on using the changeset viewer.