@Override public SurfaceType getSurfaceType() { return getReferencedObject().getSurfaceType(); }
private static Geometry fixOrientation( Surface geom, ICRS defaultCrs ) { if ( geom.getSurfaceType() == Polygon ) { return fixOrientation( (Polygon) geom, defaultCrs ); } throw new UnsupportedOperationException(); }
@Override public void exportSurface( Surface surface ) throws XMLStreamException, TransformationException, UnknownCRSException { switch ( surface.getSurfaceType() ) { case Polygon: { exportPolygon( (Polygon) surface ); break; } default: { // try to export generic Surface as gml:Polygon startGeometry( "Polygon", surface ); writer.writeStartElement( "gml", "outerBoundaryIs", GML21NS ); writer.writeStartElement( "gml", "LinearRing", GML21NS ); exportCoordinates( surface.getExteriorRingCoordinates() ); writer.writeEndElement(); // </gml:LinearRing> writer.writeEndElement(); // </gml:outerBoundaryIs> List<Points> rings = surface.getInteriorRingsCoordinates(); if ( rings != null ) { for ( Points ring : rings ) { writer.writeStartElement( "gml", "innerBoundaryIs", GML21NS ); exportCoordinates( ring ); writer.writeEndElement(); // </gml:innerBoundaryIs> } } writer.writeEndElement(); // </gml:Polygon> } } }
public <T extends Surface> T linearize( T surface, LinearizationCriterion crit ) { T linearizedSurface = null; switch ( surface.getSurfaceType() ) { case Polygon: { Polygon polygon = (Polygon) surface; LOG.warn( "The surface type " + surface.getSurfaceType() + " currently cannot be linearized. It's being returned as it is." ); linearizedSurface = surface;
throws XMLStreamException, UnknownCRSException, TransformationException { switch ( surface.getSurfaceType() ) { case CompositeSurface: { exportCompositeSurface( (CompositeSurface) surface );
switch ( geometry.getSurfaceType() ) { case Polygon: {
throws IOException { switch ( geometry.getSurfaceType() ) {
private void traverseSurface( Surface s ) { SurfaceType st = s.getSurfaceType(); switch ( st ) { case CompositeSurface:
throws TransformationException { Surface result = null; SurfaceType surfaceType = surface.getSurfaceType(); String id = surface.getId(); ICRS nCRS = getTargetCRS();