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, stopwatch, 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, clear, deletePrimitivesIfNeeded, fixError, getErrors, getName, initialize, isBuilding, isCanceled, isFixable, isResidentialArea, ok, setBeforeUpload, setPartialSelection, setShowElements, testBeforeUpload, visit, visitprotected 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)
OsmPrimitiveVisitorvisit in interface OsmPrimitiveVisitorvisit in class Testn - The node to inspect.public void visit(Way w)
OsmPrimitiveVisitorvisit in interface OsmPrimitiveVisitorvisit in class Testw - 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)
Testpublic 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)
TestisPrimitiveUsable in class Testp - The primitivetrue if the primitive can be tested, false otherwiseprivate static boolean isUsableNode(OsmPrimitive p)
private static boolean isUsableWay(OsmPrimitive p)