Index: src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 14992)
+++ src/org/openstreetmap/josm/data/validation/OsmValidator.java	(working copy)
@@ -55,6 +55,7 @@
 import org.openstreetmap.josm.data.validation.tests.MultipolygonTest;
 import org.openstreetmap.josm.data.validation.tests.NameMismatch;
 import org.openstreetmap.josm.data.validation.tests.OpeningHourTest;
+import org.openstreetmap.josm.data.validation.tests.OverlappingAreas;
 import org.openstreetmap.josm.data.validation.tests.OverlappingWays;
 import org.openstreetmap.josm.data.validation.tests.PowerLines;
 import org.openstreetmap.josm.data.validation.tests.PublicTransportRouteTest;
@@ -148,6 +149,7 @@
         LongSegment.class, // 3500 .. 3599
         PublicTransportRouteTest.class, // 3600 .. 3699
         RightAngleBuildingTest.class, // 3700 .. 3799
+        OverlappingAreas.class, // 3900 .. 3999
     };
 
     /**
Index: src/org/openstreetmap/josm/data/validation/tests/OverlappingAreas.java
===================================================================
--- src/org/openstreetmap/josm/data/validation/tests/OverlappingAreas.java	(nonexistent)
+++ src/org/openstreetmap/josm/data/validation/tests/OverlappingAreas.java	(working copy)
@@ -0,0 +1,216 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.validation.tests;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Rectangle;
+import java.awt.geom.Area;
+import java.awt.geom.Path2D;
+import java.awt.geom.PathIterator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.data.validation.Severity;
+import org.openstreetmap.josm.data.validation.Test;
+import org.openstreetmap.josm.data.validation.TestError;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.tools.Geometry;
+
+/**
+ * Tests if there are overlapping areas
+ *
+ * @author Gerd Petermann
+ * @since xxx
+ */
+public class OverlappingAreas extends Test {
+    protected static final int OVERLAPPING_AREA = 3900;
+    protected static final int OVERLAPPING_IDENTICAL_NATURAL = 3901;
+    protected static final int OVERLAPPING_IDENTICAL_LANDLUSE = 3902;
+
+    private List<Way> areaWays;
+    private List<Relation> multipolygons;
+    private String reason;
+    private int code;
+
+    /** Constructor */
+    public OverlappingAreas() {
+        super(tr("Overlapping areas"),
+                tr("This test checks if two areas overlap."));
+    }
+
+    @Override
+    public void startTest(ProgressMonitor monitor) {
+        super.startTest(monitor);
+        areaWays = new ArrayList<>();
+        multipolygons = new ArrayList<>();
+    }
+
+    @Override
+    public void endTest() {
+        // way-way overlaps
+        for (int i = 0; i < areaWays.size(); i++) {
+            Way w1 = areaWays.get(i);
+            Area a1 = null;
+            for (int j = i + 1; j < areaWays.size(); j++) {
+                Way w2 = areaWays.get(j);
+                resetErrorDetails();
+                if (!tagsAllowOverlap(w1, w2)) {
+                    if (a1 == null) {
+                        a1 = getLatLonArea(w1);
+                    }
+                    Area intersection = getLatLonArea(w2);
+                    intersection.intersect(a1);
+                    checkIntersection(intersection, Arrays.asList(w1, w2));
+                }
+            }
+        }
+        for (int i = 0; i < multipolygons.size(); i++) {
+            Relation r1 = multipolygons.get(i);
+            Area a1 = null;
+            // multipolygon -way overlaps
+            for (int j = 0; j < areaWays.size(); j++) {
+                Way way = areaWays.get(j);
+                resetErrorDetails();
+                if (!tagsAllowOverlap(r1, way)) {
+                    if (a1 == null) {
+                        a1 = getLatLonArea(r1);
+                    }
+                    Area intersection = getLatLonArea(way);
+                    intersection.intersect(a1);
+                    checkIntersection(intersection, Arrays.asList(r1, way));
+                }
+            }
+            for (int j = i+1; j < multipolygons.size(); j++) {
+                Relation r2 = multipolygons.get(i);
+                resetErrorDetails();
+                if (!tagsAllowOverlap(r1, r2)) {
+                    if (a1 == null) {
+                        a1 = getLatLonArea(r1);
+                    }
+                    Area intersection = getLatLonArea(r2);
+                    intersection.intersect(a1);
+                    checkIntersection(intersection, Arrays.asList(r1, r2));
+                }
+            }
+
+        }
+        areaWays = null;
+        multipolygons = null;
+        super.endTest();
+    }
+
+    private static Area getLatLonArea(OsmPrimitive p) {
+        if (p instanceof Way) {
+            Path2D latLonPath = new Path2D.Double();
+            Geometry.buildPath2DLatLon(((Way) p).getNodes(), latLonPath);
+            return new Area(latLonPath);
+        }
+        return Geometry.getAreaLatLon((Relation) p);
+    }
+
+    /**
+     * Check intersection area. If empty or extremely small ignore it, else add error
+     * with highlighted area.
+     * @param inter the area (LatLon)
+     * @param primitives the primitives that build the areas which possibly intersect
+     */
+    private void checkIntersection(Area inter, List<OsmPrimitive> primitives) {
+        Rectangle bounds = inter.getBounds();
+        if (inter.isEmpty() || bounds.getHeight() * bounds.getWidth() <= 1e-6) {
+            return;
+        }
+
+        PathIterator pit = inter.getPathIterator(null);
+        double[] res = new double[6];
+        List<List<Node>> hilite = new ArrayList<>();
+        List<Node> nodes = new ArrayList<>();
+        while (!pit.isDone()) {
+            int type = pit.currentSegment(res);
+            Node n = new Node(new LatLon(res[1], res[0]));
+            switch (type) {
+            case PathIterator.SEG_MOVETO:
+                if (!nodes.isEmpty()) {
+                    hilite.add(nodes);
+                }
+                nodes = new ArrayList<>();
+                nodes.add(n);
+                break;
+            case PathIterator.SEG_LINETO:
+                nodes.add(n);
+                break;
+            case PathIterator.SEG_CLOSE:
+                if (!nodes.isEmpty()) {
+                    nodes.add(nodes.get(0));
+                    hilite.add(nodes);
+                    nodes = new ArrayList<>();
+                }
+                break;
+            default:
+                break;
+            }
+            pit.next();
+        }
+        if (nodes.size() > 1) {
+            hilite.add(nodes);
+        }
+        errors.add(TestError.builder(this, Severity.WARNING, code < 0 ? OVERLAPPING_AREA : code)
+                .message(reason == null ? tr("OA: Overlapping areas") : reason)
+                .primitives(primitives)
+                .highlightNodePairs(hilite)
+                .build());
+    }
+
+    /**
+     * Check if the two objects are allowed to overlap regarding tags.
+     * @param p1 1st primitive
+     * @param p2 2nd primitive
+     * @return true if the tags of the objects allow that the areas overlap.
+     */
+    private boolean tagsAllowOverlap(OsmPrimitive p1, OsmPrimitive p2) {
+        // TODO: read from config file
+        if (isSetAndEqual(p1, p2, "natural")) {
+            code = OVERLAPPING_IDENTICAL_NATURAL;
+            return false;
+        }
+        if (isSetAndEqual(p1, p2, "landuse")) {
+            code = OVERLAPPING_IDENTICAL_LANDLUSE;
+            return false;
+        }
+        return true;
+    }
+
+    private boolean isSetAndEqual(OsmPrimitive p1, OsmPrimitive p2, String key) {
+        String v1 = p1.get(key);
+        String v2 = p2.get(key);
+        if (v1 != null && v1.equals(v2)) {
+            reason = tr("OA: Overlapping identical {0} areas", key);
+            return true;
+        }
+        return false;
+    }
+
+    private void resetErrorDetails() {
+        reason = null;
+        code = -1;
+    }
+
+    @Override
+    public void visit(Way w) {
+        if (w.isArea() && w.hasAreaTags()) {
+            areaWays.add(w);
+        }
+    }
+
+    @Override
+    public void visit(Relation r) {
+        if (r.isMultipolygon()) {
+            multipolygons.add(r);
+        }
+    }
+}
