Package com.vividsolutions.jts.geom

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


        }
       
        GeometryCollection gc;
        gc = JTSUtils.getFactory().createGeometryCollection(polys);
       
        Geometry union = gc.buffer(0);
        return JTSUtils.toShape(union);
    }
   
    /**
     * Computes the region of element e that is above the threshold thrsh.
View Full Code Here


        geoms[i] = (roadList.get(i).getFinalGeometry());
      }
      GeometryFactory gf = new GeometryFactory();
      GeometryCollection polygonCollection = gf.createGeometryCollection(geoms);
      //union
      shape = polygonCollection.buffer(0);
    }
    finished = true;
  }

View Full Code Here

    }
   
    GeometryFactory gf = new GeometryFactory();
    GeometryCollection polygonCollection = gf.createGeometryCollection(geoms);
    //union all of the road geometries
    Geometry union = polygonCollection.buffer(0);
    //make a giant square the size of the city
    Geometry cityTemplateSquare = gf.createPolygon(gf.createLinearRing(new Coordinate[]{new Coordinate(-c.sizeX/2-e,c.sizeY/2+e,0), new Coordinate(c.sizeX/2+e,c.sizeY/2+e,0), new Coordinate(c.sizeX/2+e,-c.sizeY/2-e,0), new Coordinate(-c.sizeX/2-e,-c.sizeY/2-e,0), new Coordinate(-c.sizeX/2-e,c.sizeY/2+e,0)}),null);
    //subtract the union from the square to find the blocks
    Geometry difference = cityTemplateSquare.difference(union);
    LinkedList<CityBlock> blocks = new LinkedList<CityBlock>();
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.