Closed j-harbin closed 2 years ago
I do select-by-polygon in my own work. I don't imagine wanting to use mapApp
for it, though, because I am very "picky" about the polygon. I compute the polygon by very carefully clicking on a big plot. Then I save the polygon for later use. For example, I might make a polygon that goes between two depth contours, and I might use it later to select for downloading profile data.
There are some technical issues in doing this in mapApp
but you might want to try it, I suppose. Some things that come to mind are
How does the user indicate the end of the polygon? Double-clicking, maybe?
Can the user undo a mistake? (I usually make mistakes, and what I do is to follow a bad click by a click that is very far from the data. Then I write a program to go through the polygon, removing those far-away data and also the point before.)
How does the user save the polygon? And how do they load it back in later?
Basically, though, the question is why to do this. The point of the select-by-rectangle is to zoom the plot. If they select a polygon, it would be easy to find the lon and lat limits and then use that for the zoom. I think it all comes down to what mapApp
is used for.
As you know, I have an alternative to mapApp, which I use in my own work. It is more inclined to science than to making pretty things. For example, I don't have (and am not planning to create) the ability for the user to change symbols or do anything like that. My code is very much in flux, but might be ready in a month or two to be seen by others. Whether it should go into argoFloats is a question. The problem with putting something in a package that is open-source is that people will start using it ... and then it is very hard to change things. But I want this as a research tool, so I can change anything about it, anytime I want. This is the kind of thing we could maybe discuss in a Z, perhaps when you start working on argo more fulltime, in a few weeks.
These are all good points. Basically this came about in the work shop because the "Code" button we created is quite useful. You and I are very familiar with the steps for how to look at plots and subset for geographical regions, but Clark has expressed to me in the past that sometimes he simply opens mapApp()
, and highlights the area he's interested with and copy's and pastes the code from the "Code" button. It might also be a good feature for those who are new to coding when first getting familiar with argoFloats
code.
To answer some of your points:
Ps- I'm not completely set on this idea, but you're right that it may be a good idea to have a Z about it. Maybe some time early next week. I'm officially full time Argo now!
This all sounds good. I'm open to a Z today, if you like, or next week. (I wouldn't mind today, if you have time, because I never like to leave for tomorrow what I can do today.)
Just shoot me an email, on a proposed time (today or next week).
The Stale-bot has marked this issue as Stale, because no new comments have been added in the past 30 days. Unless a comment is added within the next 7 days, the Stale-bot will close the issue. The purpose of these automated actions is to prevent the developers from forgetting about unattended tasks. Note that adding a "pinned" label will turn this action off for a given issue.
I'm currently working on this. Just adding a comment so the stale bot doesn't close it.
To do:
shinyBS
to depends or suggestsDone in commit 5bbf3f3b3ae676b7639616649d835183a1751809 of develop.
Currently
mapApp()
can only subset by rectangle. It shouldn't be too hard for me to add in a subset by polygon which would simply have the user click around the area of interest (similar to thelocator
function). What are your thoughts on this @dankelley (after the workshop, of course)