Examples of toCoord()


Examples of org.locationtech.udig.tools.edit.support.EditBlackboard.toCoord()

    parallelContext.setUnits(mapUnits);

    EditBlackboard bb = handler.getEditBlackboard(handler.getEditLayer());
    Point currPoint = Point.valueOf(event.x, event.y);
    Coordinate coor = bb.toCoord(currPoint);

    // previous line exist, if we change the reference line also need to
    // reset the initial point.
    // needs to store the line before setting the initial point.
    if (this.parallelContext.getReferenceFeature() != null) {
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.EditBlackboard.toCoord()

       
//        for( int i = 0; i < coords.length; i++ ) {
//            assertSame(  );
//        }
       
        Coordinate deltaPart1 = editBlackboard.toCoord(Point.valueOf(points[0].getX()+2, points[0].getY()));
        Coordinate deltaPart2 = editBlackboard.toCoord(points[0]);
        double deltaX = deltaPart1.x-deltaPart2.x;
        double deltaY = deltaPart1.y-deltaPart2.y;
       
        for( int i = 0; i < coords.length; i++ ) {
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.EditBlackboard.toCoord()

//        for( int i = 0; i < coords.length; i++ ) {
//            assertSame(  );
//        }
       
        Coordinate deltaPart1 = editBlackboard.toCoord(Point.valueOf(points[0].getX()+2, points[0].getY()));
        Coordinate deltaPart2 = editBlackboard.toCoord(points[0]);
        double deltaX = deltaPart1.x-deltaPart2.x;
        double deltaY = deltaPart1.y-deltaPart2.y;
       
        for( int i = 0; i < coords.length; i++ ) {
            assertEquals( new Coordinate( coords[i].x+deltaX, coords[i].y+deltaY ),
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.EditBlackboard.toCoord()

        while( iter.hasNext() ){
            SimpleFeature feature=iter.next();
            if( feature.getID().equals("new0") ){ //$NON-NLS-1$
                List<Coordinate> coords = Arrays.asList(((Geometry) feature.getDefaultGeometry()).getCoordinates());
                assertEquals(10, coords.size());
                assertTrue(coords.contains( bb.toCoord(Point.valueOf(25,0)) ) );
                assertTrue(coords.contains(new Coordinate(35.5,0.5)) );
                assertTrue(coords.contains(new Coordinate(35.5,20)) );
                assertTrue(coords.contains(new Coordinate(25.5,20)) );
                assertTrue(coords.contains(new Coordinate(25.5,40) ) );
                assertTrue(coords.contains(new Coordinate(35.5,40)) );
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.EditBlackboard.toCoord()

    if (!isValid(handler, e, eventType)) {
      throw new IllegalArgumentException("Behaviour is not valid for the current state"); //$NON-NLS-1$
    }
    EditBlackboard bb = handler.getEditBlackboard(handler.getEditLayer());
    Point currPoint = Point.valueOf(e.x, e.y);
    Coordinate coor = bb.toCoord(currPoint);

    SetInitialPointCommand setInitialPointCommand = new SetInitialPointCommand(this.parallelContext, coor);
    return setInitialPointCommand;
  }
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.