RESOLUTION NOTE :
The issue revolved around both the binary format output from GDAL and the data order. Notably, the origin of the conversion didn't align with the lower-left corner of the raster. GDAL lacks a built-in option for determining the desired endianness.
Furthermore, it's vital to explicitly specify the Int16 binary format, which isn't mentioned in the commonly suggested commands like:
Which can be done this way :
These commands fall short of addressing the problem, which is why I've provided tools at the end of this thread to overcome the encountered issues.
Hello,
I tried to implement a new high resolution topography within WPS/geogrid following the tutorial here, but I can't find the reason why it didn't work. I followed the protocol from this post using the "convert_geotiff" tool, and I obtained the desired binary and index files (see attached). I edited GEOGRID.TBL and WPS namelist.input accordingly.
Nevertheless, the whole HGT_M field in selected domains are filled with zeroes. The geogrid.log indicates at some points (see attached) :
I also attached the .tiff file I used.
Also, I checked for the binary files with a small Python script plotting elevation data. It gives fine results ; so the binary file seems OK (see Python script and screenshot attached).
Then I also tried the method exposed in this post. The GDAL tool gives the same binary file as the previous method (compared with the .py script I wrote).
Being new to some programming languages, I didn't yet succeed to use the provided WPS/geogrid tool write_geogrid.c. It seems I have to compile the script first.
Anyway, any help is welcome concerning the warning message from geogrid.log as the problem doesn't seem to come from the binary file.
Thank you
The issue revolved around both the binary format output from GDAL and the data order. Notably, the origin of the conversion didn't align with the lower-left corner of the raster. GDAL lacks a built-in option for determining the desired endianness.
Furthermore, it's vital to explicitly specify the Int16 binary format, which isn't mentioned in the commonly suggested commands like:
Code:
gdal_translate -of ENVI in.tif out.bin
Which can be done this way :
Code:
gdal_translate -ot Int16 -of ENVI in.tif out.bin
These commands fall short of addressing the problem, which is why I've provided tools at the end of this thread to overcome the encountered issues.
Hello,
I tried to implement a new high resolution topography within WPS/geogrid following the tutorial here, but I can't find the reason why it didn't work. I followed the protocol from this post using the "convert_geotiff" tool, and I obtained the desired binary and index files (see attached). I edited GEOGRID.TBL and WPS namelist.input accordingly.
Nevertheless, the whole HGT_M field in selected domains are filled with zeroes. The geogrid.log indicates at some points (see attached) :
Code:
Processing HGT_M
WARNING: In GEOGRID.TBL, no specification for truelat1 in entry 1.
WARNING: In GEOGRID.TBL, no specification for truelat2 in entry 1.
WARNING: In GEOGRID.TBL, no specification for stdlon in entry 1.
I also attached the .tiff file I used.
Also, I checked for the binary files with a small Python script plotting elevation data. It gives fine results ; so the binary file seems OK (see Python script and screenshot attached).
Then I also tried the method exposed in this post. The GDAL tool gives the same binary file as the previous method (compared with the .py script I wrote).
Being new to some programming languages, I didn't yet succeed to use the provided WPS/geogrid tool write_geogrid.c. It seems I have to compile the script first.
Anyway, any help is welcome concerning the warning message from geogrid.log as the problem doesn't seem to come from the binary file.
Thank you
Attachments
Last edited: