Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java	(revision 31358)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java	(revision 31359)
@@ -204,5 +204,5 @@
     SimpleDateFormat formatter = new SimpleDateFormat(format);
     try {
-      Date dateTime = (Date) formatter.parse(date);
+      Date dateTime = formatter.parse(date);
       return dateTime.getTime();
     } catch (ParseException e) {
@@ -224,5 +224,5 @@
   /**
    * Sets the MapillarySequence object which contains the MapillaryImage.
-   * 
+   *
    * @param sequence
    *          The MapillarySequence that contains the MapillaryImage.
@@ -234,5 +234,5 @@
   /**
    * Returns the sequence which contains this image.
-   * 
+   *
    * @return The MapillarySequence object that contains this MapillaryImage.
    */
@@ -244,5 +244,5 @@
    * If the MapillaryImage belongs to a MapillarySequence, returns the next
    * MapillarySequence in it.
-   * 
+   *
    * @return The following MapillaryImage, or null if there is none.
    */
@@ -258,5 +258,5 @@
    * If the MapillaryImage belongs to a MapillarySequence, returns the previous
    * MapillarySequence in it.
-   * 
+   *
    * @return The previous MapillaryImage, or null if there is none.
    */
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java	(revision 31358)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java	(revision 31359)
@@ -89,4 +89,5 @@
   }
 
+  @Override
   public String toString() {
     return "Image[key=" + this.key + ";lat=" + this.latLon.lat() + ";lon=" + this.latLon.lon() + ";ca=" + this.ca + "]";
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java	(revision 31358)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java	(revision 31359)
@@ -109,17 +109,13 @@
       double lonValue = 0;
       double caValue = 0;
-      if (lat != null && lat.getValue() instanceof RationalNumber[])
-        latValue = DegMinSecToDouble((RationalNumber[]) lat.getValue(), lat_ref.getValue().toString());
-      if (lon != null && lon.getValue() instanceof RationalNumber[])
-        lonValue = DegMinSecToDouble((RationalNumber[]) lon.getValue(), lon_ref.getValue().toString());
+      if (lat.getValue() instanceof RationalNumber[])
+        latValue = degMinSecToDouble((RationalNumber[]) lat.getValue(), lat_ref.getValue().toString());
+      if (lon.getValue() instanceof RationalNumber[])
+        lonValue = degMinSecToDouble((RationalNumber[]) lon.getValue(), lon_ref.getValue().toString());
       if (ca != null && ca.getValue() instanceof RationalNumber)
         caValue = ((RationalNumber) ca.getValue()).doubleValue();
-      if (lat_ref.getValue().toString().equals("S"))
-        latValue = -latValue;
-      if (lon_ref.getValue().toString().equals("W"))
-        lonValue = -lonValue;
       if (datetimeOriginal != null)
-        MapillaryData.getInstance().add(
-            new MapillaryImportedImage(latValue, lonValue, caValue, file, datetimeOriginal.getStringValue()));
+        MapillaryData.getInstance()
+            .add(new MapillaryImportedImage(latValue, lonValue, caValue, file, datetimeOriginal.getStringValue()));
       else
         MapillaryData.getInstance().add(new MapillaryImportedImage(latValue, lonValue, caValue, file));
@@ -149,9 +145,42 @@
   }
 
-  public static double DegMinSecToDouble(RationalNumber[] degMinSec, String ref) {
-    RationalNumber deg = degMinSec[0];
-    RationalNumber min = degMinSec[1];
-    RationalNumber sec = degMinSec[2];
-    return deg.doubleValue() + min.doubleValue() / 60 + sec.doubleValue() / 3600;
+  /**
+   * Calculates the decimal degree-value from a degree value given in degrees-minutes-seconds-format
+   *
+   * @param degMinSec an array of length 3, the values in there are (in this order) degrees, minutes and seconds
+   * @param ref the latitude or longitude reference determining if the given value is:
+   *        <ul>
+   *        <li>north ({@link GpsTagConstants#GPS_TAG_GPS_LATITUDE_REF_VALUE_NORTH}) or
+   *        south ({@link GpsTagConstants#GPS_TAG_GPS_LATITUDE_REF_VALUE_SOUTH}) of the equator</li>
+   *        <li>east ({@link GpsTagConstants#GPS_TAG_GPS_LONGITUDE_REF_VALUE_EAST}) or
+   *        west ({@link GpsTagConstants#GPS_TAG_GPS_LONGITUDE_REF_VALUE_WEST}) of the equator</li>
+   *        </ul>
+   * @return the decimal degree-value for the given input, negative when west of 0-meridian or south of equator,
+   *         positive otherwise
+   * @throws IllegalArgumentException if {@code degMinSec} doesn't have length 3 or if {@code ref} is not one of the
+   *         values mentioned above
+   */ // TODO: Maybe move into a separate utility class?
+  public static double degMinSecToDouble(RationalNumber[] degMinSec, String ref) {
+    if (degMinSec == null || degMinSec.length != 3) { throw new IllegalArgumentException(); }
+    switch (ref) {
+    case GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF_VALUE_NORTH:
+    case GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF_VALUE_SOUTH:
+    case GpsTagConstants.GPS_TAG_GPS_LONGITUDE_REF_VALUE_EAST:
+    case GpsTagConstants.GPS_TAG_GPS_LONGITUDE_REF_VALUE_WEST:
+      break;
+    default:
+      throw new IllegalArgumentException();
+    }
+
+    double result = degMinSec[0].doubleValue(); // degrees
+    result += degMinSec[1].doubleValue() / 60; // minutes
+    result += degMinSec[2].doubleValue() / 3600; // seconds
+
+    if (ref == GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF_VALUE_SOUTH
+        || ref == GpsTagConstants.GPS_TAG_GPS_LONGITUDE_REF_VALUE_WEST) {
+      result *= -1;
+    }
+
+    return result;
   }
 }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java	(revision 31358)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java	(revision 31359)
@@ -104,16 +104,10 @@
       double lonValue = 0;
       double caValue = 0;
-      if (lat != null && lat.getValue() instanceof RationalNumber[])
-        latValue = MapillaryImportAction.DegMinSecToDouble((RationalNumber[]) lat.getValue(), lat_ref.getValue()
-            .toString());
-      if (lon != null && lon.getValue() instanceof RationalNumber[])
-        lonValue = MapillaryImportAction.DegMinSecToDouble((RationalNumber[]) lon.getValue(), lon_ref.getValue()
-            .toString());
+      if (lat.getValue() instanceof RationalNumber[])
+        latValue = MapillaryImportAction.degMinSecToDouble((RationalNumber[]) lat.getValue(), lat_ref.getValue().toString());
+      if (lon.getValue() instanceof RationalNumber[])
+        lonValue = MapillaryImportAction.degMinSecToDouble((RationalNumber[]) lon.getValue(), lon_ref.getValue().toString());
       if (ca != null && ca.getValue() instanceof RationalNumber)
         caValue = ((RationalNumber) ca.getValue()).doubleValue();
-      if (lat_ref.getValue().toString().equals("S"))
-        latValue = -latValue;
-      if (lon_ref.getValue().toString().equals("W"))
-        lonValue = -lonValue;
 
       MapillaryImportedImage image = new MapillaryImportedImage(latValue, lonValue, caValue, file,
