Package org.opengis.geometry

Examples of org.opengis.geometry.Geometry


         * @param a Geometry object
         * @param b Geometry Object (not used)
         * @return a boolean indicating whether the result matched the expectation
         */
        public boolean doOperation(Geometry a, Geometry b) {
            Geometry geom1 = setGeomArg(arg1, a, b);
            DirectPosition result = geom1.getRepresentativePoint();
            actualResult = result;
            return compareDirectPositionResult(result);
        }
View Full Code Here


         * @param a Geometry object
         * @param b Geometry Object (not used)
         * @return a boolean indicating whether the result matched the expectation
         */
        public boolean doOperation(Geometry a, Geometry b) {
            Geometry geom1 = setGeomArg(arg1, a, b);
            TransfiniteSet result = geom1.getConvexHull();
            actualResult = result;
            return compareTransfiniteSetResult(result);
        }
View Full Code Here

         * @param a Geometry object
         * @param b Geometry object
         * @return a boolean indicating whether the result matched the expectation
         */
        public boolean doOperation(Geometry a, Geometry b) {
            Geometry geom1 = setGeomArg(arg1, a, b);
            Geometry geom2 = setGeomArg(arg2, a, b);
            TransfiniteSet result = geom1.difference(geom2);
            actualResult = result;
            return compareTransfiniteSetResult(result);
        }
View Full Code Here

         * @param a Geometry object
         * @param b Geometry object
         * @return a boolean indicating whether the result matched the expectation
         */
        public boolean doOperation(Geometry a, Geometry b) {
            Geometry geom1 = setGeomArg(arg1, a, b);
            Geometry geom2 = setGeomArg(arg2, a, b);
            TransfiniteSet result = geom1.symmetricDifference(geom2);
            actualResult = result;
            return compareTransfiniteSetResult(result);
        }
View Full Code Here

         * @param a Geometry object
         * @param b Geometry object
         * @return a boolean indicating whether the result matched the expectation
         */
        public boolean doOperation(Geometry a, Geometry b) {
            Geometry geom1 = setGeomArg(arg1, a, b);
            Geometry geom2 = setGeomArg(arg2, a, b);
            TransfiniteSet result = geom1.union(geom2);
            actualResult = result;
            return compareTransfiniteSetResult(result);
        }
View Full Code Here

        String nextToken = getNextEmptyOrOpener(tokenizer);       
        if (nextToken.equals(EMPTY)) {
          return null;
        }
        MultiPrimitive multi = geometryFactory.createMultiPrimitive();
        Geometry geom = readGeometryTaggedText(tokenizer);
        //multi.getElements().add(geom);
        Set elements = multi.getElements();
        elements.add(geom);
        nextToken = getNextCloserOrComma(tokenizer);
        while (nextToken.equals(COMMA)) {
View Full Code Here

      // the maxD dimension and return the average of the centroid points
      CentroidPoint cp = new CentroidPoint(this.crs);
      Set<? extends Primitive> elems = ((MultiPrimitiveImpl)this).getElements();
      Iterator<? extends Primitive> iter = elems.iterator();
      while (iter.hasNext()) {
        Geometry prim = iter.next();
        if (prim.getDimension(null) == maxD) {
          cp.add(new PointImpl(prim.getCentroid()));
        }
      }
     
      // return the average of the centroid points
      return cp.getCentroid();
View Full Code Here

         * @param a Geometry object
         * @param b Geometry object
         * @return a boolean indicating whether the result matched the expectation
         */
        public boolean doOperation(Geometry a, Geometry b) {
            Geometry geom1 = setGeomArg(arg1, a, b);
            Geometry geom2 = setGeomArg(arg2, a, b);
            TransfiniteSet result = geom1.union(geom2);
            return compareTransfiniteSetResult(result);
        }
View Full Code Here

    }


    private Geometry loadTestGeometry(Node node) {
        String wktString = getNodeText(node);
        Geometry geom = null;
        try {
            geom = wktFactory.parse(wktString);
        } catch (ParseException e) {
            LOG.debug("Can't parse [" + wktString + "]", e);
            throw new RuntimeException("Can't parse [" + wktString + "]", e);
View Full Code Here

          positions.add(prim);
        }
        else {
          // this is not a point, so get its convexhull and add those
          // points to this hull
          Geometry hull = prim.getConvexHull();
         
          if (hull instanceof CurveImpl) {
            CurveImpl curve = (CurveImpl) prim.getConvexHull();
            positions.addAll( ((CurveImpl)curve).asDirectPositions() );
          }
View Full Code Here

TOP

Related Classes of org.opengis.geometry.Geometry

Copyright © 2018 www.massapicom. 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.