Package org.geotools.geometry.iso

Examples of org.geotools.geometry.iso.PositionFactoryImpl.createDirectPosition()


    // public PrimitiveImpl createPrimitive(Envelope envelope);
    // indirect: public SurfaceImpl createSurface(SurfaceBoundary boundary);
    // indirect: public SurfaceImpl createSurfaceByDirectPositions(List<DirectPosition> positions);
    // indirect: public SurfaceBoundaryImpl createSurfaceBoundary(Ring exterior, List<Ring> interiors);
    // indirect: public Ring createRingByDirectPositions(List<DirectPosition> directPositions);
    DirectPosition dp1 = posf.createDirectPosition(new double[]{10, 10});
    DirectPosition dp2 = posf.createDirectPosition(new double[]{70, 30});
    Envelope env1 = cf.createEnvelope(dp1, dp2);
    PrimitiveImpl prim1 = (PrimitiveImpl) pf.createPrimitive(env1);
    assertNotNull(prim1);
   
View Full Code Here


    // indirect: public SurfaceImpl createSurface(SurfaceBoundary boundary);
    // indirect: public SurfaceImpl createSurfaceByDirectPositions(List<DirectPosition> positions);
    // indirect: public SurfaceBoundaryImpl createSurfaceBoundary(Ring exterior, List<Ring> interiors);
    // indirect: public Ring createRingByDirectPositions(List<DirectPosition> directPositions);
    DirectPosition dp1 = posf.createDirectPosition(new double[]{10, 10});
    DirectPosition dp2 = posf.createDirectPosition(new double[]{70, 30});
    Envelope env1 = cf.createEnvelope(dp1, dp2);
    PrimitiveImpl prim1 = (PrimitiveImpl) pf.createPrimitive(env1);
    assertNotNull(prim1);
   
  }
View Full Code Here

   
    PositionFactoryImpl positionFactory = (PositionFactoryImpl) c.getComponentInstanceOfType(PositionFactory.class);
    ComplexFactoryImpl complf = (ComplexFactoryImpl) c.getComponentInstanceOfType(ComplexFactory.class);
     
    // testcreateCompositeCurve()
    PointImpl p1 = new PointImpl( positionFactory.createDirectPosition(new double[]{50, 20}) );
    PointImpl p2 = new PointImpl( positionFactory.createDirectPosition(new double[]{70, 80}) );
   
    CompositePoint comppoint1 = complf.createCompositePoint(p1);
    CompositePoint comppoint2 = complf.createCompositePoint(p2);
   
View Full Code Here

    PositionFactoryImpl positionFactory = (PositionFactoryImpl) c.getComponentInstanceOfType(PositionFactory.class);
    ComplexFactoryImpl complf = (ComplexFactoryImpl) c.getComponentInstanceOfType(ComplexFactory.class);
     
    // testcreateCompositeCurve()
    PointImpl p1 = new PointImpl( positionFactory.createDirectPosition(new double[]{50, 20}) );
    PointImpl p2 = new PointImpl( positionFactory.createDirectPosition(new double[]{70, 80}) );
   
    CompositePoint comppoint1 = complf.createCompositePoint(p1);
    CompositePoint comppoint2 = complf.createCompositePoint(p2);
   
    assertNotNull(comppoint1);
View Full Code Here

    assertSame( positionFactory.getCoordinateReferenceSystem(), primitiveFactory.getCoordinateReferenceSystem() );
    assertNotNull(positionFactory);
    assertNotNull(primitiveFactory);
   
    // create position and point
    DirectPosition here = positionFactory.createDirectPosition(ords);
    Point point = primitiveFactory.createPoint(here);
    assertNotNull(here.getCoordinateReferenceSystem());
    assertNotNull(point.getCoordinateReferenceSystem());
    assertEquals(here.getCoordinateReferenceSystem(), point.getCoordinateReferenceSystem());
    assertEquals(here, point.getDirectPosition());
View Full Code Here

    PrimitiveFactoryImpl pf = (PrimitiveFactoryImpl) c.getComponentInstanceOfType(PrimitiveFactory.class);
    GeometryFactoryImpl geomFact = (GeometryFactoryImpl) c.getComponentInstanceOfType(GeometryFactory.class);
     
    // testcreateCompositeCurve()
    ArrayList<Position> line1 = new ArrayList<Position>();
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{50, 20})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{30, 30})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 50})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 70})));

    ArrayList<Position> line2 = new ArrayList<Position>();
View Full Code Here

         for( double angle = 0.0; angle < 360.0; angle += delta ){
             double ordinates[] = new double[]{
                     Math.sin( Math.toRadians(angle) ),
                     Math.cos( Math.toRadians(angle) )
             };
             DirectPosition point = postitionFactory.createDirectPosition( ordinates );
             points.add( point );
         }
         List<OrientableCurve> curves = new ArrayList<OrientableCurve>();       
         // A curve will be created
         // - The curve will be set as parent curves for the Curve segments
View Full Code Here

    GeometryFactoryImpl geomFact = (GeometryFactoryImpl) c.getComponentInstanceOfType(GeometryFactory.class);
     
    // testcreateCompositeCurve()
    ArrayList<Position> line1 = new ArrayList<Position>();
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{50, 20})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{30, 30})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 50})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 70})));

    ArrayList<Position> line2 = new ArrayList<Position>();
    line2.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 70})));
View Full Code Here

     
    // testcreateCompositeCurve()
    ArrayList<Position> line1 = new ArrayList<Position>();
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{50, 20})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{30, 30})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 50})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 70})));

    ArrayList<Position> line2 = new ArrayList<Position>();
    line2.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 70})));
    line2.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{40, 80})));
View Full Code Here

    // testcreateCompositeCurve()
    ArrayList<Position> line1 = new ArrayList<Position>();
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{50, 20})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{30, 30})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 50})));
    line1.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 70})));

    ArrayList<Position> line2 = new ArrayList<Position>();
    line2.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{20, 70})));
    line2.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{40, 80})));
    line2.add(new PositionImpl(positionFactory.createDirectPosition(new double[]{70, 80})));
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.