1

From this link here - http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap3.htm#_Writing_Static_Data I wrote code in java to transform SRTM3 data into WRF geogrid data. I read the SRTM3 file data and rewrote it south to north as a 2-dimensional array of unsigned integers. However this part of the data transformation that requires me to rename 5835 .hgt files for Eurasia obtained from here - http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/ is not clear.

I need to extract xstart and xend as well as ystart and yend. While code samples are not required I am more interested in understanding what those variables refer to and how they can be extracted from the .hgt files. Please let me know if my question requires more clarity or needs to be reframed.

2

Reading over the document you linked to, I found this description:

"...where xstart, xend, ystart, and yend are five-digit positive integers specifying, respectively, the starting x-index of the array contained in the file, the ending x-index of the array, the starting y-index of the array, and the ending y-index of the array; here, indexing begins at 1, rather than 0. So, for example, an 800 ´ 1200 array (i.e., 800 rows and 1200 columns) might be named 00001-01200.00001-00800."

So, I think that the xstart, xend, ystart, and yend are simply the base-1 column and row numbers of the grid edges. They have the somewhat unusual format of requiring 5 digits, so if the number is small, there are 0's appended to the front until the number has exactly five characters, e.g. 00001 or 01200. I hope that helps.

  • Thanks for the description. Do SRTM3 data files have "halo" regions ? That is to say extra rows/columns around the 1 deg x 1 deg 3 arc second elevation data files. If no halo is present matrix size would be 1201x1201. With a 3 point halo on each side the size becomes 1207 x 1207. Comments ? – gansub Sep 30 '14 at 15:45
  • @user311554 Yes, in their raw .hgt format, they have one extra row and column which overlaps with the neighbouring tiles to the north and east. – WhiteboxDev Sep 30 '14 at 15:46
  • @user311554 Sorry, I'm not sure. – WhiteboxDev Sep 30 '14 at 15:59
  • Another question. The extra row and column or "halo" data needs to be removed before using SRTM3 data for any usage right ? – gansub Sep 30 '14 at 16:03
  • @user311554 I suppose that depends on what your application is. The extra row/col is exactly replicated in the neighbouring tile so it allows for perfect mosaicking of SRTM tiles. I don't generally remove it when I use these data. – WhiteboxDev Sep 30 '14 at 16:16

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.