Examples of toDenseGeometry()


Examples of org.geotools.grid.PolygonElement.toDenseGeometry()

        PolygonElement hexagon = new HexagonImpl(0.0, 0.0, SIDE_LEN, HexagonOrientation.FLAT, null);

        final int density = 10;
        final double maxSpacing = SIDE_LEN / density;

        Geometry polygon = hexagon.toDenseGeometry(maxSpacing);
        assertNotNull(polygon);
        assertTrue(polygon instanceof Polygon);
        assertTrue(polygon.getCoordinates().length - 1 >= 6 * density);
    }

View Full Code Here

Examples of org.geotools.grid.PolygonElement.toDenseGeometry()

        PolygonElement oblong = new OblongImpl(0, 0, WIDTH, HEIGHT, null);

        final int density = 10;
        final double maxSpacing = Math.min(WIDTH, HEIGHT) / density;

        Geometry polygon = oblong.toDenseGeometry(maxSpacing);
        assertNotNull(polygon);
        assertTrue(polygon instanceof Polygon);
        assertTrue(polygon.getCoordinates().length - 1 >= 2 * (WIDTH + HEIGHT) * density);
    }

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.