@Test public void testSecondaryConnectedSurveyGetsTranslatedCorrectly() throws Exception { Survey currentSurvey = getBasicSurvey("current"); Survey joinedSurvey0 = getBasicSurvey("joined-0"); Survey joinedSurvey1 = getBasicSurvey("joined-1"); connectTwoSurveys(currentSurvey, currentSurvey.getActiveStation(), joinedSurvey0, joinedSurvey0.getOrigin()); connectTwoSurveys(joinedSurvey0, joinedSurvey0.getActiveStation(), joinedSurvey1, joinedSurvey1.getOrigin()); GraphActivity activity = new PlanActivity(); Space<Coord2D> planProjection = Projection2D.PLAN.project(currentSurvey); Map<Survey, Space<Coord2D>> translated = ConnectedSurveys.getTranslatedConnectedSurveys( activity, currentSurvey, planProjection); Assert.assertEquals(translated.size(), 2); Survey translatedSurvey = getNamedSurvey(translated, "joined-1"); Space<Coord2D> projection = translated.get(translatedSurvey); Coord2D newStationPoint = getStationPosition(projection, "2"); Assert.assertEquals(-3.0, newStationPoint.y, SexyTopo.ALLOWED_DOUBLE_DELTA); }
public static Map<Survey, Space<Coord2D>> getTranslatedConnectedSurveys( GraphActivity activity, Survey survey, Space<Coord2D> projection) { Map<Survey, Space<Coord2D>> translated = new HashMap<>(); updateTranslatedConnectedSurveys(activity, survey, translated, survey, projection); return translated; }
ConnectedSurveys { public static Map<Survey, Space<Coord2D>> getTranslatedConnectedSurveys( GraphActivity activity, Survey survey, Space<Coord2D> projection) { Map<Survey, Space<Coord2D>> translated = new HashMap<>(); updateTranslatedConnectedSurveys(activity, survey, translated, survey, projection); return translated; } }
ConnectedSurveys { public static Map<Survey, Space<Coord2D>> getTranslatedConnectedSurveys( GraphActivity activity, Survey survey, Space<Coord2D> projection) { Map<Survey, Space<Coord2D>> translated = new HashMap<>(); updateTranslatedConnectedSurveys(activity, survey, translated, survey, projection); return translated; }  }
ConnectedSurveys { public static Map<Survey, Space<Coord2D>> getTranslatedConnectedSurveys( GraphActivity activity, Survey survey, Space<Coord2D> projection) { Map<Survey, Space<Coord2D>> translated = new HashMap<>(); updateTranslatedConnectedSurveys(activity, survey, translated, survey, projection); return translated; }  static Map<Survey, Space<Coord2D>> getTranslatedConnectedSurveys(
            GraphActivity activity, Survey survey, Space<Coord2D> projection); }
ConnectedSurveys { public static Map<Survey, Space<Coord2D>> getTranslatedConnectedSurveys( GraphActivity activity, Survey survey, Space<Coord2D> projection) { Map<Survey, Space<Coord2D>> translated = new HashMap<>(); updateTranslatedConnectedSurveys(activity, survey, translated, survey, projection); return translated; }  static Map<Survey, Space<Coord2D>> getTranslatedConnectedSurveys(
            GraphActivity activity, Survey survey, Space<Coord2D> projection);  }