Search in sources :

Example 81 with Survey

use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.

the class BasicTestSurveyCreator method createStraightNorthWithTrip.

@SuppressWarnings("ArraysAsListWithZeroOrOneArgument")
public static Survey createStraightNorthWithTrip() {
    Survey survey = new Survey("Test Straight Survey North");
    List<Trip.TeamEntry> team = new ArrayList<>();
    team.add(new Trip.TeamEntry("Alice", Arrays.asList(Trip.Role.BOOK)));
    team.add(new Trip.TeamEntry("Bob", Arrays.asList(Trip.Role.INSTRUMENTS, Trip.Role.DOG)));
    Trip trip = new Trip();
    trip.setTeam(team);
    survey.setTrip(trip);
    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);
    return survey;
}
Also used : Survey(org.hwyl.sexytopo.model.survey.Survey) Trip(org.hwyl.sexytopo.model.survey.Trip) ArrayList(java.util.ArrayList) Leg(org.hwyl.sexytopo.model.survey.Leg)

Example 82 with Survey

use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.

the class BasicTestSurveyCreator method create5MDown.

public static Survey create5MDown() {
    Survey survey = new Survey("Test Survey 1m Down");
    Leg leg0 = new Leg(5, 0, -90);
    SurveyUpdater.updateWithNewStation(survey, leg0);
    return survey;
}
Also used : Survey(org.hwyl.sexytopo.model.survey.Survey) Leg(org.hwyl.sexytopo.model.survey.Leg)

Example 83 with Survey

use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.

the class BasicTestSurveyCreator method create5MEast.

public static Survey create5MEast() {
    Survey survey = new Survey("Test Survey 5m east");
    Leg leg0 = new Leg(5, 90, 0);
    SurveyUpdater.updateWithNewStation(survey, leg0);
    Leg splay0Left = new Leg(1, 0, 0);
    SurveyUpdater.update(survey, splay0Left);
    Leg splay0Right = new Leg(1, 180, 0);
    SurveyUpdater.update(survey, splay0Right);
    return survey;
}
Also used : Survey(org.hwyl.sexytopo.model.survey.Survey) Leg(org.hwyl.sexytopo.model.survey.Leg)

Example 84 with Survey

use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.

the class BasicTestSurveyCreator method createStraightNorthWith2EBranchFromS2.

public static Survey createStraightNorthWith2EBranchFromS2() {
    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("2"));
    Leg legBranch = new Leg(5, 90, 0);
    SurveyUpdater.updateWithNewStation(survey, legBranch);
    Leg legBranch2 = new Leg(5, 90, 0);
    SurveyUpdater.updateWithNewStation(survey, legBranch2);
    return survey;
}
Also used : Survey(org.hwyl.sexytopo.model.survey.Survey) Leg(org.hwyl.sexytopo.model.survey.Leg)

Example 85 with Survey

use of org.hwyl.sexytopo.model.survey.Survey in project sexytopo by richsmith.

the class XviExporterTest method testLineIsPassedThroughToXvi.

@Test
public void testLineIsPassedThroughToXvi() {
    Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
    BasicTestSketchCreator.drawOneHorizontalLine(testSurvey.getPlanSketch());
    String xvi = XviExporter.getContent(testSurvey.getPlanSketch(), Projection2D.PLAN.project(testSurvey), 1.0f);
    Assert.assertTrue(xvi.contains("{BLACK 5.00 0.00 10.00 0.00}"));
}
Also used : Survey(org.hwyl.sexytopo.model.survey.Survey) Test(org.junit.Test)

Aggregations

Survey (org.hwyl.sexytopo.model.survey.Survey)101 Test (org.junit.Test)56 Station (org.hwyl.sexytopo.model.survey.Station)31 Leg (org.hwyl.sexytopo.model.survey.Leg)24 AlertDialog (android.app.AlertDialog)10 SuppressLint (android.annotation.SuppressLint)9 Coord2D (org.hwyl.sexytopo.model.graph.Coord2D)9 ArrayAdapter (android.widget.ArrayAdapter)8 File (java.io.File)6 HashMap (java.util.HashMap)6 View (android.view.View)5 EditText (android.widget.EditText)5 ArrayList (java.util.ArrayList)5 Set (java.util.Set)5 Context (android.content.Context)4 SharedPreferences (android.content.SharedPreferences)4 Editable (android.text.Editable)4 List (java.util.List)4 Map (java.util.Map)4 R (org.hwyl.sexytopo.R)4