Package org.geotools.grid

Examples of org.geotools.grid.PolygonBuilder


        Map<HexagonOrientation, Map<Neighbor, Shift>> table = new HashMap<HexagonOrientation, Map<Neighbor, Shift>>();
        table.put(HexagonOrientation.FLAT, flatShifts);
        table.put(HexagonOrientation.ANGLED, angledShifts);

        for (HexagonOrientation o : HexagonOrientation.values()) {
            PolygonBuilder gridBuilder =
                    o == HexagonOrientation.ANGLED ? angledBuilder : flatBuilder;

            Hexagon h0 = Hexagons.create(0.0, 0.0, SIDE_LEN, o, null);

            for (Neighbor n : Neighbor.values()) {
                boolean expectEx = !gridBuilder.isValidNeighbor(n);
                boolean gotEx = false;
                try {
                    hn = (Hexagon) gridBuilder.createNeighbor(h0, n);
                } catch (IllegalArgumentException ex) {
                    gotEx = true;
                }

                assertEquals("Failed for case " + o + " " + n, expectEx, gotEx);
View Full Code Here

TOP

Related Classes of org.geotools.grid.PolygonBuilder

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.