Index: trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 5312)
+++ trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 5313)
@@ -628,6 +628,8 @@
         BigDecimal d = new BigDecimal(3, MathContext.DECIMAL128); // 1/2 * 6 = 3
         area  = area.multiply(d, MathContext.DECIMAL128);
-        north = north.divide(area, MathContext.DECIMAL128);
-        east = east.divide(area, MathContext.DECIMAL128);
+        if (area.compareTo(BigDecimal.ZERO) != 0) {
+            north = north.divide(area, MathContext.DECIMAL128);
+            east = east.divide(area, MathContext.DECIMAL128);
+        }
 
         return new EastNorth(east.doubleValue(), north.doubleValue());
