NodeModel fromNode = new NodeModel(2.3, 45,6);
NodeModel toNode = new NodeModel(45.22, 78.899);
EdgeModel e = new EdgeModel("testModelID", fromNode, toNode);
EdgeLocationModel el1 = new EdgeLocationModel(e, -12.3, -55.67);
EdgeLocationModel el2 = new EdgeLocationModel(e, 12.3, 55.67);
RoadEventModel re1 = new RoadEventModel(RoadEventModel.Type.Accident, el1);
RoadEventModel re2 = new RoadEventModel(RoadEventModel.Type.Roadwork, el1);
RoadEventModel re3 = new RoadEventModel(RoadEventModel.Type.Accident, el2);
RoadEventModel re4 = new RoadEventModel(RoadEventModel.Type.Roadwork, el2);
RoadEventModel re5 = new RoadEventModel(RoadEventModel.Type.Accident);
RoadEventModel re6 = new RoadEventModel(RoadEventModel.Type.Roadwork);
///////////////////////////////////
// set up ee1 with CircleLocation
CircleLocationModel cl = new CircleLocationModel();
Point2D positionOnScreen = new Point2D.Double(3,4);
GlobalPosition centerPosition = GlobalPosition.from(positionOnScreen);
cl.setCenter(centerPosition);
Point2D circlePoint = new Point2D.Double(0, -25);
GlobalPosition circlePosition = GlobalPosition.from(circlePoint);
cl.setCirclePoint(circlePosition);
cl.setRadius(centerPosition.distanceTo(circlePosition));
EnvironmentEventModel ee1 =
new EnvironmentEventModel(EnvironmentEventModel.Type.CO2, 12, cl);
///////////////////////////////////
// set up ee2 with PloygonLocation
PolygonLocationModel pl = new PolygonLocationModel();
List<GlobalPosition> positions = new ArrayList<GlobalPosition>();
Point2D p1 = new Point2D.Double(3,4);
GlobalPosition gp1 = GlobalPosition.from(p1);
positions.add(gp1);
Point2D p2 = new Point2D.Double(13,14);
GlobalPosition gp2 = GlobalPosition.from(p2);
positions.add(gp2);
Point2D p3 = new Point2D.Double(22,23);
GlobalPosition gp3 = GlobalPosition.from(p3);
positions.add(gp3);
Point2D p4 = new Point2D.Double(12,9);
GlobalPosition gp4 = GlobalPosition.from(p4);
positions.add(gp4);
Point2D p5 = new Point2D.Double(3,34);
GlobalPosition gp5 = GlobalPosition.from(p5);
positions.add(gp5);
pl.setPoints(positions);
EnvironmentEventModel ee2 =
new EnvironmentEventModel(EnvironmentEventModel.Type.Fog, -23, pl);
///////////////////////////////////
// set up ee3 with EdgeLocation
NodeModel fromNode2 = new NodeModel(2.3, 45,6);
NodeModel toNode2 = new NodeModel(45.22, 78.899);
EdgeModel e2 = new EdgeModel("testModelID", fromNode2, toNode2);
EdgeLocationModel el = new EdgeLocationModel(e2, -12.3, -55.67);
EnvironmentEventModel ee3 =
new EnvironmentEventModel(EnvironmentEventModel.Type.Snow, 0, el);
///////////////////////////////////