use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class SurvexImporterTest method testBasicImport.
@Test
public void testBasicImport() throws Exception {
final String testContent = "1\t2\t5.0\t0.0\t0.0";
Survey survey = new Survey("Test");
SurvexImporter.parse(testContent, survey);
Assert.assertEquals(survey.getAllStations().size(), 2);
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class TestSurveyCreator method create.
public static Survey create(String name, int numStations, int numBranches) {
Survey survey = new Survey(name);
createBranch(survey, numStations);
for (int i = 0; i < numBranches; i++) {
List<Station> stations = survey.getAllStations();
Station active = getRandom(stations);
survey.setActiveStation(active);
createBranch(survey, 3);
}
return survey;
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class LrudTest method testStraightNorthCrossSectionRightSplay.
@Test
public void testStraightNorthCrossSectionRightSplay() {
Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
Station s2 = testSurvey.getStationByName("2");
double angle = CrossSectioner.getAngleOfSection(testSurvey, s2);
Leg splay = LRUD.RIGHT.createSplay(testSurvey, s2, 5);
Assert.assertEquals(90.0, splay.getAzimuth(), SexyTopo.ALLOWED_DOUBLE_DELTA);
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class BasicTestSurveyCreator method createStraightNorthWith2EBranch.
public static Survey createStraightNorthWith2EBranch() {
Survey survey = new Survey("Test Straight Survey North With 2E Branch");
Leg leg0 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg0);
Leg leg1 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg1);
Leg leg2 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg2);
survey.setActiveStation(survey.getStationByName("1"));
Leg legBranch = new Leg(5, 90, 0);
SurveyUpdater.updateWithNewStation(survey, legBranch);
Leg legBranch2 = new Leg(5, 90, 0);
SurveyUpdater.updateWithNewStation(survey, legBranch2);
return survey;
}
use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.
the class BasicTestSurveyCreator method createStraightNorthWith1EBranch.
public static Survey createStraightNorthWith1EBranch() {
Survey survey = new Survey("Test Straight Survey North With 1E Branch");
Leg leg0 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg0);
Leg leg1 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg1);
Leg leg2 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg2);
survey.setActiveStation(survey.getStationByName("1"));
Leg legBranch = new Leg(5, 90, 0);
SurveyUpdater.updateWithNewStation(survey, legBranch);
return survey;
}
Aggregations