1 Star 0 Fork 0

xiangbing911 / mountains

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Prominence and isolation

C++ programs for calculating the isolation and prominence from digital elevation data.

Building the code

C++11 support is required to build the code. Binaries are placed in the "debug" or "release" subdirectories.

OSX and gcc

Debug version:

make  

Release version:

RELEASE=1 make

This has been tested under Mac OS 10.15 with clang 1100.0.33.12, and Unbuntu 16.04 with gcc 5.4.

Windows

Debug version:

nmake -f makefile.win

Release version:

nmake RELEASE=1 -f makefile.win

This has been tested under Windows 10 with Microsoft Visual Studio 2017.

Running the code

Source data

Download source DEM data for the region of interest. 90-meter data is available from NASA (SRTM), or improved void-filled data is at viewfinderpanoramas. Higher resolution data for North America is available at The National Map.

Note that SRTM filenames reference the southwest corner of the tile, while NED filenames reference the northwest corner.

Isolation

isolation -- <min latitude> <max latitude> <min longitude> <max longitude>

Options:
  -i directory     Directory with terrain data
  -m min_isolation Minimum isolation threshold for output, default = 1km
  -o directory     Directory for output data
  -t num_threads   Number of threads, default = 1

This will generate one output text file per input tile, containing the isolation of peaks in that tile. The files can be merged and sorted with standard command-line utilities.

Prominence

First, generate divide trees for tiles of interest:

prominence -- <min latitude> <max latitude> <min longitude> <max longitude>

  Options:
  -i directory      Directory with terrain data
  -o directory      Directory for output data
  -f format         "SRTM", "NED13-ZIP", "NED1-ZIP" input files
  -k filename       File with KML polygon to filter input tiles
  -m min_prominence Minimum prominence threshold for output, default = 300ft
  -t num_threads    Number of threads, default = 1

This will produce divide trees with the .dvt extension, and KML files that can be viewed in Google Earth. The unpruned trees are generally too large to be merged or to load into Earth. Use the pruned versions (identified by "pruned" in their filenames).

Next, merge the resultant divide trees into a single, larger divide tree. If there are thousands of input files, it will be much faster to do this in multiple stages.

merge_divide_trees output_file_prefix input_file [...]
  Input file should have .dvt extension
  Output file prefix should have no extension

  Options:
  -f                Finalize output tree: delete all runoffs and then prune
  -m min_prominence Minimum prominence threshold for output, default = 300ft

The output is a dvt file with the merged divide tree, and a text file with prominence values. If desired, the text file can be filtered to exclude peaks outside of a polygon specified in KML, for example, to restrict the output to a single continent:

filter_points input_file polygon_file output_file
  Filters input_file, printing only lines inside the polygon in polygon_file to output_file

  Options:
  -a longitude    Add 360 to any longitudes < this value in polygon.
                  Allows polygon to cross antimeridian (negative longitude gets +360)

Results

The isolation file has one peak per line, in this format:

latitude,longitude,elevation in feet,ILP latitude,ILP longitude,isolation in km

where ILP means isolation limit point.

A zip file with our isolation results for the world is here.

The prominence file has one peak per line, in this format:

latitude,longitude,elevation in feet,key saddle latitude,key saddle longitude,prominence in feet

A zip file with our prominence results for the world is here.

Anti-prominence

The "anti-prominence" of low points can be computed by the same algorithm, simply by changing the sign of the elevation values. This can be done by giving the -a option to the "prominence" command. Then, at the final stage of merging (with the -f flag), add the -a option again to flip the elevation values back to positive.

More information

Explanations of what these calculations are about are at http://andrewkirmse.com/isolation and http://andrewkirmse.com/prominence, including nice visualizations.

This work was later published in the October, 2017 issue of the journal "Progress of Physical Geography" here. The article can be read here.

MIT License Copyright (c) 2017 Andrew Kirmse Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
C++ 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/nscg/mountains.git
git@gitee.com:nscg/mountains.git
nscg
mountains
mountains
master

搜索帮助