Examples of newGeom()


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

    }

    @Test
    public void testSelectingWhen2ShapesAreOnBB() throws Exception {
        EditBlackboard bb = handler.getEditBlackboard();
        EditGeom geom2 = bb.newGeom("new", null); //$NON-NLS-1$
        bb.addPoint(100,0,geom2.getShell());
        bb.addPoint(100,10,geom2.getShell());

        handler.getBehaviours().add( new SelectVerticesWithBoxBehaviour() );
       
View Full Code Here

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

       
        EditBlackboard editBlackboard = handler.getEditBlackboard();
        PrimitiveShape shell = editBlackboard.getGeoms().get(0).getShell();
        editBlackboard.addPoint(100,100,shell);
        shell.getEditGeom().setShapeType(ShapeType.POINT);
        editBlackboard.newGeom("newone", null); //$NON-NLS-1$
       
        StartEditingBehaviour behav=new StartEditingBehaviour(ShapeType.POLYGON);

        handler.getBehaviours().add(behav);
       
View Full Code Here

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

     */
    @Test
    public void testDifferencePolygonOnce() throws Exception {
        handler.resetEditBlackboard();
        EditBlackboard bb = handler.getEditBlackboard();
        PrimitiveShape shell = bb.newGeom(null, null).getShell();
        handler.setCurrentShape(shell);
        bb.addPoint(25,0, shell);
        bb.addPoint(35,0, shell);
        bb.addPoint(35,60, shell);
        bb.addPoint(25,60, shell);
View Full Code Here

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

        GeometryFactory fac=new GeometryFactory();
        Polygon[] polygons = new Polygon[]{ (Polygon) features[1].getDefaultGeometry()};
        MultiPolygon createMultiPolygon = fac.createMultiPolygon(polygons);
        features[1].setDefaultGeometry(createMultiPolygon);
        EditBlackboard bb = handler.getEditBlackboard();
        PrimitiveShape shell = bb.newGeom(null, null).getShell();
        handler.setCurrentShape(shell);
        bb.addPoint(25,0, shell);
        bb.addPoint(35,0, shell);
        bb.addPoint(35,60, shell);
        bb.addPoint(25,60, shell);
View Full Code Here

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

    store.modifyFeatures(features[0].getFeatureType().getGeometryDescriptor(), polygon,
                filterFactory.id(FeatureUtils.stringToId(filterFactory, features[0].getID())));
   
        EditBlackboard bb = handler.getEditBlackboard();
       
        PrimitiveShape shell = bb.newGeom(null, null).getShell();
        handler.setCurrentShape(shell);
        bb.addPoint(25,0, shell);
        bb.addPoint(35,0, shell);
        bb.addPoint(35,60, shell);
        bb.addPoint(25,60, shell);
View Full Code Here

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

    store.removeFeatures(filterFactory.id(FeatureUtils.stringToId(filterFactory, features[1].getID())));
        store.modifyFeatures(features[0].getFeatureType().getGeometryDescriptor(), geom,
                filterFactory.id(FeatureUtils.stringToId(filterFactory, features[0].getID())));
        EditBlackboard bb = handler.getEditBlackboard();
       
        PrimitiveShape shell = bb.newGeom(null, null).getShell();
        handler.setCurrentShape(shell);
        bb.addPoint(25,0, shell);
        bb.addPoint(35,0, shell);
        bb.addPoint(35,65, shell);
        bb.addPoint(25,65, shell);
View Full Code Here

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

        FeatureIterator<SimpleFeature> features = layer.getResource(FeatureSource.class, null).getFeatures().features();
        SimpleFeature next = features.next();
        assertEquals( toCoord(bb,10,10), ((Geometry) next.getDefaultGeometry()).getCoordinates()[0] );
        assertEquals(Point.class, feature.getDefaultGeometry().getClass());
       
        bb.addPoint(40,10,bb.newGeom(null, null).getShell());
        handler.getCurrentGeom().setChanged(true);

        SimpleFeatureType type = DataUtilities.createType("MultiPoint", "*geom:MultiPoint"); //$NON-NLS-1$ //$NON-NLS-2$
        feature = SimpleFeatureBuilder.template(type, feature.getID());
        ((TestLayer)handler.getContext().getMap().getMapLayers().get(0)).setSchema(type);
View Full Code Here

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

     */
    @Ignore
    @Test
    public void testMultiPointOnBlackboard() throws Exception {
        EditBlackboard bb = handler.getEditBlackboard();
        EditGeom geom = bb.newGeom(feature.getID(), ShapeType.POINT);
        bb.addPoint(10,10,geom.getShell());
        handler.setCurrentShape(geom.getShell());
       
        EditGeom geom2 = bb.newGeom(feature.getID(), ShapeType.POINT);
        bb.addPoint(20,20, geom2.getShell());
View Full Code Here

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

        EditBlackboard bb = handler.getEditBlackboard();
        EditGeom geom = bb.newGeom(feature.getID(), ShapeType.POINT);
        bb.addPoint(10,10,geom.getShell());
        handler.setCurrentShape(geom.getShell());
       
        EditGeom geom2 = bb.newGeom(feature.getID(), ShapeType.POINT);
        bb.addPoint(20,20, geom2.getShell());
       
        AcceptChangesBehaviour behaviour = new AcceptChangesBehaviour(Point.class, false);
        UndoableMapCommand command = behaviour.getCommand(handler);
        command.setMap((Map) handler.getContext().getMap());
View Full Code Here

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

     * @throws Exception
     */
    @Test
    public void testTwoChangedFeaturesOnBlackboard() throws Exception {
        EditBlackboard bb = handler.getEditBlackboard();
        EditGeom geom1 = bb.newGeom(feature.getID(), null);
        bb.addPoint(10,10, geom1.getShell());
        bb.addPoint(20,10, geom1.getShell());
        bb.addPoint(20,20, geom1.getShell());
        bb.addPoint(10,10, geom1.getShell());
        handler.setCurrentShape(geom1.getShell());
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.