use of org.opengis.geometry.coordinate.Polygon in project geotoolkit by Geomatys.
the class JTSPrimitiveFactory method createSurface.
/**
* {@inheritDoc }
*/
@Override
public Surface createSurface(final SurfaceBoundary boundary) {
// For now, our implementation has to assume that the boundary is a
// polygon.
Surface result = new JTSSurface(crs);
Polygon poly = geomFact.createPolygon(boundary);
// PENDING(jdc): the following line is 1.5 specific.
// the result.getPatches() list is a generic list with a type of "? extends SurfacePatch"
// we can compile without the generic if we cast down to List, but why do we need the cast?
// Polygon extends SurfacePatch, so in theory this should work...
// ((List<SurfacePatch>) result.getPatches()).add(poly);
((List) result.getPatches()).add(poly);
return result;
}
Aggregations