public class LongSegment extends Test
Test.TagTest
Modifier and Type | Field and Description |
---|---|
protected static int |
LONG_SEGMENT
Long segment error
|
protected int |
maxlength
Maximum segment length for this test
|
protected java.util.Set<WaySegment> |
reported
set of way segments that have been reported
|
private java.util.Set<Way> |
visitedWays
set of visited ways.
|
checkBeforeUpload, checkEnabled, description, enabled, errors, IN_DOWNLOADED_AREA, IN_DOWNLOADED_AREA_STRICT, isBeforeUpload, name, partialSelection, progressMonitor, startTime, testBeforeUpload
Constructor and Description |
---|
LongSegment()
Constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
addErrorForSegment(WaySegment waySegment,
java.lang.Double length) |
void |
endTest()
Notification of the end of the test.
|
private boolean |
ignoreWay(Way w) |
boolean |
isPrimitiveUsable(OsmPrimitive p)
Determines if the primitive is usable for tests.
|
private static boolean |
isUsableNode(OsmPrimitive p) |
private static boolean |
isUsableWay(OsmPrimitive p) |
void |
startTest(ProgressMonitor monitor)
Start the test using a given progress monitor
|
private void |
testWay(Way w) |
void |
visit(Node n)
Visiting call for points.
|
void |
visit(Way w)
Visiting call for lines.
|
private void |
visitWaySegment(Way w,
int i) |
addGui, compareTo, deletePrimitivesIfNeeded, equals, fixError, getErrors, getName, hashCode, initialize, isBuilding, isCanceled, isFixable, ok, setBeforeUpload, setPartialSelection, testBeforeUpload, visit, visit
protected static final int LONG_SEGMENT
protected int maxlength
private java.util.Set<Way> visitedWays
protected java.util.Set<WaySegment> reported
public LongSegment()
public void visit(Node n)
OsmPrimitiveVisitor
visit
in interface OsmPrimitiveVisitor
visit
in class Test
n
- The node to inspect.public void visit(Way w)
OsmPrimitiveVisitor
visit
in interface OsmPrimitiveVisitor
visit
in class Test
w
- The way to inspect.private void visitWaySegment(Way w, int i)
private void addErrorForSegment(WaySegment waySegment, java.lang.Double length)
public void startTest(ProgressMonitor monitor)
Test
public void endTest()
Test
If you override this method, don't forget to cleanup progressMonitor
(most overrides call super.endTest()
to do this).
public boolean isPrimitiveUsable(OsmPrimitive p)
Test
isPrimitiveUsable
in class Test
p
- The primitivetrue
if the primitive can be tested, false
otherwiseprivate static boolean isUsableNode(OsmPrimitive p)
private static boolean isUsableWay(OsmPrimitive p)