Coder Social home page Coder Social logo

akirmse / mountains Goto Github PK

View Code? Open in Web Editor NEW
28.0 4.0 5.0 497 KB

Code to compute the prominence and isolation of mountains from digital elevation data

License: MIT License

Makefile 0.55% C++ 90.98% C 3.27% Python 5.21%
prominence isolation mountains topography

mountains's People

Contributors

akirmse avatar anbj avatar nico534 avatar oargudo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mountains's Issues

run_lidar_prominence.py input_file error

I am having an issue with the run_lidar_prominence.py file. Whenever I try to run it, I get the error "Input filespec input_files matched no files; exiting." The thing is, the input file clearly does, in fact, exist at the path I specified.

Here's the command I'm using:
"python /Users//Downloads/mountains/scripts/run_lidar_prominence.py --input_units meters --output_units meters --output_dir /Users//Downloads/prom_output --min_prominence 30 input_files /Users//Downloads/DEM_tiles/USGS_OPR_WA_NorthCentral_2021_B21_11UQQ200180.tif"

I got the lidar file from:
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/OPR/Projects/WA_NorthCentral_2021_B21/WA_NorthCentral_3_2021/TIFF/USGS_OPR_WA_NorthCentral_2021_B21_11UQQ200180.tif

I have had success with running the run_3dep_prominence.py file so presumably everything was built fine, and my system meets the other requirements listed in the README as well. It's possible that I'm just being an idiot, but this does not seem like expected behavior.

Thanks for your work on this project!

Inconsistent usage of Intermediate-Directory in Python Scripts

The usage of the intermediate_dir Args Parameter in the run_glo_prominence.py-Script is inconsistent and should be modified like this in order to pick up right (modified) variable:

prom_command = f"{args.prominence_command} --v=1 -f {args.format}" + \ f" -i {**intermediate_dir**} -o {args.output_dir}" + \ f" -t {args.threads} -m {args.min_prominence}"

Compilation issue

Hi Andrew,

I'm getting compilation errors due to missing ceil and floor. My gcc 9.2.0 is quite new; maybe it is wrongly compiling the sources as C++14?

isolation.cpp: In function 'int main(int, char**)':
isolation.cpp:145:24: error: 'floor' was not declared in this scope
  145 |   for (int lat = (int) floor(bounds[0]); lat < (int) ceil(bounds[1]); ++lat) {
      |                        ^~~~~
isolation.cpp:145:54: error: 'ceil' was not declared in this scope; did you mean 'el'?
  145 |   for (int lat = (int) floor(bounds[0]); lat < (int) ceil(bounds[1]); ++lat) {
      |                                                      ^~~~
      |                                                      el

prominence.cpp: In function 'int main(int, char**)':
prominence.cpp:181:18: error: 'floor' was not declared in this scope
  181 |   for (int lat = floor(bounds[0]); lat < ceil(bounds[1]); ++lat) {
      |                  ^~~~~
prominence.cpp:181:42: error: 'ceil' was not declared in this scope; did you mean 'el'?
  181 |   for (int lat = floor(bounds[0]); lat < ceil(bounds[1]); ++lat) {
      |                                          ^~~~
      |                                          el

Ability to read single terrain file with arbitrary regional extent?

Hi,

This interests me a lot.
Hope it's OK that I ask some questions.

  • I was wondering if is it possible to read a single terrain file with arbitraty regional extent? How hardwired are the grid arrangements in the code?
  • The GMT software serves a lot of tiles with different resolution covering the whole planet. See e.g. here for the tiles for a 2 degree topoography grid covering the Earth. Would it be much effort to support this? This goes back to the question above; how hardwired are the grid schemes to the program(s).

Pardon my lack of knowledge of C++, and the programs. Ideally I should be able to find this out on my own.

Best,
Andreas

merge_divide_trees: features in KML and TXT output

The contents of merged.txt is identical, but the contents of merged-divide_tree.kml differs when running merge_divide_trees with or without -f. Is this expected? Note I'm only checking Peaks in the KML-file.

$ merge_divide_trees merged prominence-72x00-002x00-divide_tree_pruned_0.dvt
$ ogrinfo -so merged-divide_tree.kml Peaks
INFO: Open of `merged-divide_tree.kml'
      using driver `LIBKML' successful.

Layer name: Peaks
Geometry: Unknown (any)
Feature Count: 145       <--------------
[...]

$ wc merged.txt 
  66   66 3036 merged.txt

Now lets run again with -f:

$ merge_divide_trees -f merged prominence-72x00-002x00-divide_tree_pruned_0.dvt
$ ogrinfo -so merged-divide_tree.kml Peaks
INFO: Open of `merged-divide_tree.kml'
      using driver `LIBKML' successful.

Layer name: Peaks
Geometry: Unknown (any)
Feature Count: 70       <--------------
[...]
$ wc merged.txt 
  66   66 3036 merged.txt

Custom DTM data

Hello,

Is it possible to use custom DTM geotiff file? Should it be in a specific projection? Or can I convert it to something that your app will understand? And can this program detect if it requires data outside provided region to compute the prominence?

Thank you.

Add support for SRTM 1''

As far as I can tell, prominence et al. only support the 3'' resolution (90 m) dataset of SRTM.

Would it be possible to support the 1'' resolution as well?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.