@Override
public void exportSurface( Surface surface )
throws XMLStreamException, TransformationException, UnknownCRSException {
switch ( surface.getSurfaceType() ) {
case Polygon: {
exportPolygon( (Polygon) surface );
break;
}
default: {
startGeometry( "Polygon", surface );
writer.writeStartElement( "gml", "outerBoundaryIs", GML21NS );
writer.writeStartElement( "gml", "LinearRing", GML21NS );
exportCoordinates( surface.getExteriorRingCoordinates() );
writer.writeEndElement();
writer.writeEndElement();
List<Points> rings = surface.getInteriorRingsCoordinates();
if ( rings != null ) {
for ( Points ring : rings ) {
writer.writeStartElement( "gml", "innerBoundaryIs", GML21NS );
exportCoordinates( ring );
writer.writeEndElement();
}
}
writer.writeEndElement();
}
}
}