Package org.geotools.geometry.iso.root

Examples of org.geotools.geometry.iso.root.GeometryImpl


    draw(s1);

    s2= d.createSurfaceBwithHole(crs);
    draw(s2);

    GeometryImpl g = null;
    g =  (GeometryImpl) s1.difference(s2);
    draw(g);

    g = (GeometryImpl) s1.symmetricDifference(s2);
    draw(g);
View Full Code Here


                        if (operationValue.equalsIgnoreCase("skipped")) {
                          continue;
                        }
                        else if (operationValue.equalsIgnoreCase("boundary")) {
                          // post process into a surface boundary
                          GeometryImpl curves = (GeometryImpl) op.getExpectedResult();
                          //MultiPrimitive curves = (MultiPrimitive) op.getExpectedResult();
                          Boundary boundary = curves.getBoundary();
                          op.setExpectedResult( boundary );
                        }
                        else if (operationValue.equalsIgnoreCase("point")) {
                          // post obj into a point
                          PointImpl point = (PointImpl) op.getExpectedResult();
View Full Code Here

         * @param b Geometry Object
         * @return a boolean indicating whether the result matched the expectation
         */
        public boolean doOperation(Geometry a, Geometry b) {
            Boolean expected = (Boolean)expectedResult;
            GeometryImpl geom1 = (GeometryImpl) setGeomArg(arg1, a, b);
            GeometryImpl geom2 = (GeometryImpl) setGeomArg(arg2, a, b);
            actualResult = geom1.within(geom2);
            return actualResult == expected;
        }
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) {
            GeometryImpl geom1 = (GeometryImpl) setGeomArg(arg1, a, b);
            GeometryImpl geom2 = (GeometryImpl) setGeomArg(arg2, a, b);
            boolean result = false;
      try {
        result = geom1.relate(geom2, arg3);
      } catch (UnsupportedDimensionException e) {
        // TODO Auto-generated catch block
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) {
            GeometryImpl geom1 = (GeometryImpl) setGeomArg(arg1, a, b);
            GeometryImpl geom2 = (GeometryImpl) setGeomArg(arg2, a, b);
            double result = Double.NaN;
      result = geom1.distance(geom2);
      // return if the result is <= the max distance
      actualResult = (result <= Double.parseDouble(arg3));
            return (actualResult == expectedResult);
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) {
            GeometryImpl geom1 = (GeometryImpl) setGeomArg(arg1, a, b);
            GeometryImpl geom2 = (GeometryImpl) setGeomArg(arg2, a, b);
            double result = Double.NaN;
      result = geom1.distance(geom2);
      actualResult = result;
            return (Double.compare(result, (Double) expectedResult) == 0);
        }
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) {
            GeometryImpl geom1 = (GeometryImpl) setGeomArg(arg1, a, b);
            GeometryImpl geom2 = (GeometryImpl) setGeomArg(arg2, a, b);
            boolean result = geom1.disjoint(geom2);
            actualResult = result;
            return (actualResult == expectedResult);
        }
View Full Code Here

    SurfaceImpl surfaceBwithHole = this.createSurfaceBwithHole(crs);
    SurfaceImpl surfaceC = this.createSurfaceC(crs);
    CurveImpl curveA = this.createCurveA(crs);
    CurveImpl curveF = this.createCurveF(crs);

    GeometryImpl g1 = null;
    GeometryImpl g2 = null;
   
    g1 = surfaceBwithoutHole;
    g2 = curveA;
    //System.out.println("(CS1)");
    this.testAndPrintTest("CS1", g1, g2);
View Full Code Here

   
    //System.out.print("\nTestcase : (" + testCaseID + ")");
    //System.out.print("\nGeometry 1 :" + g1);
    //System.out.print("\nGeometry 2 :" + g2 + "\n");

    GeometryImpl g = null;
   
    // INTERSECTION
    g = this._testIntersection(g1, g2);
    //System.out.println("Intersection - result geometry: " + g);
View Full Code Here

   */
  public static GeometryImpl overlayOp(GeometryImpl geom0,
      GeometryImpl geom1, int opCode)
      throws UnsupportedDimensionException {
    OverlayOp gov = new OverlayOp(geom0, geom1);
    GeometryImpl geomOv = gov.getResultGeometry(opCode);
    return geomOv;
  }
View Full Code Here

TOP

Related Classes of org.geotools.geometry.iso.root.GeometryImpl

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.