I have some GeoTIFF files that contain elevation data. I have an area defined by latitude and longitude, and I would like to extract the elevation as a heightmap from the GeoTIFF files to use in Unity. Unity requires the heightmap to be both square and the dimensions to be 2^n + 1
. The terrain is represented in Unity as a literal square mesh in x[0-2159.9], z[0-2159.9] with elevation in y dimension.
I've been able to import my files into QGIS 3.6 without any trouble and they all line up as expected (NOAA source and SRTM). I've even been able to use gdal_translate to convert to a raw heightmap (ENVI). What I'm struggling with is how to define a square region in QGIS (I can't even figure out how to add a layer that will let me add arbitrary shapes, let alone how to figure the dimensions of that shape). I can't just do delta latitude = delta longitude
because that's really a parallelogram, or at least I assume it is.
UPDATE: to simplify things, I have updated the region of interest to be a square, and the lat/long is now:
- NE: -82.67761,28.00410
- SW: -82.69958,27.98470
Ultimately, what I'm trying to do is create a terrain in Unity that matches up exactly to the transformations that Mapbox does (the source of my coordinates is the the coordinates of the Mapbox tiles) so that I can map points of interest from Mapbox onto my terrain in the correct locations.