Closed meztez closed 3 years ago
@meztez, the best approach is to use the elevation of the location (400m hex grid point) in the postgres database that the user click draws data from. I'm on the road today so i can't be more specific about where the elevation field is in the database but hopefully it is easy to find.
I will use bcmaps::cded() for the moment. The provided Postgis database does not seem production level. We should schedule a followup meeting this week, I will repost the current app to shinyapps.io and post the link here.
ok sounds good. i'll try to get the database architect, @kdaust , on for our meeting. we have a parallel contract that is setting up the database on DigitalOcean; could be up there even in the next few days. I'll check in with that team as well.
Hi All - sorry for the delay, midterm season here. @meztez the postgres database doesn't actually contain the elevation data because I built it just with the cciss output in mind, which we don't need the elevation for since the database stores the modelled results. The original data I used to extract from ClimateBC of course has the elevation, but isn't in that database. And full disclosure here, I appreciate the database architect title @cmahony, but this is the first database I've really put together, and mainly did it with trail and error, so it doesn't surprise me that there are some issues with it. That being said, it seems to work ok with the CCISS scripts. @cmahony I would be more than happy to join a meeting - let me know a time, as long as it's not during class I'm pretty free.
@kdaust I don't think the setup is the problem. Maybe the network. Would be happy to help after I'm done with this assignment. I am gonna go without elevation for the moment.
@meztez unless it is really easy let's put the elevation from dem on the back burner. it isn't essential for building the outputs; just there for user context. if you've already done it that's fine because we will need it eventually.
@cmahony @kdaust @whmacken
http://meztez.com/shiny/cciss/ (retry in 30 minutes if you get a 404, I just changed the DNS)
Tiles are hosted separately.
I've set up a VM with postgis+shiny+rstudio. Currently, using in memory object for bec info, will test tonight if having postgis on the same machine improves performances.
You are welcome to test out the interface.
@meztez The interface is going great. really good performance on the map. let me know when you are at a stage where want feedback on the map elements and interface functionality etc.
that would be tomorrow, im rewriting the backend to hook up into the local db
@meztez, Will and i discussed the digital elevation model and we would like to have this functionality. When the user clicks a point or enters lat and long manually, the app should obtain an elevation for that point from a digital elevation model. I don't know the best source for the DEM; perhaps bcmaps::cded() as you indicated. anything less than 100m dem resolution would be adequate.
I've added BC cded rasters to the database, the recipe is here : https://github.com/bcgov/CCISS_ShinyApp/blob/main/data-raw/scripts/bc_dem_to_postgis.R
The app is dependent on this table to get elevation. It takes about 8ms to get information. Always amazed what can be done with postgis.
Hi
Do you have an internal source or do you have to pay to access it?
Only link I have is this one https://www2.gov.bc.ca/gov/content/data/geographic-data-services/topographic-data/elevation/digital-elevation-model
Thanks
I will leave elevation information alone for now.
@whmacken @cmahony