4

I am attempting to warp a GTiff from a lat/lon projection to a higher (~2x) resolution Polar Stereographic grid.

In the output GTiff any cells north of 64 deg lat become NaN instead of their actual values.

I am using gdalwarp thusly:

  gdalwarp -t_srs 'wkt string here' -tr 5000 5000 -te -4252339.5,-5302590.0,4597660.5,2747410.25 in.tif out.tif

What could be causing the output raster to have the blank area?

Input extents are [-84.84, -50.19, 55.07, 79.96]. [minLon,maxLon,minLat,maxLat]

Output Coordinate system:

proj4 (+proj=stere +lat_0=90 +lat_ts=60 +lon_0=-100 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs) .

It's standard Polar Stereographic but with Central Meridian at -100 deg and latitude of origin at 60 deg.


The issue was caused by the large difference in coordinate systems. (The domain was self-intersecting in one of the coord systems). It was largely solved by explicitly entering the output extent instead of having GDAL attempt to guess it.

i.e -te -180 0 180 90 was added to the gdalwarp line.

  • 1
    Can you add the extents of the input geotiff? – mkennedy Feb 12 '15 at 22:02
  • 1
    And the target CRS? Is there a WKID (versus posting the WKT)? I'd like to try to reproduce the conversion in other software. – mkennedy Feb 12 '15 at 22:20
  • Input extents are [-84.84, -50.19, 55.07, 79.96] – JFerg Feb 13 '15 at 20:49
4

It works for me with a two-step-transformation:

gdalwarp -overwrite -t_srs "+proj=stere +lat_0=90 +lat_ts=60 +lon_0=-100 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" -of GTiff D:\Download\NEU\ster-wgs84.tif D:/Download/NEU/ster-100-transformed.tif
gdalwarp -overwrite -wo SAMPLE_STEPS=1000 -t_srs "+proj=stere +lat_0=90 +lat_ts=60 +lon_0=-100 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" -tr 5000 5000 -te -4252339.5 -5302590.0 4597660.5 2747410.25 ster-100-transformed.tif out.tif

A reason might be that your target extent crosses the 180° line, making the extent a self-intersecting polygon in the source srs WGS84:

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.