Package org.opentripplanner.visibility

Examples of org.opentripplanner.visibility.Environment


    public void testPalazzo() {
        VLPolygon poly = poly(12.3402039, 45.4342526, 12.339956, 45.43421, 12.3401159, 45.4338161,
                12.3404923, 45.4338996, 12.3402845, 45.4344296, 12.3402433, 45.4344174, 12.3401433,
                45.4343973, 12.3401691, 45.4343433);

        Environment environment = new Environment(Arrays.asList(poly));
        environment.enforce_standard_form();
        VisibilityGraph vg = new VisibilityGraph(environment, 0.0000001);

        boolean expected[][] = {{ true,  true,  true, false, false, false, false,  true},
                                { true,  true,  true,  true,  true, false, false,  true},
                                { true,  true,  true,  true,  true,  true,  true,  true},
View Full Code Here


                45.4347676, 12.3389625, 45.4347071, 12.3386095, 45.4345509, 12.3379792, 45.4342771,
                12.3378901, 45.4342367, 12.3376881, 45.4341478, 12.337471, 45.4340513, 12.3373322,
                45.4339869, 12.3371759, 45.4339216, 12.3372951, 45.4336885, 12.3374061, 45.4334649,
                12.3374185, 45.4334486, 12.3391652, 45.4339348, 12.3391453, 45.4339861);

        Environment environment = new Environment(Arrays.asList(poly));
        environment.enforce_standard_form();

        VisibilityGraph vg = new VisibilityGraph(environment, 0.0000001);

        boolean expected[][] = {
                { true,  true, false,  true,  true, false,  true,  true,  true,  true, false, false, false, false,  true, false,  true,  true, false, false, false, false, false, false, false, false,  true},
View Full Code Here

        VLPolygon poly = poly(17.0, 14.0, 70.0, 18.0, 69.0, 26.0, 39.0, 20.0, 13.0, 78.0, -111.0,
                24.0

        );

        Environment environment = new Environment(Arrays.asList(poly));
        environment.enforce_standard_form();

        VisibilityGraph vg = new VisibilityGraph(environment, 0.0000001);

        boolean expected[][] = { { true, true, true, false, true, true },
                { true, true, true, true, true, true }, { true, true, true, true, true, false },
View Full Code Here

        VLPolygon poly = poly(1, 1, 5, 1, 5, 5, 3, 5, 3, 4, 4, 4, 4, 2, 2, 2, 2, 3, 1, 3);

        if (poly.area() < 0) {
            poly.reverse();
        }
        Environment environment = new Environment(Arrays.asList(poly));
        environment.enforce_standard_form();

        VisibilityGraph vg = new VisibilityGraph(environment, 0.01);
        boolean expected[][] = {
                { true, true, false, false, false, false, true, true, true, true },
                { true, true, true, false, false, true, true, true, false, false },
View Full Code Here

        }
    }

    public void testSquareCenteredInSquare() {

        Environment environment = new Environment(Arrays.asList(poly(1, 1, 5, 1, 5, 5, 1, 5),
                poly(2, 3.5, 2, 4.5, 3, 4.5, 3, 3.5)));
        environment.enforce_standard_form();

        VisibilityGraph vg = new VisibilityGraph(environment, 0.01);

        boolean expected[][] = { { true, true, true, true, true, true, false, true },
                { true, true, true, false, true, false, true, true },
View Full Code Here

        }

    }

    public void testSquareOffCenterInSquare() {
        Environment environment = new Environment(Arrays.asList(poly(1, 1, 5, 1, 5, 5, 1, 5),
                poly(2, 2, 2, 3, 3, 3, 3, 2)));
        environment.enforce_standard_form();

        VisibilityGraph vg = new VisibilityGraph(environment, 0.01);

        boolean expected[][] = { { true, true, false, true, true, true, false, true },
                { true, true, true, true, true, false, true, true },
View Full Code Here

                        visibilityNodes, true);
                nodes.addAll(holeNodes);
                polygons.add(hole);
            }

            Environment areaEnv = new Environment(polygons);
            // FIXME: temporary hard limit on size of
            // areas to prevent way explosion
            if (visibilityPoints.size() > MAX_AREA_NODES) {
                LOG.warn("Area " + group.getSomeOSMObject() + " is too complicated ("
                        + visibilityPoints.size() + " > " + MAX_AREA_NODES);
                continue;
            }

            if (!areaEnv.is_valid(VISIBILITY_EPSILON)) {
                LOG.warn("Area " + group.getSomeOSMObject() + " is not epsilon-valid (epsilon = "
                        + VISIBILITY_EPSILON + ")");
                continue;
            }
View Full Code Here

TOP

Related Classes of org.opentripplanner.visibility.Environment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.