Terrains using Three.js and SRTM Data

Let’s jump right in to three.js plane buffer geometry. Three.js offers a buffer geometry object which is a simple array of height maps, much like our binary file we used from the SRTM data. Compared to the normally used plane geometry, buffer geometry uses much less overhead and is significantly faster if the object does not need to be modified once initialised. To make things simple, I will assume that the terrain we need to generate is contained only within one binary hgt file, i.e., the terrain is within one latitude and longitude cell (this means that the bounding box of the terrain will be within one integer long and wide: N58.79 - N58.92, E006.22 - E006.33 is within one integer wide and long while N58.79 - N59.12, E006.22 - E007.13 will require more than one hgt file to process and will be needlessly complicated for this example).