Package org.opengis.geometry

Examples of org.opengis.geometry.PositionFactory.createDirectPosition()


    GeometryFactoryImpl gf = (GeometryFactoryImpl) c.getComponentInstanceOfType( GeometryFactory.class );
    PositionFactory pf = (PositionFactory ) c.getComponentInstanceOfType( PositionFactory.class );
   
    DirectPosition dp1 = pf.createDirectPosition(new double[]{10, 30});
    DirectPosition dp2 = pf.createDirectPosition(new double[]{70, 15});
    LineSegment line1 = gf.createLineSegment(dp1, pf.createDirectPosition(new double[]{20, 40}));
    LineSegment line2 = gf.createLineSegment(dp2, pf.createDirectPosition(new double[]{45, 25}));
    Set<OrientableCurve> curves = new HashSet<OrientableCurve>();
    curves.add( new CurveImpl( line1 ) );
    curves.add( new CurveImpl( line2 ) );
    MultiCurve mc = af.createMultiCurve(curves);
View Full Code Here


    PrimitiveFactory primF = builder.getPrimitiveFactory();
    GeometryFactory geomF = builder.getGeometryFactory();   

//     create directpositions
    DirectPosition start = posF.createDirectPosition(new double[]{ 48.44, -123.37 });
    DirectPosition middle = posF.createDirectPosition(new double[]{ 47, -122 });
    DirectPosition end = posF.createDirectPosition(new double[]{ 46.5, -121.5 });

//     add directpositions to a list
    ArrayList<Position> positions = new ArrayList<Position>();
    positions .add(start);
View Full Code Here

    PositionFactory pf = (PositionFactory ) c.getComponentInstanceOfType( PositionFactory.class );
   
    DirectPosition dp1 = pf.createDirectPosition(new double[]{10, 30});
    DirectPosition dp2 = pf.createDirectPosition(new double[]{70, 15});
    LineSegment line1 = gf.createLineSegment(dp1, pf.createDirectPosition(new double[]{20, 40}));
    LineSegment line2 = gf.createLineSegment(dp2, pf.createDirectPosition(new double[]{45, 25}));
    Set<OrientableCurve> curves = new HashSet<OrientableCurve>();
    curves.add( new CurveImpl( line1 ) );
    curves.add( new CurveImpl( line2 ) );
    MultiCurve mc = af.createMultiCurve(curves);
   
View Full Code Here

    GeometryFactory geomF = builder.getGeometryFactory();   

//     create directpositions
    DirectPosition start = posF.createDirectPosition(new double[]{ 48.44, -123.37 });
    DirectPosition middle = posF.createDirectPosition(new double[]{ 47, -122 });
    DirectPosition end = posF.createDirectPosition(new double[]{ 46.5, -121.5 });

//     add directpositions to a list
    ArrayList<Position> positions = new ArrayList<Position>();
    positions .add(start);
    positions.add(middle);
View Full Code Here

  private void _testMultiCurve(PicoContainer c) {

    AggregateFactoryImpl af = (AggregateFactoryImpl) c.getComponentInstanceOfType(AggregateFactory.class);
    PositionFactory pf = (PositionFactory ) c.getComponentInstanceOfType( PositionFactory.class );
   
    DirectPosition dp1 = pf.createDirectPosition(new double[]{10, 30});
    DirectPosition dp2 = pf.createDirectPosition(new double[]{70, 15});
    DirectPosition dp3 = pf.createDirectPosition(new double[]{45, 5});
    DirectPosition dp4 = pf.createDirectPosition(new double[]{10, 35});
    Set<Point> points = new HashSet<Point>();
    points.add( new PointImpl(dp1) );
View Full Code Here

    AggregateFactoryImpl af = (AggregateFactoryImpl) c.getComponentInstanceOfType(AggregateFactory.class);
    PositionFactory pf = (PositionFactory ) c.getComponentInstanceOfType( PositionFactory.class );
   
    DirectPosition dp1 = pf.createDirectPosition(new double[]{10, 30});
    DirectPosition dp2 = pf.createDirectPosition(new double[]{70, 15});
    DirectPosition dp3 = pf.createDirectPosition(new double[]{45, 5});
    DirectPosition dp4 = pf.createDirectPosition(new double[]{10, 35});
    Set<Point> points = new HashSet<Point>();
    points.add( new PointImpl(dp1) );
    points.add( new PointImpl(dp2) );
View Full Code Here

    AggregateFactoryImpl af = (AggregateFactoryImpl) c.getComponentInstanceOfType(AggregateFactory.class);
    PositionFactory pf = (PositionFactory ) c.getComponentInstanceOfType( PositionFactory.class );
   
    DirectPosition dp1 = pf.createDirectPosition(new double[]{10, 30});
    DirectPosition dp2 = pf.createDirectPosition(new double[]{70, 15});
    DirectPosition dp3 = pf.createDirectPosition(new double[]{45, 5});
    DirectPosition dp4 = pf.createDirectPosition(new double[]{10, 35});
    Set<Point> points = new HashSet<Point>();
    points.add( new PointImpl(dp1) );
    points.add( new PointImpl(dp2) );
    points.add( new PointImpl(dp3) );
View Full Code Here

    PositionFactory pf = (PositionFactory ) c.getComponentInstanceOfType( PositionFactory.class );
   
    DirectPosition dp1 = pf.createDirectPosition(new double[]{10, 30});
    DirectPosition dp2 = pf.createDirectPosition(new double[]{70, 15});
    DirectPosition dp3 = pf.createDirectPosition(new double[]{45, 5});
    DirectPosition dp4 = pf.createDirectPosition(new double[]{10, 35});
    Set<Point> points = new HashSet<Point>();
    points.add( new PointImpl(dp1) );
    points.add( new PointImpl(dp2) );
    points.add( new PointImpl(dp3) );
    points.add( new PointImpl(dp4) );
View Full Code Here

 
  public void testBuildPoint() {
   
    // test positionfactory
    PositionFactory posFactory = builder.getPositionFactory();
    DirectPosition position = posFactory.createDirectPosition(new double[] { 48.44, -123.37 });
   
    // test primitivefactory
    PrimitiveFactory primitiveFactory = builder.getPrimitiveFactory();
    System.out.println(primitiveFactory.getCoordinateReferenceSystem());
    Point point = primitiveFactory.createPoint(new double[] { 48.44, -123.37 });
View Full Code Here

    PositionFactory pf = builder.getPositionFactory();
    PrimitiveFactoryImpl primf = (PrimitiveFactoryImpl) builder.getPrimitiveFactory();
    AggregateFactory agf = builder.getAggregateFactory();
   
    List<DirectPosition> directPositionList = new ArrayList<DirectPosition>();
    directPositionList.add(pf.createDirectPosition(new double[] {20, 10}));
    directPositionList.add(pf.createDirectPosition(new double[] {40, 10}));
    directPositionList.add(pf.createDirectPosition(new double[] {50, 40}));
    directPositionList.add(pf.createDirectPosition(new double[] {30, 50}));
    directPositionList.add(pf.createDirectPosition(new double[] {10, 30}));
    directPositionList.add(pf.createDirectPosition(new double[] {20, 10}));
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.