Examples of union()


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

    Geometry[] result = new Geometry[1];
    // points/lines to polygon, prevents problems later on...
    // TODO this works for meters (1 cm) what with other crs's ?
    Geometry merged = geoms[0].buffer(0.01);
    for (int i = 1; i < geoms.length; i++) {
      merged = merged.union(geoms[i].buffer(0.01));
    }
    result[0] = merged;
    return result;
  }
View Full Code Here

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

        }

        GeometryFactory factory = new GeometryFactory();
        Geometry combined = factory.buildGeometry(geoms);

        return combined.union();
    }

    private void updateAOIService( ILayer layer, Geometry newAOI )
            throws IOException {
        IAOIService aOIService = PlatformGIS.getAOIService();
View Full Code Here

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

          Geometry[] geos = new Geometry[resultGeometries.size()];
          resultGeometries.toArray(geos);
          GeometryCollection geoCollection = geoFactory
              .createGeometryCollection(geos);
          resultGeometries = new ArrayList<Geometry>();
          resultGeometries.add(geoCollection.union());
        }
      }

      // Various out format
      if ("json".equals(f)) {
View Full Code Here

Examples of com.vividsolutions.jts.geom.LineString.union()

    LineString line = (LineString) SplitTestUtil
          .read("LINESTRING (260 280, 260 140, 130 140, 130 220, 90 220, 90 190, 180 190, 180 280, 240 280, 240 220, 150 220, 150 160, 240 160, 240 190, 180 190)");

    List<LinearRing> ringList = new ArrayList<LinearRing>();

    Geometry multiLines = line.union();

    Polygonizer polygonizer = new Polygonizer();
    polygonizer.add(multiLines);
    Collection<Polygon> polyCollection = polygonizer.getPolygons();
View Full Code Here

Examples of de.sciss.io.Span.union()

            }
            n = Math.max( totalSpan.start, Math.min( totalSpan.stop - sel.span.getLength(),
                dragOffset + position ));
            span = new Span( n, n + sel.span.getLength() );
            if( !span.equals( sel.span )) {
              span2 = span.union( sel.span );
              sel.span = span;
              dispatchSelectionChange();
              efficientRepaint( span2 );
            }
          } else {
View Full Code Here

Examples of dk.brics.automaton.Automaton.union()

   
    @Override
    public Automaton op(Automaton a) {
        Automaton result = Automaton.makeEmpty();
        if (a.run("" + FALSE))
            result = result.union(Automaton.makeString("false"));
        if (a.run("" + TRUE))
            result = result.union(Automaton.makeString("true"));
        return result;
    }
   
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.FreeVars.union()

    FreeVars vars1 = new FreeVars();
    vars1 = vars1.addVar(new SpecVar("foo"), "Foo");

    FreeVars vars2 = new FreeVars();
    vars2 = vars2.addVar(new SpecVar("bar"), "Bar");
    vars2 = vars2.union(vars1);
    assertEquals(2, vars2.size());
    assertEquals("Foo", vars2.getType(new SpecVar("foo")));
    assertEquals("Bar", vars2.getType(new SpecVar("bar")));
  }
View Full Code Here

Examples of htsjdk.samtools.GATKBAMFileSpan.union()

        if(iterators.length == 0)
            throw new ReviewedGATKException("Tried to add zero elements to an existing file pointer.");
        Map.Entry<SAMReaderID,SAMFileSpan> initialElement = iterators[0].next();
        GATKBAMFileSpan fileSpan = (GATKBAMFileSpan)initialElement.getValue();
        for(int i = 1; i < iterators.length; i++)
            fileSpan = fileSpan.union((GATKBAMFileSpan)iterators[i].next().getValue());
        combined.addFileSpans(initialElement.getKey(),fileSpan);
    }

    /**
     * Efficiently generate the union of the n FilePointers passed in. Much more efficient than
View Full Code Here

Examples of java.awt.Rectangle.union()

   */
  private void makeRowsVisible(int minRow, int maxRow) {   
    // Compute the rectangle that includes a row
    Rectangle includingRectangle = getCellRect(minRow, 0, true);
    if (minRow != maxRow) {
      includingRectangle = includingRectangle.
          union(getCellRect(maxRow, 0, true));     
    }
    if (getAutoResizeMode() == AUTO_RESIZE_OFF) {
      int lastColumn = getColumnCount() - 1;
      includingRectangle = includingRectangle.
View Full Code Here

Examples of java.awt.Rectangle.union()

    if (getAutoResizeMode() == AUTO_RESIZE_OFF) {
      int lastColumn = getColumnCount() - 1;
      includingRectangle = includingRectangle.
          union(getCellRect(minRow, lastColumn, true));
      if (minRow != maxRow) {
        includingRectangle = includingRectangle.
            union(getCellRect(maxRow, lastColumn, true));     
      }
    }
    scrollRectToVisible(includingRectangle);
  }
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.