[gdal-dev] problem with gdal_translate
Etienne Tourigny
etourigny.dev at gmail.com
Mon May 20 12:49:01 PDT 2013
On Mon, May 20, 2013 at 4:41 PM, Peng Fu <fupenghzau at 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.dev at 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 <fupenghzau at 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 at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130520/10b49b21/attachment.html>
More information about the gdal-dev
mailing list