Convert vertical grid shift file from .agr to .gtx

In the qfield docs is written that an .agr file can be converted with qgis to a .gtx file for the vertical grid shift used in qfield.
Does anybody know how to do that?

See this link and the relevant text copied from there.
Positioning (GNSS) - QField Ecosystem Documentation
“To obtain precise altitude data for Cadastral Surveying in Switzerland, users can access the file correction of the vertical grid shift through Geoid OGD from Swisstopo. Following the download, users are advised to perform a conversion of the file labeled chgeo04_htrans_lv95.agr to chgeo04_htrans_lv95.gtx. The QGIS processing algorithm gdal:translate (convert format) can be used for that.”

HI @bladnor thanks for your question.
You can use the translate process algorithm directly in QGIS available via the processing toolbox or you can write it directly in the console the exact description you can also find here:

I hope that helps?

PS: We will add an example to the documentation. Thank you for pointing out that it is missing.

Hi @beanzmo
Thanks. No, pointing to the documentation did not help. I do RTFM before asking questions. The example of how to set the parameters for the command you are going to add to the docs will most probably help.
Anyway, meanwhile I was asking Emlid support from where they have the grid shift file they use in their app. The answer was: PROJ-data/ch_swisstopo at master · OSGeo/PROJ-data · GitHub . There is a tif formated version of the file, and tif is supported by QFiled. The one I use now is the ch_swisstopo_chgeo2004_ETRS89_LN02.tif . I have tested it, and it works with QField. You might want to add this link to your documentation.

Thanks and best regards Roland

PS: Once we know how to transform the .agr file to a .gtx file I would like to do a comparison between the files

Thanks for the feedback Roland. We’ll add it soon !! And I’m glad you could solve it yourself. You could also user the console in QGIS to achieve the same thing.

Best regards,

Berit