Closed kimberlyh66 closed 5 years ago
Updating with David's requested changes
@dlebauer suggestions have been addressed.
I have made some notes in the README on where to download the thumbs (/ua-mac/Level_2/rgb_fullfield/_thumbs/
endpoint on Globus) and where to save on local computer (~/data/terraref/sites/ua-mac/Level_2/rgb_fullfield/_thumbs
).
Since I do not have this path on my computer cache_path <- "/srv/shiny-server/cache/cache.RData"
, I usually comment out lines 14-33, 377 and add the following lines to replace line 377 to get the app to run:
load('cache_full.RData')
full_cache_data <- full_cache_data["MAC Season 6"]
cache_full.RData is a replacement for the cache file and should be saved in the working directory.
@dlebauer I usually save a copy of the cache.RData file that you provided a few months ago to the working directory. Do you still have this file? I am unable to attach a .RData file here.
The cache-refresh script should be able to (and was previously able to) handle the case and create a new cache.RData when the file does not exist. I'm not sure where the feature was lost, but could you please re-implement it?
Sure
I think the cache-refresh.R script is executed when running the app with docker, so it doesn't need to be re-implemented.
I haven't been able to connect to the database, so I haven't been able to run this script. How do you usually connect to the database?
I usually use an ssh tunnel that you wouldn’t have access to. But won’t a local docker container work?
From: Kimberly Huynh notifications@github.com Sent: Wednesday, July 10, 2019 5:47:23 PM To: terraref/traitvis-webapp Cc: LeBauer, David Shaner - (dlebauer); Mention Subject: Re: [terraref/traitvis-webapp] Overlay fullfield image / heat map updates (#27)
I think the cache-refresh.R script is executed when running the app with docker, so it doesn't need to be re-implemented.
I haven't been able to connect to the database, so I haven't been able to run this script. How do you usually connect to the database?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/terraref/traitvis-webapp/pull/27?email_source=notifications&email_token=AADRPZZV6MUMBLKZMCET5OLP6Z7JXA5CNFSM4HYZNIWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZVEVSA#issuecomment-510282440, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AADRPZ4CIWI47MMJDVZWFODP6Z7JXANCNFSM4HYZNIWA.
still need to resolve a few remaining bugs w/ PR
@dlebauer I have addressed the remaining bugs occurring with this PR. The cache-refresh.R script should work now and you should be able to run app.R without any problems.
I noticed that the rgb thumbs appear to be slightly different in color from the original when displayed on the rendered map. I get the original color when plotting a RasterBrick with raster::plotRGB
. However, when I try adding the same RasterBrick object to the leaflet map using mapview::viewRGB
, the color is altered. Do you have any idea why this may be occurring?
Can you post screenshots of the two? Could it be the order of RGB layers specified by the r,g,b arguments to viewRGB? Or the quantiles argument?
From: Kimberly Huynh notifications@github.com Sent: Friday, July 19, 2019 3:06:40 PM To: terraref/traitvis-webapp traitvis-webapp@noreply.github.com Cc: LeBauer, David Shaner - (dlebauer) dlebauer@email.arizona.edu; Mention mention@noreply.github.com Subject: Re: [terraref/traitvis-webapp] Overlay fullfield image / heat map updates (#27)
@dlebauerhttps://github.com/dlebauer I have addressed the remaining bugs occurring with this PR. The cache-refresh.R script should work now and you should be able to run app.R without any problems.
I noticed that the rgb thumbs appear to be slightly different in color from the original when displayed on the rendered map. I get the original color when plotting a RasterBrick with raster::plotRGB. However, when I try adding the same RasterBrick object to the leaflet map using mapview::viewRGB, the color is altered. Do you have any idea why this may be occurring?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/terraref/traitvis-webapp/pull/27?email_source=notifications&email_token=AADRPZ6OWD7LAZD3VXMYSPDQAI3HBA5CNFSM4HYZNIWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2M4MKQ#issuecomment-513394218, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AADRPZ5VKDLELL3BUPYVAG3QAI3HBANCNFSM4HYZNIWA.
The defaults for r,g,b are reversed in these two functions
original
rendered on map
Does it seem plausible that these have the red and blue channels switched?
Do you mean trying to set r = 1, g = 2, and b = 3?
I tried running the following code chunk, but still get the same results:
map <- viewRGB(x = fullfield_image, r = 1, g = 2, b = 3, map = map, layer.name = scan_name)
It is odd it gives the same results ... perhaps try the reverse or moving these up to see if the values affect the output? Also, what is the dimension of the rasterstackbrick?
Dimensions of RasterBrick are dimensions : 1285, 164, 210740, 3 (nrow, ncol, ncell, nlayers)
looking into it now ... but also getting deprecation warnings like:
Warning: 'mapview::removeHomeButton' is deprecated. Use 'leafem::removeHomeButton' instead. See help("Deprecated") and help("mapview-deprecated"). Warning: 'mapview::addHomeButton' is deprecated. Use 'leafem::addHomeButton' instead.
I've created an issue in the mapview repository https://github.com/r-spatial/mapview/issues/234 to hopefully resolve the color issue and have marked comments above as 'outdated' to shorten the thread a bit.
Updates made to: