tkrajina / srtm.py

Geo elevation data parser for "The Shuttle Radar Topography Mission" data
Apache License 2.0
245 stars 57 forks source link

Add a min_elevation parameter, to make it possible to see data in hig… #32

Closed akkana closed 7 years ago

akkana commented 7 years ago

get_image() is brilliant (as is the whole module -- thanks!) But in high elevation areas, it's almost impossible to see any contrast in the resulting image. It helps a lot to be able to pass a minimum elevation as well as a maximum.

Example of a place where it makes a difference:


    geo_elevation_data = srtm.get_data()
    image = geo_elevation_data.get_image((500, 500),
                      (35.8, 35.9), (-106.3, -106.2),
                     2260, min_elevation=1750,
                      max_color = (255, 255, 255, 255),
                      unknown_color = (255, 0, 0, 255))
    image.show()
tkrajina commented 7 years ago

I created get_image() just to make debugging easier, but I'm glad somebody finds it "brilliant" :)

Anyway, merging now, thanks.