/** * Writes the metadata file for this grid file. * * @param options * @return the file containing the metainfo * @throws IOException */ public File writeMetadataFile( RasterIOOptions options ) throws IOException { File metaInfo = null; if ( gridFile != null ) { metaInfo = GridMetaInfoFile.fileNameFromOptions( gridFile.getParent(), FileUtils.getFilename( gridFile ), options ); } else { throw new IOException( "No gridfile specified, could not write the info file" ); } GridMetaInfoFile.writeToFile( metaInfo, new GridMetaInfoFile( this.geoRef, this.rows, this.columns, this.tileRasterWidth, this.tileRasterHeight, this.dataInfo ), options ); return metaInfo; }