Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute heights in PNG #4

Open
malte-v opened this issue Oct 24, 2018 · 7 comments
Open

Absolute heights in PNG #4

malte-v opened this issue Oct 24, 2018 · 7 comments
Assignees

Comments

@malte-v
Copy link

malte-v commented Oct 24, 2018

As you already pointed out, this program maps the color #000000 to the lowest point of the HGT file and #FFFFFF to the highest point. This is certainly useful, but if you want to combine multiple HGT images with different height ranges, this feature becomes a problem.
So, could you add a command-line argument that allows you to specify whether you want the PNG to use colors depending on the height range of the HGT file (grayscale) or to use globally defined colors which are identical between the converted files? For example, the color value #7F7F7F (medium gray) could be 0 meters above sea level, so would #7F7F80 be 1 meter above sea level and so on. When using non-grayscale colors, every height from the Mariana Trench to the summit of Mount Everest should be covered.
Since I have no clue about C++ and was hardly able to build this program, I can't implement it myself. Thank you for your help!

@garrettsickles garrettsickles self-assigned this Oct 24, 2018
@garrettsickles
Copy link
Owner

garrettsickles commented Oct 24, 2018

I will take a look at this! It shouldn't be too difficult. I will also improve build instructions while I am at it.

@raydoucetjr
Copy link

Hello gentlemen, I was wondering if the above suggestion about using an alternative outside range of greyscale levels was something that could be implemented into this system, and if so, how is that attempt coming along? I would also be interested in knowing if this could be used with http://dwtkns.com/srtm30m/ or possibly http://dwtkns.com/srtm/ tiles?

@garrettsickles
Copy link
Owner

I worked on an attempt at this but I got side tracked a little while back! I will work on this tonight and let you know how it goes tomorrow!

And yes I believe it should work with those DEMs, but I am not sure...

@raydoucetjr
Copy link

That would be fantastic Garrett Sickles, I have fought with these tiles for months trying to get them imported into the engine properly using various software to export to different formats that other software could read and then be able to export some more. This would be amazingly helpful!!!

@garrettsickles
Copy link
Owner

@raydoucetjr - I just pushed up a change to support this. Let me know if it helps! I made the 'Bad' pixel value 0xFFFF (U16 max).

See readme for usage

@raydoucetjr
Copy link

I tried using VS2017 with the project but it wouldn't do anything with it, so I'm going to have to download an actual C++ compiler upon my return from work later today in order to get the project built properly so I can test it out!

@raydoucetjr
Copy link

tried running it inside of code::blocks 17.12 but I got two errors, one about the missing libpng/png.h file and the other about file requires compiler and library support for the ISO C++ 2011 standards. Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants