Examples of SurfaceBoundary


Examples of org.opengis.geometry.primitive.SurfaceBoundary

     * @return <tt>SurfaceBoundary</tt>
     */
    protected SurfaceBoundary createSurfaceBoundary(Curve exterior) {
        final Ring exteriorRing = createRing(exterior);
        List interiorRingList = Collections.EMPTY_LIST;
        SurfaceBoundary surfaceBoundary = null;
        surfaceBoundary = pFact.createSurfaceBoundary(exteriorRing, interiorRingList);
        return surfaceBoundary;
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.SurfaceBoundary

     * @param points points defining the polygon (surface)
     * @return the surface created out of the points
     */
    protected Surface createSurface(final DirectPosition[] points) {
        Curve curve = createCurve(points);
        SurfaceBoundary surfaceBoundary = createSurfaceBoundary(curve);
        Surface surface = getPrimitiveFactory().createSurface(surfaceBoundary);
        return surface;
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.SurfaceBoundary

    // create the interior ring and a list of empty interior rings (holes)
    Ring extRing = builder2.createRing(orientableCurves);
    List<Ring> intRings = new ArrayList<Ring>();

    // create the surfaceboundary from the rings
    SurfaceBoundary sb = builder2.createSurfaceBoundary(extRing, intRings);

    // create the surface
    Surface surface = builder2.createSurface(sb);

  }
View Full Code Here

Examples of org.opengis.geometry.primitive.SurfaceBoundary

    directPositionList.add(positionFactory.createDirectPosition(new double[] {20, 10, 0.0}));

    Ring exteriorRing = tPrimFactory.createRingByDirectPositions(directPositionList);
    List<Ring> interiors = new ArrayList<Ring>();

    SurfaceBoundary boundary = new SurfaceBoundaryImpl(cf.getCoordinateReferenceSystem(), exteriorRing, interiors);
    Polygon poly = cf.createPolygon(boundary);
    assertNotNull(poly);
    assertNotNull(poly.getBoundary());
   
    PolygonImpl expected = new PolygonImpl((SurfaceBoundaryImpl) boundary);
View Full Code Here

Examples of org.opengis.geometry.primitive.SurfaceBoundary

     * @return <tt>SurfaceBoundary</tt>
     */
    protected SurfaceBoundary createSurfaceBoundary(Curve exterior) {
        final Ring exteriorRing = createRing(exterior);
        List interiorRingList = Collections.EMPTY_LIST;
        SurfaceBoundary surfaceBoundary = null;
        surfaceBoundary = pFact.createSurfaceBoundary(exteriorRing, interiorRingList);
        return surfaceBoundary;
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.SurfaceBoundary

     * @param points points defining the polygon (surface)
     * @return the surface created out of the points
     */
    protected Surface createSurface(final DirectPosition[] points) {
        Curve curve = createCurve(points);
        SurfaceBoundary surfaceBoundary = createSurfaceBoundary(curve);
        Surface surface = getPrimitiveFactory().createSurface(surfaceBoundary);
        return surface;
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.SurfaceBoundary

    //System.out.println(exteriorring1);
   
    List<Ring> interiors = new ArrayList<Ring>();
   
    SurfaceBoundary surfaceBoundary1 = tPrimFactory.createSurfaceBoundary(exteriorring1, interiors);
   
    //System.out.println(surfaceBoundary1);

    assertTrue(surfaceBoundary1.isCycle() == true);

   
    // clone()
    SurfaceBoundary surfaceBoundary2 = null;
    try {
      surfaceBoundary2 = (SurfaceBoundary) surfaceBoundary1.clone();
    } catch (CloneNotSupportedException e) {
      e.printStackTrace();
    }
    assertTrue(surfaceBoundary1 != surfaceBoundary2);
    assertTrue(surfaceBoundary1.getExterior() != surfaceBoundary2.getExterior());
    if (surfaceBoundary1.getInteriors().size() > 0) {
      assertTrue(surfaceBoundary1.getInteriors().get(0) != surfaceBoundary2.getInteriors().get(0));
    }
   
    // RepresentativePoint()
    DirectPosition dp = surfaceBoundary1.getRepresentativePoint();
    assertTrue(dp.getOrdinate(0) == 50);
View Full Code Here

Examples of org.opengis.geometry.primitive.SurfaceBoundary

    directPositionList.add(pf.createDirectPosition(new double[] {20, 10}));

    Ring exteriorRing = primf.createRingByDirectPositions(directPositionList);
    List<Ring> interiors = new ArrayList<Ring>();
   
    SurfaceBoundary surfaceBoundary1 = primf.createSurfaceBoundary(exteriorRing, interiors );
    Surface surface = primf.createSurface(surfaceBoundary1);
   
    Set<OrientableSurface> surfaces = new HashSet<OrientableSurface>();
    surfaces.add(surface);
    MultiSurface ms = agf.createMultiSurface(surfaces);
View Full Code Here

Examples of org.opengis.geometry.primitive.SurfaceBoundary

           
        } else if (object instanceof SurfaceImpl) {
         
            object_type = PaintGMObject.TYPE_LINES;

            SurfaceBoundary sb = ((SurfaceImpl) object).getBoundary();
            Ring exterior = sb.getExterior();
           
            LineList coords = new LineList();
           
            coords.addRingToCoords((RingImplUnsafe)exterior);
           
          List<Ring> interiors = sb.getInteriors();

          for (int i=0; i<interiors.size(); i++) {
                coords.addRingToCoords((RingImplUnsafe) interiors.get(i));
          }
         
          object_x = new int[coords.size()*2];
          object_y = new int[coords.size()*2];

          int z = 0;
          for (int i=0; i<coords.size(); i++) {
            object_x[z] = coords.getXFrom(i);
            object_y[z] = coords.getYFrom(i);
            z++;
            object_x[z] = coords.getXTo(i);
            object_y[z] = coords.getYTo(i);
            z++;
          }
           
        } else if (object instanceof MultiSurfaceImpl) {

            object_type = PaintGMObject.TYPE_LINES;
           
            Iterator surfaces = ((MultiSurfaceImpl)object).getElements().iterator();

            LineList coords = new LineList();
           
            while (surfaces.hasNext()) {
             
                SurfaceBoundary sb = ((SurfaceImpl)surfaces.next()).getBoundary();
                Ring exterior = sb.getExterior();
               
                coords.addRingToCoords((RingImplUnsafe) exterior);
               
              List<Ring> interiors = sb.getInteriors();

              for (int i=0; i<interiors.size(); i++) {
                    coords.addRingToCoords((RingImplUnsafe) interiors.get(i));
              }
            }
View Full Code Here

Examples of org.opengis.geometry.primitive.SurfaceBoundary

             segmentList.add( segment );
         }
         Curve curve = primitiveFactory.createCurve( segmentList );
         curves.add( curve);        
         Ring ring = primitiveFactory.createRing( curves );
         SurfaceBoundary boundary = primitiveFactory.createSurfaceBoundary(ring,new ArrayList());
         Surface surface = primitiveFactory.createSurface(boundary);        
    }
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.