Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.Point.buffer()


       
        CoordinateReferenceSystem world = imap.getViewportModel().getCRS();
        CoordinateReferenceSystem wsg84 = DefaultGeographicCRS.WGS84;
       
        double buffer = 0.01; // how much of the wgs84 world to see
        Envelope view = point.buffer( buffer ).getEnvelopeInternal();
       
        MathTransform transform;
        try {
            transform = CRS.findMathTransform( wsg84, world, true ); // relaxed
        } catch (FactoryException e) {
View Full Code Here


     */
    private Geometry createCirle(Coordinate dropPoint, LineString pathToStreet) {
        double length = pathToStreet.getLength();
        GeometryFactory gf = new GeometryFactory();
        Point dp = gf.createPoint(dropPoint);
        Geometry buffer = dp.buffer(length);
        return buffer;
    }

    /**
     * Extraction of a sub-LineString from an existing line, starting from 0;
View Full Code Here

    }
   
    @Test
    public void testFullyOutsideCircle() throws Exception {
        Point p = (Point) wkt.read("POINT(5 5)");
        LineString ls = ((Polygon) p.buffer(10)).getExteriorRing();
        Geometry clipped = clipper.clip(ls, false);
        assertNull(clipped);
        showResult("Circle around", ls, clipped);
    }
   
View Full Code Here

    }
   
    @Test
    public void testCrossingCircle() throws Exception {
        Point p = (Point) wkt.read("POINT(5 5)");
        LineString ls = ((Polygon) p.buffer(6)).getExteriorRing();
        MultiLineString clipped = (MultiLineString) clipper.clip(ls, false);
        assertEquals(4, clipped.getNumGeometries());
        showResult("Circle around", ls, clipped);
    }
   
View Full Code Here

      XYPoint point = _projection.forward(new CoordinatePoint(stop.getLat(),
          stop.getLon()));

      Point p = _factory.createPoint(new Coordinate(point.getX(), point.getY()));
      Geometry geometry = p.buffer(_bufferRadiusInMeters).getEnvelope();

      if (_geometry == null)
        _geometry = geometry;
      else
        _geometry = _geometry.union(geometry);
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.