.tif to .raw for Unity
gdal_translate –of ENVI –ot UInt16 –scale –outsize 1025 1025 ca_heightmap.tif heightmap.raw
This worked to crop a GeoTiff removing 300 pixel padding from top and left and keeping the next 2000x2000 pixels. gdal_translate -srcwin 300 300 2000 2000 input.tif output.tif
To crop and convert original dem tif to raw for conero:
gdal_translate -srcwin 0 800 4096 4096 original.tif squared.tif
gdal_translate -of ENVI -ot UInt16 squared.tif squared.raw