ColCarroll / ridge_map

Ridge plots of ridges
MIT License
520 stars 49 forks source link

Two recent [late July 2020] errors #24

Open perllaghu opened 4 years ago

perllaghu commented 4 years ago
  1. The URL for the default font has changed - from code: https://github.com/google/fonts/blob/master/ofl/cinzel/Cinzel-Regular.ttf?raw=True to https://github.com/google/fonts/blob/master/ofl/cinzel/static/Cinzel-Regular.ttf?raw=true

You can get round this problem by specifying the font as in your "Plot with custom fonts and elevation colors!" example

  1. The SRTM.py data is failing.

Test code:

from ridge_map import FontManager, RidgeMap
polygon = (-8.657227,49.761777,2.241211,59.625348)
font = FontManager('https://github.com/google/fonts/blob/master/ofl/uncialantiqua/UncialAntiqua-Regular.ttf?raw=True')
rm = RidgeMap(polygon, font=font.prop)
values = rm.get_elevation_data(num_lines=220, elevation_pts=550)

.... and we cascade down to Connection to http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/N49W007.hgt.zip failed (timeout) - in practice, this is because the URL is now https://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/N49W007.hgt.zip and urllib3's not smart enough to follow the 301 code

ColCarroll commented 3 years ago

thanks for these (sorry for tardiness :grimacing: )

The first one is now fixed (#25), and the second one sounds like it is best fixed at the SRTM.py level? This is definitely a dodge on my part -- I'll leave this open in case anyone figures out a nice way to fix it here.