Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.GeometryFactory.createLinearRing()


                new Coordinate(6, 0),
                new Coordinate(6, 7),
                new Coordinate(0, 7),
                new Coordinate(2, 2)
        };             
        Polygon geom2 = gf.createPolygon(gf.createLinearRing(coords2), new LinearRing[0]);
       
        Coordinate[] coords3 = new Coordinate[] {
                new Coordinate(2, 2),
                new Coordinate(6, 0),
                new Coordinate(11, 12),
View Full Code Here


                new Coordinate(6, 0),
                new Coordinate(11, 12),
                new Coordinate(0, 7),
                new Coordinate(2, 2)
        };             
        Polygon geom3 = gf.createPolygon(gf.createLinearRing(coords3), new LinearRing[0]);
       
        Coordinate[] coords4 = new Coordinate[] {
                new Coordinate(20, 20),
                new Coordinate(60, 30),
                new Coordinate(110, 120),
View Full Code Here

                new Coordinate(60, 30),
                new Coordinate(110, 120),
                new Coordinate(30, 70),
                new Coordinate(20, 20)
        };             
        Polygon geom4 = gf.createPolygon(gf.createLinearRing(coords4), new LinearRing[0]);
                       
        List<Geometry> list = new ArrayList<Geometry>();
        list.add(geom4);
       
        filter = fac.equal(new LiteralExpressionImpl(list), new LiteralExpressionImpl(geom4), MatchAction.ONE);
View Full Code Here

                new Coordinate(0, 0),
                new Coordinate(6, 0),
                new Coordinate(6, 7),
                new Coordinate(0, 7),
                new Coordinate(0, 0)};               
        Polygon geom1 = gf.createPolygon(gf.createLinearRing(coords1), new LinearRing[0]);
       
        Coordinate[] coords2 = new Coordinate[] {
                new Coordinate(2, 2),
                new Coordinate(6, 0),
                new Coordinate(6, 7),
View Full Code Here

                new Coordinate(6, 0),
                new Coordinate(6, 7),
                new Coordinate(0, 7),
                new Coordinate(2, 2)
        };             
        Polygon geom2 = gf.createPolygon(gf.createLinearRing(coords2), new LinearRing[0]);
       
        Coordinate[] coords3 = new Coordinate[] {
                new Coordinate(2, 2),
                new Coordinate(6, 0),
                new Coordinate(11, 12),
View Full Code Here

                new Coordinate(6, 0),
                new Coordinate(11, 12),
                new Coordinate(0, 7),
                new Coordinate(2, 2)
        };             
        Polygon geom3 = gf.createPolygon(gf.createLinearRing(coords3), new LinearRing[0]);
       
        Coordinate[] coords4 = new Coordinate[] {
                new Coordinate(20, 20),
                new Coordinate(60, 30),
                new Coordinate(110, 120),
View Full Code Here

                new Coordinate(60, 30),
                new Coordinate(110, 120),
                new Coordinate(30, 70),
                new Coordinate(20, 20)
        };             
        Polygon geom4 = gf.createPolygon(gf.createLinearRing(coords4), new LinearRing[0]);
                       
        List<Geometry> list = new ArrayList<Geometry>();
        list.add(geom4);
       
        filter = fac.equal(new LiteralExpressionImpl(list), new LiteralExpressionImpl(geom4), MatchAction.ALL);
View Full Code Here

        return new Converter() {
          public Object convert(Object source, Class target) throws Exception {
            Envelope e = (Envelope) source;
            GeometryFactory factory = new GeometryFactory();
            return factory.createPolygon(
              factory.createLinearRing(
                new Coordinate[] {
                  new Coordinate( e.getMinX(), e.getMinY() ),
                  new Coordinate( e.getMaxX(), e.getMinY() ),
                  new Coordinate( e.getMaxX(), e.getMaxY() ),
                  new Coordinate( e.getMinX(), e.getMaxY() ),
View Full Code Here

            firstArray[0] = new Coordinate(0, 0);
            firstArray[1] = new Coordinate(1, 0);
            firstArray[2] = new Coordinate(1, 1);
            firstArray[3] = new Coordinate(0, 1);
            firstArray[4] = new Coordinate(0, 0);
            LinearRing shell = gf.createLinearRing(firstArray);
            b.add(gf.createPolygon(shell, null));
            b.add(0);

            features.add(b.buildFeature(numFeatures + ""));
View Full Code Here

            array[0] = new Coordinate(firstArray[0].x - 1, firstArray[0].y - 1);
            array[1] = new Coordinate(firstArray[1].x + 1, firstArray[1].y - 1);
            array[2] = new Coordinate(firstArray[2].x + 1, firstArray[2].y + 1);
            array[3] = new Coordinate(firstArray[3].x - 1, firstArray[3].y + 1);
            array[4] = new Coordinate(firstArray[0].x - 1, firstArray[0].y - 1);
            LinearRing shell = gf.createLinearRing(array);
            b.add(gf.createPolygon(shell, null));
            b.add(0);

            secondFeatures.add(b.buildFeature(numFeatures + ""));
        }
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.