Examples of createLineString()


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

      rotationCoords.add(rotate(actualCoord, center, angle));
    }

    Coordinate[] newCoords = rotationCoords.toArray(new Coordinate[rotationCoords.size()]);

    return gf.createLineString(newCoords);
  }

  /**
   * Rotate the given polygon.
   *
 
View Full Code Here

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

            coords.add(new Coordinate(x, y));
            pathIterator.next();
        }

        Coordinate[] coordinates = coords.toArray(new Coordinate[coords.size()]);
        LineString line = gf.createLineString(coordinates);
        return line;
    }

    /**
     * Calculates the maximum distance that a segment used to approximate the curve is allowed to be
View Full Code Here

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

      // never returns true, even though intersectionPoint should be
      // guaranteed
      // to be over the line as it was produced by intersecting both lines
      // so we're using little buffer to determine if the point lies over the
      // segment
      Geometry lineSegment = gf.createLineString(segment);
      lineSegment = lineSegment.buffer(DELTA_DISTANCE, 2);
      Point point = gf.createPoint(pointInLine);
      Geometry intersection = lineSegment.intersection(point);
      if (point.equals(intersection)) {
        return segment[0];
View Full Code Here

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

    public void testLineWidth() throws Exception {
        Drawing d = Drawing.create();
        Display display = Display.getCurrent();
        GeometryFactory factory = new GeometryFactory();

        LineString line = factory.createLineString(new Coordinate[]{new Coordinate(0, 2),
                new Coordinate(15, 2)});

        StyleBuilder builder = new StyleBuilder();
        Style style = builder.createStyle(builder.createLineSymbolizer(Color.BLUE, 3));
View Full Code Here

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

        //create features suitable for the test
        GeometryFactory factory=new GeometryFactory();
        // test with 2 lines: 2 points, 3 points
        // - only the 2 point line should pass
        LineString[] line = new LineString[3];
        line[0] = factory.createLineString(new Coordinate[]{new Coordinate(15, 15),
                new Coordinate(20, 20),});
        line[1] = factory.createLineString(new Coordinate[]{new Coordinate(10, 15),
                new Coordinate(20, 25), new Coordinate(30, 35),});
       
        String[] attrValues = new String[3];
View Full Code Here

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

        // test with 2 lines: 2 points, 3 points
        // - only the 2 point line should pass
        LineString[] line = new LineString[3];
        line[0] = factory.createLineString(new Coordinate[]{new Coordinate(15, 15),
                new Coordinate(20, 20),});
        line[1] = factory.createLineString(new Coordinate[]{new Coordinate(10, 15),
                new Coordinate(20, 25), new Coordinate(30, 35),});
       
        String[] attrValues = new String[3];
        attrValues[0] = "value0"; attrValues[1] = "value1"; attrValues[2] = "value2"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
View Full Code Here

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

    public void testLineNoSelfIntersectOp() throws Exception {
        //create features suitable for the test
        GeometryFactory factory=new GeometryFactory();
        // test with 2 lines: a non-self-intersecting line, a self-intersecting line
        LineString[] line = new LineString[3];
        line[0] = factory.createLineString(new Coordinate[]{new Coordinate(10, 10),
                new Coordinate(10, 20),});
        line[1] = factory.createLineString(new Coordinate[]{new Coordinate(20, 10),
                new Coordinate(20, 20), new Coordinate(30, 15), new Coordinate(15, 15),});
       
        String[] attrValues = new String[2];
View Full Code Here

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

        GeometryFactory factory=new GeometryFactory();
        // test with 2 lines: a non-self-intersecting line, a self-intersecting line
        LineString[] line = new LineString[3];
        line[0] = factory.createLineString(new Coordinate[]{new Coordinate(10, 10),
                new Coordinate(10, 20),});
        line[1] = factory.createLineString(new Coordinate[]{new Coordinate(20, 10),
                new Coordinate(20, 20), new Coordinate(30, 15), new Coordinate(15, 15),});
       
        String[] attrValues = new String[2];
        attrValues[0] = "value0"; attrValues[1] = "value1"; //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

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

    public void testLineNoSelfOverlapOp() throws Exception {
        //create features suitable for the test
        GeometryFactory factory=new GeometryFactory();
        // test with 2 lines: a non-overlapping line, an overlapping line
        LineString[] line = new LineString[3];
        line[0] = factory.createLineString(new Coordinate[]{new Coordinate(10, 10),
                new Coordinate(10, 20),});
        line[1] = factory.createLineString(new Coordinate[]{new Coordinate(20, 10),
                new Coordinate(20, 20), new Coordinate(30, 15), new Coordinate(20, 15),
                new Coordinate(20, 30)});
       
View Full Code Here

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

        GeometryFactory factory=new GeometryFactory();
        // test with 2 lines: a non-overlapping line, an overlapping line
        LineString[] line = new LineString[3];
        line[0] = factory.createLineString(new Coordinate[]{new Coordinate(10, 10),
                new Coordinate(10, 20),});
        line[1] = factory.createLineString(new Coordinate[]{new Coordinate(20, 10),
                new Coordinate(20, 20), new Coordinate(30, 15), new Coordinate(20, 15),
                new Coordinate(20, 30)});
       
        String[] attrValues = new String[2];
        attrValues[0] = "value0"; attrValues[1] = "value1"; //$NON-NLS-1$ //$NON-NLS-2$
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.