関数read_latlonDEM_to_3d マニュアル

(The documentation of function read_latlonDEM_to_3d)

Last Update: 2025/12/22


◆機能・用途(Purpose)

緯度・経度に基づく格子点で標高が与えられた数値標高モデルを struct _3d_data型構造体に読み込む。 読み込むのは単一のファイルであり、ファイル名で指定する。
Read a digital elevation model, composed of the elevations at latitude- and longitude-based grid nodes, into a struct _3d_data-type structure. The data is read from a single file. The user specifies the file name.


◆形式(Format)

##include <3d_data/readwrite.h>
inline struct _3d_data read_latlonDEM_to_3d(const char ∗inputfile)


◆引数(Arguments)

inputfile 入力ファイル名。 GSIdem2latlonDataコマンド から出力されたファイル、またはそれと同じ書式を持つテキストファイルとする。
The name of an input file, which must be a text file that has the same format as the output files from GSIdem2latlonData command.


◆戻り値(Return value)

引数inputfileで指定したファイルから読み込んだ数値標高モデル。 2次元データ(\(N_z=1\)の3次元データ) であり以下のように与える。
A digital elevation model read from the file specified by argument inputfile. This is a 2-D data (3-D data with \(N_z=1\)) and defined as follows.


◆使用例(Example)

struct _3d_data topography=read_latlonDEM_to_3d ("/dat/DEM_GSI/5337/FG-GML-5337-27-dem10b-20250101.dat");

作成する3次元データ(変数topography)において、例えば 北緯35度30分36秒の位置は\(y=35\times 3600+30\times 60+36=127836\)、 東経137度54分7.2秒の位置は\(x=137\times 3600+54\times 60+7.2=496447.2\) となる。
The coordinates are converted to \(x\) and \(y\) in the 3-D data (variable topography) as, for example, from 35°30’36”N to \(y=35\times 3600+30\times 60+36=127836\) and from 137°54’7.2” to \(x=137\times 3600+54\times 60+7.2=496447.2\).