Package org.geotools.grid.ortholine

Examples of org.geotools.grid.ortholine.OrthoLineDef


    }
   
    @Test
    public void horizontalLines() throws Exception {
        for (int i = 0; i < LEVELS.length; i++) {
            lineDefs.add(new OrthoLineDef(LineOrientation.HORIZONTAL, LEVELS[i], SPACINGS[i]));
        }
       
        SimpleFeatureSource featureSource = Lines.createOrthoLines(BOUNDS, lineDefs);
        assertLineFeatures(featureSource, LineOrientation.HORIZONTAL, BOUNDS.getMinY());
    }
View Full Code Here


    }

    @Test
    public void verticalLines() throws Exception {
        for (int i = 0; i < LEVELS.length; i++) {
            lineDefs.add(new OrthoLineDef(LineOrientation.VERTICAL, LEVELS[i], SPACINGS[i]));
        }
       
        SimpleFeatureSource featureSource = Lines.createOrthoLines(BOUNDS, lineDefs);
        assertLineFeatures(featureSource, LineOrientation.VERTICAL, BOUNDS.getMinX());
    }
View Full Code Here

    }
   
    @Test
    public void mixedLines() throws Exception {
        for (int i = 0; i < LEVELS.length; i++) {
            lineDefs.add(new OrthoLineDef(LineOrientation.HORIZONTAL, LEVELS[i], SPACINGS[i]));
            lineDefs.add(new OrthoLineDef(LineOrientation.VERTICAL, LEVELS[i], SPACINGS[i]));
        }

        SimpleFeatureSource featureSource = Lines.createOrthoLines(BOUNDS, lineDefs);
        assertLineFeatures(featureSource, LineOrientation.HORIZONTAL, BOUNDS.getMinY());
        assertLineFeatures(featureSource, LineOrientation.VERTICAL, BOUNDS.getMinX());
View Full Code Here

     * minor lines at 2 degree spacing are indicated by level = 1
     * (level values are arbitrary; only rank order matters)
     */
    List<OrthoLineDef> lineDefs = Arrays.asList(
            // vertical (longitude) lines
            new OrthoLineDef(LineOrientation.VERTICAL, 2, 10.0),
            new OrthoLineDef(LineOrientation.VERTICAL, 1, 2.0),
   
            // horizontal (latitude) lines
            new OrthoLineDef(LineOrientation.HORIZONTAL, 2, 10.0),
            new OrthoLineDef(LineOrientation.HORIZONTAL, 1, 2.0));
   
    // Specify vertex spacing to get "densified" polygons
    double vertexSpacing = 0.1;
    SimpleFeatureSource grid = Lines.createOrthoLines(gridBounds, lineDefs, vertexSpacing);
   
View Full Code Here

TOP

Related Classes of org.geotools.grid.ortholine.OrthoLineDef

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.