[geotk] Convert NetCDF to GeoTIFF?
Martin Desruisseaux
martin.desruisseaux at geomatys.fr
Tue Mar 29 09:38:49 EDT 2011
Hello Jon
Le 28/03/11 12:42, Jon Blower a écrit :
> Is it possible to use Geotoolkit (or perhaps another tool) to convert a NetCDF file to a GeoTIFF?
It needs to be tested... In theory, the steps would be as below:
ImageCoverageReader reader = new ImageCoverageReader();
reader.setInput(new File("myfilename.nc"));
GridCoverage coverage = reader.read(0, null);
reader.dispose();
GridCoverageWriteParam param = new GridCoverageWriteParam();
param.setFormatName("geotiff");
ImageCoverageWriter writer = new ImageCoverageWriter();
writer.setOutput(new File("myfilename.tiff"));
writer.write(coverage, param);
writer.dispose();
Those steps delegates to the Image I/O framework for doing the actual work. So
the capability to read NetCDF and write GeoTIFF depends on the quality of those
Image I/O plugins:
*
There is a geotk-coverageio-netcdf module, but it currently can handle
only relatively simple CRS. More complex CRS thrown an "unsupported
operation" exception at reading time. Improving the NetCDF module is my
next task after releasing the final GeoAPI 3.0 and its Geotk reference
implementation.
*
There is a geotk-coverageio-geotiff module in the pending part of geotk.
It has write capability, but Johan reported some issues with it as well. I
didn't had the time yet to look at the GeoTIFF module myself. It would
need to be tested.
Probably the best alternative tool to explore would be GDAL?
Regards,
Martin
More information about the Geotoolkit
mailing list