Package org.opengis.geometry

Examples of org.opengis.geometry.Geometry


    }


    private Geometry loadTestGeometry(Node node) {
        String wktString = getNodeText(node);
        Geometry geom = null;
        try {
            geom = wktFactory.parse(wktString);
        } catch (ParseException e) {
            LOGGER.log( Level.FINE, "Can't parse [" + wktString + "]", e);           
            throw new RuntimeException("Can't parse [" + wktString + "]", e);
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;
            Geometry geom1 = setGeomArg(arg1, a, b);
            Geometry geom2 = setGeomArg(arg2, a, b);
            actualResult = geom1.contains(geom2);
            return actualResult == expected;
        }
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;
            Geometry geom1 = setGeomArg(arg1, a, b);
            Geometry geom2 = setGeomArg(arg2, a, b);
            actualResult = geom1.intersects(geom2);
            return actualResult == expected;
        }
View Full Code Here

         * @param b Geometry Object (not used)
         * @return a boolean indicating whether object A is simple
         */
        public boolean doOperation(Geometry a, Geometry b) {
            Boolean expected = (Boolean)expectedResult;
            Geometry geom1 = setGeomArg(arg1, a, b);
            actualResult = geom1.isSimple();
            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) {
            Geometry geom1 = setGeomArg(arg1, a, b);
            Geometry geom2 = setGeomArg(arg2, a, b);
            TransfiniteSet result = geom1.intersection(geom2);
            actualResult = result;
            return compareTransfiniteSetResult(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.getBoundary();
            actualResult = result;
            return compareTransfiniteSetResult(result);
        }
View Full Code Here

 
  private void _testPoints() {
   
    // Point
   
    Geometry res = this.createPointA().getConvexHull();
    double coord[] = ((PointImpl)res).getPosition().getCoordinate();
    assertTrue(coord[0] == 30);
    assertTrue(coord[1] == 50);

    res = this.createPointB().getConvexHull();
View Full Code Here

    assertEquals(mp.getConvexHull(),line);
  }
 
  private void _testCurves() {

    Geometry res = this.createCurveA().getConvexHull();
    List<DirectPosition> dpos = this.surfaceToPositions((Surface) res);
    assertTrue(dpos.get(0).getOrdinate(0) == 30);
    assertTrue(dpos.get(0).getOrdinate(1) == 20);
    assertTrue(dpos.get(1).getOrdinate(0) == 10);
    assertTrue(dpos.get(1).getOrdinate(1) == 50);
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);
            DirectPosition result = geom1.getCentroid();
            actualResult = result;
            return compareDirectPositionResult(result);
        }
View Full Code Here

  }
 
 
  private void _testSurfaces() {
   
    Geometry res = this.createSurfaceAwithTwoHoles().getConvexHull();
    List<DirectPosition> pos = this.surfaceToPositions((Surface) res);
    assertTrue(pos.get(0).getOrdinate(0) == 70);
    assertTrue(pos.get(0).getOrdinate(1) == 30);
    assertTrue(pos.get(1).getOrdinate(0) == 30);
    assertTrue(pos.get(1).getOrdinate(1) == 50);
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.