[gdal-dev] Export a geotiff to netcdf in lat lon coordinates

Jeff McKenna jmckenna at gatewaygeomatics.com
Fri Nov 22 10:19:26 PST 2019


Hi Tony,

Here are my steps.

Have a nice weekend.


***********

#use gdalinfo to get summary (see https://gdal.org/programs/gdalinfo.html)
gdalinfo -noct N_197901_concentration_v3.0.tif

#review source EPSG projection (found from gdalinfo command above)
in web browser goto: http://epsg.io/3411

#review desired output projection (lat/long)
in web browser goto: http://epsg.io/4326

#transform to NetCDF
gdal_translate -f netCDF N_197901_concentration_v3.0.tif 
N_197901_concentration_v3.0.nc

#reproject to lat/long, which is EPSG:4326 
(https://gdal.org/programs/gdalwarp.html)
gdalwarp -s_srs EPSG:3411 -t_srs EPSG:4326 
N_197901_concentration_v3.0.nc N_197901_concentration_v3.0_4326.nc

#examine reprojected file (verify "corner coordinates" look proper)
gdalinfo -noct N_197901_concentration_v3.0_4326.nc

   * for all commands I used MS4W 4.0.1, on Windows, from https://ms4w.com

******


-- 
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/



On 2019-11-22 1:24 PM, Tony L. wrote:
> Hello
> I'm quite new with gdal and would like to use is to rewrite a geotiff of 
> NSIDC sea ice concentration from geotiff in polar stereographic 
> projection into a netcdf in Lon Lat coordinates
> 
> The file is located here: N_197901_concentration_v3.0.tif 
> <https://www.dropbox.com/s/bkqt6qgyhpr7vjk/N_197901_concentration_v3.0.tif?dl=0>
> 
> 	
> 
> 	
> 
> 
>     N_197901_concentration_v3.0.tif
> 
> Shared with Dropbox
> 
> <https://www.dropbox.com/s/bkqt6qgyhpr7vjk/N_197901_concentration_v3.0.tif?dl=0>
> 
> I was able to transform the file into a netcdf file using gdal_translate:
> 
> gdal_translate -of netCDF N_197901_concentration_v3.0.tif out.nc
> 
> But I'm still trying to figure out how to translate this into Lon Lat 
> coordinates (probably using gdalwarp)
> 
> Any help would be really appreciated!
> 
> Tony
> 


More information about the gdal-dev mailing list