How do I reproject a geoTIFF from polar stereographic to geographic lat/lon?
We recommend using the Geospatial Data Abstraction Library (GDAL) or a GIS to reproject geoTIFF files. Here we outline command line or python options for using GDAL, and instructions for QGIS and ArcMap to reproject a geoTIFF into geographic lat/lon projection.
GDAL in the command line
- For this you will need to have GDAL already installed. If you need to install it, then further details can be found at https://gdal.org.
- Open a terminal or command prompt and navigate to the folder where the file is that you want to convert.
Execute the following command in the command line:
gdalwarp -t_srs "+proj=longlat +datum=WGS84 +no_defs" <input.tif> <output.tif>
For example, if you wanted to reproject the file 'Greenland_vel_mosaic250_vy_v1.tif' from its native projection of polar stereographic into lat/lon and save it as 'reproj_vel_mosaic.tif':gdalwarp -t_srs "+proj=longlat +datum=WGS84 +no_defs" greenland_vel_mosaic250_vy_v1.tif reproj_vel_mosaic.tif
GDAL in python script
- For this you will need the gdal package installed in your python environment.
- The following code can be used to reproject a geoTIFF in its native projection of polar stereographic into the geographic lat/lon projection and save it as a new geoTIFF:
from osgeo import gdal
# Change the following variables to the file you want to convert (inputfile)
# and what you want to name your output file (outputfile)
inputfile = "Greenland_vel_mosaic250_vy_v1.tif"
outputfile = "output.tif"
#Do not change the following line, it will reproject the geotiff file
ds = gdal.Warp(outputfile, inputfile, dstSRS="+proj=longlat +datum=WGS84 +no_defs")
QGIS
- QGIS uses GDAL to reproject files but you use an interface instead of a command line approach. More information on QGIS and how to download it can be found at https://www.qgis.org/en/site/.
- Add the geoTIFF file as a layer. Then under the 'Raster' menu select 'Projections' and 'Warp (Reproject)'.
- In the window that opens make sure that the file you want to reproject is highlighted as the 'Input Layer'. Then under 'Target CRS' click the globe button to the right and search for '4326' (this is the EPSG code for the geographic lat/lon projection). In the last box titled 'Reprojected' if you click on the button to the right and select 'Save to File...' this will save the reprojection as new geoTIFF.
- Click 'Run' and it should produce the reprojected geoTIFF. Please note depending on the size of the file it may take a couple of minutes.
ArcMap
- In ArcMap under the 'Geoprocessing' menu, open 'ArcToolbox'. In the window that appears expand 'Data Management Tools', then expand 'Projections and Transformations', then under 'Raster' select 'Project Raster'.
- In the window that opens, use the folder button 'Input Raster' to select the file that you want to reproject. It should automatically fill in the 'Input Coordinate System' and the 'Output Raster Dataset'. If you would like to save this as a geoTIFF click the folder button next to the 'Output Raster Dataset' and select the folder you would like to save the geoTIFF in and input a new filename that includes the '.tif' extension. Finally, select the 'Output Coordinate System' by clicking the button to the right and searching for 4326 (this is the EPSG code for the geographic lat/lon projection) and select the 'WGS 1984' projection.
- Click 'OK' and it should produce the reprojected geoTIFF. Please note that depending on the size of the file it may take a couple of minutes.