0

I have a SRTM 3 arc second topography model (.tif file). If I remove every second row and column of cells from the grid, can it be said that the model becomes a 6 arc second?

Or does SRTM 3 arc second model needs some kind of interpolation of its grid in order to get the 6 arc second model? If it does need, can anyone provide GDAL string example of how this can be done?

marco
  • 1,137
  • 2
  • 14
  • 27
  • No, you have to resample it to new cell size – FelixIP Mar 08 '16 at 22:12
  • 1
    @FelixIP Removing every other row and column is resampling (it's an instance of the nearest-neighbor algorithm). – whuber Mar 08 '16 at 23:05
  • Thank you for the replies both FelixIP and whuber. @whuber: So can a 3 arc second model be considered to be a 6 arc second model if every other row and column is removed? – marco Mar 08 '16 at 23:17
  • 1
    Of course--the spacing is now twice 3 arc-seconds, right? For many purposes this approach (nearest-neighbor resampling) isn't a great choice, though. You might consider availing yourself of other resampling options. Cubic convolution is attractive in this setting. – whuber Mar 11 '16 at 16:08
  • 1
    Thank you @whuber. I took a look at both the linked topic and your article at quantdec.com. Yes, the spacing is twice 3 arc-seconds, and it has about 4 times less cells than 3 arc-seconds. So "manual" (sort to say) interpolation in this way (removing every second row and column of cells from the grid) can basically produce a 6 arc-seconds DEM from 3 arc-seconds DEM? This is what I want to know. Regardless if this approach is more appropriate/precise than using some other resampling methods (like cubic convolution). – marco Mar 11 '16 at 17:45

1 Answers1

1

What you want means doubling the pixel size by using nearest neighbor resampling. The shortest GDAL command for doing that is

gdal_translate -outsize 50% 0 input.tif output.tif

Read the manual http://www.gdal.org/gdal_translate.html because otherwise you can't know what -outsize 50% 0 does nor that -r is not needed because nearest is the default resampling algorithm.

user30184
  • 65,331
  • 4
  • 65
  • 118
  • Thank you for the help @user30184 . I am aware of the gdal_translate page. Sometimes I feel like both gdal_translate and gdalwarp pages have been deliberately written to repel any gdal beginner users. That's how they have been written.

    Would you mind if I ask you whether or not the Gdal resampling you presented is the same as removing every second row and column of cells from the grid?

    – marco Mar 10 '16 at 14:55