use of com.revolsys.geometry.operation.linemerge.LineSequencer in project com.revolsys.open by revolsys.
the class LineSequencerTest method runLineSequencer.
private void runLineSequencer(final String[] inputWKT, final String expectedWKT) throws ParseException {
final List inputGeoms = fromWKT(inputWKT);
final LineSequencer sequencer = new LineSequencer();
sequencer.add(inputGeoms);
final boolean isCorrect = false;
if (!sequencer.isSequenceable()) {
assertTrue(expectedWKT == null);
} else {
final Geometry expected = geometryFactory.geometry(expectedWKT);
final Geometry result = sequencer.getSequencedLineStrings();
final boolean isOK = expected.equalsNorm(result);
if (!isOK) {
// System.out.println("ERROR - Expected: " + expected);
// System.out.println(" Actual: " + result);
}
assertTrue(isOK);
final boolean isSequenced = LineSequencer.isSequenced(result);
assertTrue(isSequenced);
}
}
Aggregations