咨询glo_30数字高程模型(DEM)及下载后数据的高程单位
问题背景
我正尝试参考相关思路,学习如何在Python中为地图创建等高线。我使用dem-stitcher编写了以下代码,用于下载指定边界框内的DEM数据:
bounds = bounding_box_naive(coordinates) print(bounds) flattened_bounds = [coord for point in bounds for coord in point] print(flattened_bounds) X, p = stitch_dem(flattened_bounds, dem_name=dem_name, dst_ellipsoidal_height=dst_ellipsoidal_height, dst_area_or_point=dst_area_or_point)
随后我通过以下代码将数据可视化并写入文件:
fig, ax = plt.subplots(figsize=(8, 8)) ax = plot.show(X, transform=p['transform'], ax=ax) ax.set_xlabel('Longitude', size=15) ax.set_ylabel('Latitude', size=15)
height_type = 'ellipsoidal' if dst_ellipsoidal_height else 'geoid' with rasterio.open(out_directory / f'{dem_name}_{height_type}_{dst_area_or_point}.tif', 'w', **p) as ds: ds.write(X, 1) ds.update_tags(AREA_OR_POINT=dst_area_or_point)
最终得到如下格式的DataFrame数据:
longitude latitude elevation 1 -88.432778 31.661389 72.399994 2 -88.432500 31.661389 74.471750 3 -88.432222 31.661389 76.551100 4 -88.431944 31.661389 76.705060 5 -88.431667 31.661389 77.992940 .. ... ... ... 212 -88.431944 31.654167 79.082660 213 -88.431667 31.654167 79.882225 214 -88.431389 31.654167 78.264725 215 -88.431111 31.654167 79.834656 216 -88.430833 31.654167 79.141390 [216 rows x 3 columns]
我能理解longitude(经度)和latitude(纬度)的含义,但想知道这里的elevation(高程)单位是什么?同时也想了解glo_30数字高程图数据的高程单位。
解答
你得到的DataFrame中的elevation字段,以及glo_30数字高程模型(DEM)的高程单位都是米(meters)。
补充说明:
- 当设置
dst_ellipsoidal_height=True时,得到的是大地高(相对于参考椭球体的高度);设置为False时,得到的是正高(相对于大地水准面的海拔高度),但无论哪种类型,单位均为米。 - dem-stitcher处理的绝大多数公开DEM数据源(包括glo_30),输出高程值的默认单位都是米,这也是DEM数据的通用标准单位。
内容的提问来源于stack exchange,提问作者user1592380
相关产品推荐
相关产品推荐

