On Mon, May 20, 2013 at 4:41 PM, Peng Fu <fupengh...@gmail.com> wrote:
> Thanks! I fixed the problem. > But it seems that the resultant geotiff image doesn't have coordinate > information. Do you know how to keep the coordinate information? > that's probably because it doesn't have one... it is a lat/lon file right? did you add the -a_srs EPSG:4326 argument to gdal_translate? Perhaps you mean there is no geotransform? Or perhaps the coordinate information does not adhere to the CF Conventions [2], which gdal uses. In any case calling gdalinfo on the subdataset will show which coordinate information gdal gets from the netcdf file. Send me the output of both gdalinfo and 'ncdump -h yourfile.nc' [2] http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.6/cf-conventions.html > > > Peng > > > On Mon, May 20, 2013 at 3:38 PM, Etienne Tourigny <etourigny....@gmail.com > > wrote: > >> Please look at the netcdf docs at [1] >> >> When there are various variables in a netcdf ffile, gdal treats them as >> subdatasets, you can only operate on one at a time. >> >> calling gdalinfo on the netcdf file will reveal the special names used to >> access each subdataset >> >> [1] http://www.gdal.org/frmt_netcdf.html >> >> >> On Mon, May 20, 2013 at 3:34 PM, Peng Fu <fupengh...@gmail.com> wrote: >> >>> Hi, >>> >>> I used the gdal_translate to store the netcdf data into geotiff file, >>> but it just gave me an error: >>> Input file contains subdatasets. Please, select one of them for reading. >>> >>> command: >>> gdal_translate -of GTiff -b 9 -a_srs EPSG:4326 BAND_02.nc /test.tif >>> >>> Does anyone know what is the problem? >>> >>> Thanks! >>> >>> Peng >>> >>> _______________________________________________ >>> gdal-dev mailing list >>> gdal-dev@lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/gdal-dev >>> >> >> >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev