Hello,<br><br>I'm working with a Grib file that uses a Lambert Conformal Conic projection. This projection doesn't correspond to any registered EPSG code but all the information about the projection is in the descriptor of the grib file using the standard WMO format (<a href="http://dss.ucar.edu/docs/formats/grib/gribdoc/lcgrid.html">http://dss.ucar.edu/docs/formats/grib/gribdoc/lcgrid.html</a>).<br>
<br>I suspect that the NetCDF API is capable of processing some of this data but not all of it. (latitudeOfFirstPointInDegrees doesn't match with the one I get with NetCDF...)<br><br>To solve this issue I'm thinking in using the Geotoolkit API and creating a GeographicCRS and Conversion objects from scratch to project my file in cartesian coordinates. There are a lot of attributes in the Grib descriptor as: uvRelativeToGrid, LoVinDegrees, earthIsOblate, etc. that I somehow have to translate into parameters of this objects, but I not sure about how to do it... Does anyone has experience in doing a similar task?<br>
<br><br>Another issue I've found working with my file is the difference between the NetCDF and the GeoToolkit API when they read the extreme values of the x&y axis values. The difference is small but significant, is this normal?<br>
<br>I paste the code I've used and the output I got:<br><br>CODE NETCDF API:<br>NetcdfDataset ds = NetcdfDataset.openDataset("~/myfile.grb");<br>CoordinateAxis xAxis = ds.findCoordinateAxis("x");<br>
CoordinateAxis yAxis = ds.findCoordinateAxis("x");<br>System.out.println("BOX2D("+yAxis.getMinValue()+", "+xAxis.getMinValue()+", "+yAxis.getMaxValue()+", "+xAxis.getMaxValue()+")");<br>
<br>OUTPUT:<br>BOX2D(-704.9721645900614, -704.9721645900614, 705.0278354099386, 705.0278354099386)<br><br><br>CODE GEOTOOLS API:<br>NetcdfImageReader netcdfReader = new NetcdfImageReader(null);<br>netcdfReader.setInput("~/myfile.grb");<br>
<br>ImageCoverageReader reader = new ImageCoverageReader();<br>reader.setInput(netcdfReader);<br><br>GridCoverage2D coverage = reader.read(0, null);<br>reader.dispose();<br>netcdfReader.dispose();<br>Â Â Â Â Â Â Â Â Â <br>System.out.println(coverage.toString());<br>
<br>OUTPUT:<br>GridCoverage2D["Precipitation_rate", BOX4D(-706.2221645900614 -586.2304882997278 NaN NaN, 706.2778354099386 586.2695117002722 NaN NaN), NetcdfCRS.Compound["time height_above_ground3 y x"]]<br>
│  RenderedSampleDimension("Precipitation_rate":[])<br>│      GeophysicsCategory(“No dataâ€:[NaN(-9999…-9999)])<br>â”” Image=WritableRenderedImageAdapter[] as views [NATIVE, PACKED, RENDERED, GEOPHYSICS, PHOTOGRAPHIC]<br>
<br>Cheers!<br><br>Pablo Rozas<br>