Examples of XYNode


Examples of org.geotools.graph.structure.line.XYNode

   
    //ensure coordinates
    GraphVisitor visitor = new GraphVisitor() {
      public int visit(Graphable component) {
        Edge e = (Edge)component;
        XYNode a = (XYNode)e.getNodeA();
        XYNode b = (XYNode)e.getNodeB();
       
        //coordinats should be a distance of sqrt(2)
        assertTrue(
          Math.abs(a.getCoordinate().x - b.getCoordinate().x) == 1 &&
          Math.abs(a.getCoordinate().y - b.getCoordinate().y) == 1
        );
       
//        assertTrue(
//            Math.abs(a.getX() - b.getX()) == 1
//         && Math.abs(a.getY() - b.getY()) == 1
View Full Code Here

Examples of org.geotools.graph.structure.line.XYNode

   
    //ensure coordinates
    GraphVisitor visitor = new GraphVisitor() {
      public int visit(Graphable component) {
        Edge e = (Edge)component;
        XYNode a = (XYNode)e.getNodeA();
        XYNode b = (XYNode)e.getNodeB();
       
        if (b.getCoordinate().equals(base)) {
          assertTrue(a.getCoordinate().equals(new Coordinate(n,n)))
        }
        else {
         assertTrue(
            Math.abs(a.getCoordinate().x - b.getCoordinate().x) == 1 &&
            Math.abs(a.getCoordinate().y - b.getCoordinate().y) == 1
          );
        }
   
        return(0);
      }
View Full Code Here

Examples of org.geotools.graph.structure.line.XYNode

   
    //ensure coordinates
    GraphVisitor visitor = new GraphVisitor() {
      public int visit(Graphable component) {
        Edge e = (Edge)component;
        XYNode a = (XYNode)e.getNodeA();
        XYNode b = (XYNode)e.getNodeB();
       
        //coordinats should be a distance of sqrt(2)
        //assertTrue(b.getX() == a.getX() + 1 && b.getY() == a.getY() + 1);
        assertTrue(
          b.getCoordinate().equals(
            new Coordinate(a.getCoordinate().x+1, a.getCoordinate().y+1)
          )
        );
       
        return(0);
View Full Code Here

Examples of org.geotools.graph.structure.line.XYNode

   
    //ensure coordinates
    GraphVisitor visitor = new GraphVisitor() {
      public int visit(Graphable component) {
        Edge e = (Edge)component;
        XYNode a = (XYNode)e.getNodeA();
        XYNode b = (XYNode)e.getNodeB();
       
        //coordinats should be a distance of sqrt(2)
        if (b.getCoordinate().equals(base))
          assertTrue(a.getCoordinate().equals(new Coordinate(n,n)));
        else
          assertTrue(
            b.getCoordinate().equals(
              new Coordinate(a.getCoordinate().x+1, a.getCoordinate().y+1)
            )
          );
       
//        if (b.getX() == base.x && b.getY() == base.y)
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.