public static String toGML(Geometry geom) {
        if (geom == null) {
            return null;
        }
        int srid = geom.getSRID();
        GMLWriter gmlw = new GMLWriter();
        if (srid != -1 || srid != 0) {
            gmlw.setSrsName("EPSG:" + geom.getSRID());
        }
        return gmlw.write(geom);
    }
public static String toGML ( Geometry geom ) { if ( geom == null ) { return null ; } int srid = geom . getSRID ( ) ; GMLWriter gmlw = new GMLWriter ( ) ; if ( srid != - 1 || srid != 0 ) { gmlw . setSrsName ( "EPSG:" + geom . getSRID ( ) ) ; } return gmlw . write ( geom ) ; }
Write the GML
@param geom
@return