Package com.vividsolutions.jts.geom

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


        }
        LineString lineString = fac.createLineString(new Coordinate[] { new Coordinate(0, 0), new Coordinate(0, 1) });
        if (type == LineString.class) {
            return lineString;
        }
        LinearRing linearRing = fac.createLinearRing(new Coordinate[] { new Coordinate(0, 0), new Coordinate(0, 1),
                new Coordinate(1, 1), new Coordinate(1, 0), new Coordinate(0, 0)});
        if (type == LinearRing.class) {
            return linearRing;
        }
        if (type == MultiLineString.class) {
View Full Code Here


        tempCoordinates[0] = new Coordinate(xMin, yMin);
        tempCoordinates[1] = new Coordinate(xMax, yMin);
        tempCoordinates[2] = new Coordinate(xMax, yMax);
        tempCoordinates[3] = new Coordinate(xMin, yMax);
        tempCoordinates[4] = tempCoordinates[0];
        LinearRing linearRing = geomFactory.createLinearRing(tempCoordinates);
        Polygon polygon = geomFactory.createPolygon(linearRing, null);
        return polygon;
    }

    // this test verifies if the Illegal argument exception is thrown when a MultiPointCollection is given as first collection
View Full Code Here

                    coordinateArray[cnx] = (Coordinate) coordinates.get(cnx);
                }

                LinearRing ring = null;

                ring = geometryFactory.createLinearRing(coordinateArray);

                if (outerRing == null) {
                    outerRing = ring;
                } else {
                    // I haven't found any data to test this yet.
View Full Code Here

        parser.parse(f, contentHandler);

        Schema schema = contentHandler.getSchema();
        Element geomElement = schema.getElements()[0].findChildElement("GEOM");
        GeometryFactory factory=new GeometryFactory();
        LinearRing ring = factory.createLinearRing(new Coordinate[]{
                new Coordinate(0,0),
                new Coordinate(10,0),
                new Coordinate(0,10),
                new Coordinate(0,0)
            });
View Full Code Here

        coords2[3] = new Coordinate(10, 15);
        coords2[4] = new Coordinate(10, 10);

        GeometryFactory gf = new GeometryFactory(new PrecisionModel());
        Literal right = fac.literal(gf.createPolygon(
                    gf.createLinearRing(coords2), null));
        DWithin filter = fac.dwithin(fac.property("testGeometry"), right, 10, "m");

        assertAttributeName(filter, "testGeometry");
    }
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.overlaps(new LiteralExpressionImpl(list), new LiteralExpressionImpl(geom1));
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

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.