org.openstreetmap.josm.data.validation.tests
Class BuildingInBuilding

java.lang.Object
  extended by org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
      extended by org.openstreetmap.josm.data.validation.Test
          extended by org.openstreetmap.josm.data.validation.tests.BuildingInBuilding
All Implemented Interfaces:
Visitor

public class BuildingInBuilding
extends Test


Nested Class Summary
protected  class BuildingInBuilding.MultiPolygonMembers
           
 
Field Summary
protected static int BUILDING_INSIDE_BUILDING
           
protected  QuadBuckets<Way> index
           
protected  java.util.List<OsmPrimitive> primitivesToCheck
           
 
Fields inherited from class org.openstreetmap.josm.data.validation.Test
checkBeforeUpload, checkEnabled, description, enabled, errors, isBeforeUpload, name, partialSelection, progressMonitor, testBeforeUpload
 
Constructor Summary
BuildingInBuilding()
           
 
Method Summary
 void endTest()
          Notification of the end of the test.
private static boolean isInPolygon(Node n, java.util.List<Node> polygon)
           
protected  boolean isWayInsideMultiPolygon(Way object, Relation multiPolygon)
           
protected  boolean sameLayers(Way w1, Way w2)
           
 void visit(Node n)
          Visiting call for points.
 void visit(Relation r)
          Visiting call for relations.
 void visit(Way w)
          Visiting call for lines.
 
Methods inherited from class org.openstreetmap.josm.data.validation.Test
addGui, deletePrimitivesIfNeeded, fixError, getErrors, getName, initialize, isBuilding, isCanceled, isFixable, ok, setBeforeUpload, setPartialSelection, startTest, testBeforeUpload, visit
 
Methods inherited from class org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILDING_INSIDE_BUILDING

protected static final int BUILDING_INSIDE_BUILDING
See Also:
Constant Field Values

primitivesToCheck

protected java.util.List<OsmPrimitive> primitivesToCheck

index

protected QuadBuckets<Way> index
Constructor Detail

BuildingInBuilding

public BuildingInBuilding()
Method Detail

visit

public void visit(Node n)
Description copied from interface: Visitor
Visiting call for points.

Specified by:
visit in interface Visitor
Overrides:
visit in class Test
Parameters:
n - The node to inspect.

visit

public void visit(Way w)
Description copied from interface: Visitor
Visiting call for lines.

Specified by:
visit in interface Visitor
Overrides:
visit in class Test
Parameters:
w - The way to inspect.

visit

public void visit(Relation r)
Description copied from interface: Visitor
Visiting call for relations.

Specified by:
visit in interface Visitor
Overrides:
visit in class Test
Parameters:
r - The relation to inspect.

isInPolygon

private static boolean isInPolygon(Node n,
                                   java.util.List<Node> polygon)

sameLayers

protected boolean sameLayers(Way w1,
                             Way w2)

isWayInsideMultiPolygon

protected boolean isWayInsideMultiPolygon(Way object,
                                          Relation multiPolygon)

endTest

public void endTest()
Description copied from class: Test
Notification of the end of the test. The tester may perform additional actions and destroy the used structures.

If you override this method, don't forget to cleanup Test.progressMonitor (most overrides call super.endTest() to do this).

Overrides:
endTest in class Test


JOSM