Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Generating a Radar GIF

Generating a Radar GIF

lightning talk

Avatar for Jacob Beaudoin

Jacob Beaudoin

March 02, 2016

Other Decks in Programming

Transcript

  1. Source Files: http://motherlode.ucar.edu/native/radar/composite/grib2/N0R/ 20160302/Level3_Composite_N0R_20160302_2305.grib2 Inspect the file: gdalinfo Level3_Composite_N0R_20160302_2230.grib2 Spit

    out Washington: gdalwarp -of Gtiff \ -t_srs EPSG:4326 \ -r bilinear \ -te -125.4659287 46.814223 -120.4492967 49.3256306 \ Level3_Composite_N0R_20160302_2230.grib2 \ Level3_Composite_N0R_20160302_2230_WA.tiff Color the data: gdaldem color-relief \ -nearest_color_entry \ -alpha Level3_Composite_N0R_20160302_2230_WA.tif \ radar.clr \ Level3_Composite_N0R_20160302_2230_WA_color.tif Radar
  2. Source File: http://www.naturalearthdata.com/downloads/10m-raster-data/ Inspect the file: gdalinfo GRAY_HR_SR_W/GRAY_HR_SR_W.tif Spit out

    Washington: gdalwarp -of Gtiff \ -t_srs EPSG:4326 \ -r bilinear \ -te -125.4659287 46.814223 -120.4492967 49.3256306 \ -ts 461 231 \ GRAY_HR_SR_W/GRAY_HR_SR_W.tif \ background.tif Background
  3. Create the loop: convert -dispose none -delay 0 \ background.tif

    \ -dispose previous -delay 10 \ color/Level3_Composite_N0R_20160302_2200.grib2.tif \ .... color/Level3_Composite_N0R_20160303_0050.grib2.tif \ -loop 0 loop.gif GIF