Package org.opentripplanner.visibility

Examples of org.opentripplanner.visibility.VLPolygon.area()


    }

    public void testConcavePolygon() {
        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();
View Full Code Here


    private VLPolygon makeStandardizedVLPolygon(List<VLPoint> vertices, List<OSMNode> nodes,
            boolean reversed) {
        VLPolygon polygon = new VLPolygon(vertices);

        if ((reversed && polygon.area() > 0) || (!reversed && polygon.area() < 0)) {
            polygon.reverse();
            // need to reverse nodes as well
            reversePolygonOfOSMNodes(nodes);
        }
View Full Code Here

    private VLPolygon makeStandardizedVLPolygon(List<VLPoint> vertices, List<OSMNode> nodes,
            boolean reversed) {
        VLPolygon polygon = new VLPolygon(vertices);

        if ((reversed && polygon.area() > 0) || (!reversed && polygon.area() < 0)) {
            polygon.reverse();
            // need to reverse nodes as well
            reversePolygonOfOSMNodes(nodes);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.