usgs-makerspace / makerspace-sandbox

Some initial R code for playing with data processing (maybe some light visualization).
Other
0 stars 5 forks source link

Implement the mapbox example of animating images #322

Closed mwernimont closed 4 years ago

mwernimont commented 4 years ago
mhines-usgs commented 4 years ago

might be useful: https://blog.mapbox.com/visualizing-radar-data-with-vector-tiles-117bc5ee9a5a as well as: https://blog.mapbox.com/design-weather-maps-4cebb670d2ce

mhines-usgs commented 4 years ago

pushed to my master instead of a branch, but for posterity, got it working with this commit: https://github.com/mhines-usgs/hurricane-revamp/commit/9ebb39bf3c7619126161d3d4175f0de37d1a14e6

mhines-usgs commented 4 years ago

moving on to work with some specific radar images from a past hurricane

mhines-usgs commented 4 years ago

grabbed a few time series shots from Katrina from this web service: https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?LAYERS=nexrad-n0r-wmst&TRANSPARENT=TRUE&FORMAT=image%2Fpng&TIME=2005-08-29T13%3A00%3A00Z&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326&BBOX=-92,23.4,-63.94,46.95&WIDTH=256&HEIGHT=256

https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?LAYERS=nexrad-n0r-wmst&TRANSPARENT=TRUE&FORMAT=image%2Fpng&TIME=2005-08-29T13%3A15%3A00Z&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326&BBOX=-92,23.4,-63.94,46.95&WIDTH=256&HEIGHT=256

https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?LAYERS=nexrad-n0r-wmst&TRANSPARENT=TRUE&FORMAT=image%2Fpng&TIME=2005-08-29T13%3A30%3A00Z&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326&BBOX=-92,23.4,-63.94,46.95&WIDTH=256&HEIGHT=256

https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?LAYERS=nexrad-n0r-wmst&TRANSPARENT=TRUE&FORMAT=image%2Fpng&TIME=2005-08-29T13%3A45%3A00Z&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326&BBOX=-92,23.4,-63.94,46.95&WIDTH=256&HEIGHT=256

https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?LAYERS=nexrad-n0r-wmst&TRANSPARENT=TRUE&FORMAT=image%2Fpng&TIME=2005-08-29T14%3A00%3A00Z&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326&BBOX=-92,23.4,-63.94,46.95&WIDTH=256&HEIGHT=256

mhines-usgs commented 4 years ago

Figured out how to get the coordinates in 3857 correctly: https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?LAYERS=nexrad-n0r-wmst&TRANSPARENT=TRUE&FORMAT=image%2Fpng&TIME=2005-08-29T13%3A00%3A00Z&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=-10449247.5147,2876478.2484,-7318386.8361,6222585.5986&SRS=EPSG:3857&WIDTH=256&HEIGHT=256

but still need to figure out what the coordinates section needs to be. will check this update in under another branch later.

mhines-usgs commented 4 years ago

something is still funky here, like the images are flipped or something. will keep at it on thursday. on a local-image branch on my fork: https://github.com/mhines-usgs/hurricane-revamp/commit/3cb31418a69644fa975bb8c484886660e620feda

mhines-usgs commented 4 years ago

I did have a mistake in the coordinates, so fixed those up and it lines up much better now. also using exact transforms rather than simplified makes it appear slightly better too. pushed up to the same local-images branch on my fork. https://github.com/mhines-usgs/hurricane-revamp/tree/local-image

mhines-usgs commented 4 years ago

This PR demonstrates (if you step through commits) both adding content from a web-based endpoint to animate across the map, as well as with local sources. https://github.com/usgs-makerspace/hurricane-revamp/pull/2

mhines-usgs commented 4 years ago

Moved this to a separate branch on canonical, 'aaron-camera'