Package com.vividsolutions.jts.geom

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


    }

    private static void WriteNodesInSubGraph(Subgraph subgraph, PrintWriter islandLog, boolean hadRemoved){
        Geometry convexHullGeom = subgraph.getConvexHull();
        if (convexHullGeom != null && !(convexHullGeom instanceof Polygon)) {
            convexHullGeom = convexHullGeom.buffer(0.0001,5);
        }
        islandLog.printf("%d\t%d\t%d\t%s\t%b\n", islandCounter, subgraph.stopSize(),
                subgraph.streetSize(), convexHullGeom, hadRemoved);
        islandCounter++;
    }
View Full Code Here


    @Override
    protected void processFeature(SimpleFeature feature, Map<String, Object> input) throws Exception {
       Double buffer = (Double) input.get( BufferFeatureCollectionFactory.BUFFER.key );
      
       Geometry g = (Geometry) feature.getDefaultGeometry();
       g = g.buffer( buffer );
      
       if(g instanceof Polygon) {
           g = g.getFactory().createMultiPolygon(new Polygon[] {(Polygon) g});
       }
      
View Full Code Here

    {
      GeometryFactory gf = ((Polygon) polys.get(0)).getFactory();
      gfinal = new MultiPolygon((Polygon[]) polys.toArray( new Polygon[polys.size()]),   gf    );
    }
   
    gfinal = gfinal.buffer(0); // for topologic problems.
   
     
      Object[] values = new Object[5];
      values[ft.find("module")] = MODULE;
      values[ft.find("gen_full")] = gfinal;
View Full Code Here

    static public Geometry bufferWithSegments(Geometry arg0, double arg1,
            int arg2) {
        Geometry _this = arg0;

        return _this.buffer(arg1, arg2);
    }

    static public Geometry buffer(Geometry arg0, double arg1) {
        Geometry _this = arg0;
View Full Code Here

    }

    static public Geometry buffer(Geometry arg0, double arg1) {
        Geometry _this = arg0;

        return _this.buffer(arg1);
    }

    static public Geometry convexHull(Geometry arg0) {
        Geometry _this = arg0;
View Full Code Here

    @Override
    protected void processFeature(SimpleFeature feature, Map<String, Object> input) throws Exception {
       Double buffer = (Double) input.get( BufferFeatureCollectionFactory.BUFFER.key );
      
       Geometry g = (Geometry) feature.getDefaultGeometry();
       g = g.buffer( buffer );
      
       if(g instanceof Polygon) {
           g = g.getFactory().createMultiPolygon(new Polygon[] {(Polygon) g});
       }
      
View Full Code Here

     static public Geometry bufferWithSegments(Geometry arg0, Double arg1, Integer arg2)
     {
           if (arg0 == null || arg1 == null || arg2 == null) return null;
           Geometry _this = arg0;

           return _this.buffer(arg1,arg2);
     }

     static public Geometry buffer(Geometry arg0, Double arg1)
     {
           if (arg0 == null || arg1 == null) return null;
View Full Code Here

     static public Geometry buffer(Geometry arg0, Double arg1)
     {
           if (arg0 == null || arg1 == null) return null;
           Geometry _this = arg0;

           return _this.buffer(arg1);
     }

     static public Geometry convexHull(Geometry arg0)
     {
           if (arg0 == null) return null;
View Full Code Here

  private void doGeometryTestsOnResults(Envelope bbox, List<SpatialDatabaseRecord> results) {
    System.out.println("Found " + results.size() + " geometries in " + bbox);
    Geometry geometry = results.get(0).getGeometry();
    System.out.println("First geometry is " + geometry);
    geometry.buffer(2);
  }

}
View Full Code Here

        null,
        Geometry.class);
    if (geom == null) {
      return infinity();
    }
    geom = geom.buffer(filter.getDistance());

    if (bbox != null) {
      return geom.union(bbox);
    }
    else {
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.