}\r
\r
//---- EXIF GPS_ ----\r
- final String longitudeRef = (longitude < 0 ? "W" : "E");\r
longitude = Math.abs(longitude);\r
- final String latitudeRef = (latitude < 0 ? "S" : "N");\r
latitude = Math.abs(latitude);\r
\r
+ /*\r
+ final String longitudeRef = (longitude < 0 ? "W" : "E");\r
+ final String latitudeRef = (latitude < 0 ? "S" : "N");\r
gpsDir.removeField(GpsTagConstants.GPS_TAG_GPS_LONGITUDE_REF);\r
gpsDir.add(GpsTagConstants.GPS_TAG_GPS_LONGITUDE_REF, longitudeRef);\r
gpsDir.removeField(GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF);\r
final double longitudeMinutes = (value.setScale(0, RoundingMode.DOWN)).doubleValue();\r
value = value.subtract(BigDecimal.valueOf(longitudeMinutes));\r
value = value.multiply(BigDecimal.valueOf(60));\r
- final double longitudeSeconds = (value.setScale(0, RoundingMode.DOWN)).doubleValue();\r
+ final double longitudeSeconds = (value.setScale(3, BigDecimal.ROUND_HALF_UP)).doubleValue();\r
gpsDir.removeField(GpsTagConstants.GPS_TAG_GPS_LONGITUDE);\r
gpsDir.add(GpsTagConstants.GPS_TAG_GPS_LONGITUDE,\r
RationalNumber.valueOf(longitudeDegrees),\r
final double latitudeMinutes = (value.setScale(0, RoundingMode.DOWN)).doubleValue();\r
value = value.subtract(BigDecimal.valueOf(latitudeMinutes));\r
value = value.multiply(BigDecimal.valueOf(60));\r
- final double latitudeSeconds = (value.setScale(0, RoundingMode.DOWN)).doubleValue(); gpsDir.removeField(GpsTagConstants.GPS_TAG_GPS_LATITUDE);\r
+ final double latitudeSeconds = (value.setScale(3, BigDecimal.ROUND_HALF_UP)).doubleValue();\r
+ gpsDir.removeField(GpsTagConstants.GPS_TAG_GPS_LATITUDE);\r
gpsDir.add(GpsTagConstants.GPS_TAG_GPS_LATITUDE,\r
RationalNumber.valueOf(latitudeDegrees),\r
RationalNumber.valueOf(latitudeMinutes),\r
RationalNumber.valueOf(latitudeSeconds));\r
}\r
+ */\r
+ outputSet.setGPSInDegrees(longitude, latitude);\r
}\r
\r
ExifRewriter rewriter = new ExifRewriter();\r