public Surface createSurface(List surfaces) throws MismatchedReferenceSystemException, MismatchedDimensionException { return getPrimitiveFactory().createSurface(surfaces); }
return primitiveFactory.createSurface(sb);
public Geometry transform(CoordinateReferenceSystem newCRS, MathTransform transform) throws TransformException { // loop through each ring in this Surface and transform it to the new CRS, then // use the new rings to build a new Surface and return that. PrimitiveFactory primitiveFactory = new PrimitiveFactoryImpl(newCRS, getPositionFactory()); List<Ring> currentRings = this.getBoundaryRings(); Iterator<Ring> iter = currentRings.iterator(); Ring newExterior = null; List<Ring> newInteriors = new ArrayList<Ring>(); while (iter.hasNext()) { Ring thisRing = (Ring) iter.next(); // exterior Ring should be first element in the list if (newExterior == null) { newExterior = (Ring) thisRing.transform(newCRS, transform ); } else { newInteriors.add((Ring) thisRing.transform(newCRS, transform)); } } // use the new Ring list to build a new Surface and return it SurfaceBoundaryImpl surfaceBoundary = (SurfaceBoundaryImpl) primitiveFactory.createSurfaceBoundary(newExterior, newInteriors); SurfaceImpl newSurface = (SurfaceImpl) primitiveFactory.createSurface(surfaceBoundary); return newSurface; }
public Surface createSurface(SurfaceBoundary boundary) throws MismatchedReferenceSystemException, MismatchedDimensionException { return getPrimitiveFactory().createSurface(boundary); }
return primitiveFactory.createSurface(sb);
/** * Creates a simple polygon with no holes * @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 = PRIMITIVE_FACTORY.createSurface(surfaceBoundary); return surface; }
return primitiveFactory.createSurface(sb);