Beispiel #1
0
 public static Geometry componentBuffers(Geometry g, double distance) {
   List bufs = new ArrayList();
   for (Iterator it = new GeometryCollectionIterator(g); it.hasNext(); ) {
     Geometry comp = (Geometry) it.next();
     if (comp instanceof GeometryCollection) continue;
     bufs.add(comp.buffer(distance));
   }
   return FunctionsUtil.getFactoryOrDefault(g)
       .createGeometryCollection(GeometryFactory.toGeometryArray(bufs));
 }
 static Geometry createCircle(Coordinate centre, double radius) {
   Geometry centrePt = geomFact.createPoint(centre);
   return centrePt.buffer(radius, POLYGON_SIZE);
 }