Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example in get_site_MODIS function #41

Open
oggioniale opened this issue Jan 28, 2022 · 10 comments
Open

example in get_site_MODIS function #41

oggioniale opened this issue Jan 28, 2022 · 10 comments
Assignees

Comments

@oggioniale
Copy link
Collaborator

@micha-silver
I don't understand the example currently in the get_site_MODIS function

#'  \dontrun{
#'  deimsid = "https://deims.org/86e3a1ca-b2ba-4b06-b096-71447df52841"
#'  product_bands <- MODIStsp_get_prodlayers("M*D13Q1")
#'  print(product_bands[,6:7])
#' }

Please can you specify better the example?

@micha-silver
Copy link
Contributor

Yes, I'll get to that over the weekend.

@micha-silver
Copy link
Contributor

I've pushed a better example.

@oggioniale
Copy link
Collaborator Author

do you think to add a show_mapparameter also for this function?

@micha-silver
Copy link
Contributor

Yes, why not?
After tomorrow ;-)

@oggioniale
Copy link
Collaborator Author

yes of course!!!

@micha-silver
Copy link
Contributor

Hi @oggioniale : I have a suggestion here. I would like to prepare a single function relter_display_map() to be used throughout the package. That way we will be showing uniform maps, and it saves a lot of duplicated code. I would define the function with 2 parameters: raster_layer and vector_layer. (At least one would be required). And I suggest to base the map display on tmap since with that package it's easier to handle raster data compared to leaflet. Then, in all the functions that have code to show maps, I would replace with a simple call to this new function.

What do you think?

@oggioniale
Copy link
Collaborator Author

@micha-silver
do you think of an internal function?
This could be a good solution also because some functions, currently, don't have the show_map parameter.
My doubts is about to the abstraction of the values contained in the relter_display_map() function and how to activate this in other functions.

@micha-silver
Copy link
Contributor

@oggioniale : Yes, an internal function. Not exported
Once this is working, it will be trivial to add show_map to other functions.
We will need to pass to the function either an sf (vector) object or a terra raster.

@oggioniale
Copy link
Collaborator Author

@micha-silver if you have more clear that me how to build this please. But take care that a strong modification to the functions must take into account the test, and probably, any modifications must consider the test files.
I suggest to propose modification in a new branch that cover specific issue.

@micha-silver
Copy link
Contributor

Good idea, I'll start a new branch dev-display-maps for this and begin to make changes. Then we'll see how it goes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants