Package org.opengis.geometry.primitive

Examples of org.opengis.geometry.primitive.SurfaceBoundary


             segmentList.add( segment );
         }
         Curve curve = builder.createCurve( segmentList );
         curves.add( curve);        
         Ring ring = builder.createRing( curves );
         SurfaceBoundary boundary = builder.createSurfaceBoundary(ring );
         Surface surface = builder.createSurface(boundary);        
    }
View Full Code Here


                0.0, 0.5,
                0.5, 0.5,
                0.5, 0.0,
                0.0, 0.0};
        PointArray closedPoints = builder.createPointArray( closed );
        SurfaceBoundary closedBoundary = builder.createSurfaceBoundary( closedPoints );
        Surface closedSurface = builder.createSurface( closedBoundary );
       
        // this example is not closed and would fail
        // if we were not calling createSurfaceBoundary
        double open[] = new double[]{
                0.0, 0.0,
                0.0, 0.5,
                0.5, 0.5,
                0.5, 0.0,};                     
        PointArray openPoints = builder.createPointArray( open );
        SurfaceBoundary openBoundary = builder.createSurfaceBoundary( openPoints );
        Surface openSurface = builder.createSurface( openBoundary );
       
        assertEquals( "close array", openSurface, closedSurface );               
    }
View Full Code Here

                0.0, 0.0,
                0.0, 0.5,
                0.5, 0.5,
                0.5, 0.0,};                     
        PointArray openPoints = builder.createPointArray( open );
        SurfaceBoundary openBoundary = builder.createSurfaceBoundary( openPoints );
        Surface openSurface = builder.createSurface( openBoundary );
       
        assertEquals( "close array", openSurface, closedSurface );
       
        Surface surface = transmit(closedSurface);
View Full Code Here

       
        List<OrientableCurve> curves = new ArrayList<OrientableCurve>();       
        curves.add(curve);
       
        Ring ring = primitiveFactory.createRing(curves);
        SurfaceBoundary surfaceBoundary = primitiveFactory.createSurfaceBoundary( ring, Collections.EMPTY_LIST );      
        return primitiveFactory.createSurface(surfaceBoundary);
    }
View Full Code Here

   
    PrimitiveImpl impl = factory.createPrimitive(bounds);
    assertNotNull(impl);
   
    // test equals
    SurfaceBoundary boundary = new SurfaceBoundaryImpl( crs, expectedRing, Collections.EMPTY_LIST );
    SurfaceImpl expected = new SurfaceImpl( boundary );
    assertEquals(expected.getBoundary(), impl.getBoundary());
    assertTrue(expected.equals(impl));
   
    // test get/add ContainedPrimitives
View Full Code Here

                -123.45463828850829,48.54973520267305,
                -123.4550070827961,48.54290089070186,
                -123.47009555832284,48.543261561072285
        };
        PointArray points = builder.createPointArray(array);
        SurfaceBoundary boundary = builder.createSurfaceBoundary(points);
        Surface surface = builder.createSurface(boundary);
        assertNotNull( surface );
       
        Surface surface2 = (Surface) surface.transform( wsg2, t );
        assertNotNull( surface2 );
View Full Code Here

    curveList.add(curve1);
   
    // Build Ring then SurfaceBoundary then Surface
    RingImpl exteriors = (RingImpl) primitiveFactory.createRing(curveList);
    List<Ring> interiors = new ArrayList<Ring>();
    SurfaceBoundary sboundary = primitiveFactory.createSurfaceBoundary(exteriors, interiors);
    Surface surface1 = primitiveFactory.createSurface(sboundary);
    Surface surface2 = (SurfaceImpl) surface1.transform(crs2);
   
    // create expected result
    PositionFactory expectedPosF2 = new PositionFactoryImpl(crs2, new PrecisionModel());
    PrimitiveFactory expectedPrimF2 = new PrimitiveFactoryImpl(crs2, expectedPosF2);
    GeometryFactory ExpectedGeomF2 = new GeometryFactoryImpl(crs2, expectedPosF2);
   
    List<Position> expectedPoints = new ArrayList<Position>();
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1187128.000000001, 395268.0000000004} ));
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1187127.9999999998, 396026.99999999825} ));
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1188245.0000000007, 396027.0000000039} ));
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1188245.0000000005, 395268.0000000018} ));
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1187128.000000001, 395268.0000000004} ));
        LineString expectedLineString = ExpectedGeomF2.createLineString(expectedPoints);
        List expectedCurveSegmentList = Collections.singletonList(expectedLineString);
       
        CurveImpl expectedCurve = (CurveImpl) expectedPrimF2.createCurve(expectedCurveSegmentList);
       
    /* Build Ring from Curve */
    ArrayList<OrientableCurve> expectedCurveList = new ArrayList<OrientableCurve>();
    expectedCurveList.add(expectedCurve);
   
    // Build Ring then SurfaceBoundary then Surface
    RingImpl exteriors2 = (RingImpl) expectedPrimF2.createRing(expectedCurveList);
    List<Ring> interiors2 = new ArrayList<Ring>();
    SurfaceBoundary sboundary2 = expectedPrimF2.createSurfaceBoundary(exteriors2, interiors2);
    Surface expectedSurface = expectedPrimF2.createSurface(sboundary2);
       
    //System.out.println(surface1);
    //System.out.println(surface2);
    //System.out.println(expectedSurface);
View Full Code Here

            Ring hole = primitiveFactory.createRing(holeList);
            //Ring hole = readLinearRingText(tokenizer);
            holes.add(hole);
            nextToken = getNextCloserOrComma(tokenizer);
        }
        SurfaceBoundary sb = primitiveFactory.createSurfaceBoundary(shell, holes);
        return primitiveFactory.createSurface(sb);
    }
View Full Code Here

   * @see org.geotools.geometry.featgeom.root.GeometryImpl#clone()
   */
  public SurfaceImpl clone() throws CloneNotSupportedException {
    // Test OK
    // Clone SurfaceBoundary and use it to create new Surface
    SurfaceBoundary newBoundary = (SurfaceBoundary) this.boundary.clone();
    return new SurfaceImpl(newBoundary);
  }
View Full Code Here

            for (int i=0; i<n; i++) {
                internalRings.add(linearRingToRing(
                    (com.vividsolutions.jts.geom.LinearRing) jtsPolygon.getInteriorRingN(i),
                    crs));
            }
            SurfaceBoundary boundary = pf.createSurfaceBoundary(externalRing,
                    internalRings);
            Polygon polygon = gf.createPolygon(boundary);
            ArrayList patches = new ArrayList();
            patches.add(polygon);
            PolyhedralSurface result = gf.createPolyhedralSurface(patches);
View Full Code Here

TOP

Related Classes of org.opengis.geometry.primitive.SurfaceBoundary

Copyright © 2018 www.massapicom. 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.