6

I'm trying to warp some GeoTIFF images (from NSIDC), from a polar stereographic projection, to an azimuthal equidistant projection using gdalwarp:

gdalwarp -t_srs 'EPSG:102016' \
  -te -7000000 -7000000 7000000 7000000 \
  input.tif output.tif

The result looks fine overall, except for a single horizontal row of pixels in the middle that looks "shifted" inward toward the center.

Is there any way to avoid this?

output image from gdalwarp (converted to gif)


Edit: Input image (as a gif) for reference

image credit: NISDC

3
  • can we see input.tif ? Sep 25, 2017 at 13:19
  • did you try another resampling_method than the default one ? like bilinear ressampling : gdalwarp -t_srs 'EPSG:102016' \ -te -7000000 -7000000 7000000 7000000 \ -r bilinear input.tif output.tif Sep 25, 2017 at 13:22
  • @HugoRoussaffa I did - however, I'm looking to do some more processing (color substitution) in other software, so I'd rather keep it aliased until all that's done.
    – Flambino
    Sep 25, 2017 at 13:27

1 Answer 1

8

I would suggest trying to add the -et (error threshold) option with a lower thresholds than the default.

If you try a lower -et threshold the horizontal artifact should disappear

Or try changing the re-sampling

gdalwarp -r mode

As a reference gdalwarp

1
  • 1
    Thanks! I'd overlooked the -et option. Setting it all the way to zero did the trick (I first tried a few orders of magnitude below the default, but the artefact stuck around until I just fed it zero). And yes, different resampling would likely have fixed it too, but for later image processing purposes, I prefer to keep it aliased for now
    – Flambino
    Sep 25, 2017 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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