r-spatial / mapedit

Interactive editing of spatial data in R
https://www.r-spatial.org/r/2019/03/31/mapedit_leafpm.html
Other
218 stars 33 forks source link

Edit attributes shiny application PR #120

Closed mrjoh3 closed 2 years ago

mrjoh3 commented 2 years ago

This PR includes a shiny application that can be launched to create new spatial features and attributes. Or it can take an existing spatial object and edit both featues and attributes.

The shiny app is a documented function in the file R/editAttributes.R The contenmts of the PR should be self contained in this file with only minimal changes made to the DESCRITION and NAMESPACE files

A second file inst/posts/2020-01-24_geoattributes.Rmd represents the UAT testing that has been used to ensure the application functions as expected.

@tim-salabim, you may recall @joshualerickson and I have both been working on this application. I had hoped to include some more automated testing but am finding it hard to find the time.

Please let me know if any changes are needed for this PR to go ahead, or if you would prefer a PR to your develop branch instead.

tim-salabim commented 2 years ago

Awesome thanks! I'll have a look soon. Merging into main is fine! I'll also include you two in the authors section in readme (if you're ok with that).

mrjoh3 commented 2 years ago

That sounds great, thanks

On Tue, 15 Mar 2022, 21:22 tim-salabim, @.***> wrote:

Awesome thanks! I'll have a look soon. Merging into main is fine! I'll also include you two in the authors section in readme (if you're ok with that).

— Reply to this email directly, view it on GitHub https://github.com/r-spatial/mapedit/pull/120#issuecomment-1067806405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOVGAOUAZZC2VPVPHBVHW3VABQE7ANCNFSM5QYFQY3Q . You are receiving this because you authored the thread.Message ID: @.***>

tim-salabim commented 2 years ago

I've encountered a few issues after merging. Most importantly, this fails:

editAttributes()

Listening on http://127.0.0.1:3827
Warning: Error in getMapData: trying to get slot "map" from an object of a basic class ("NULL") with no slots
  56: %>%
  46: ::
shiny
observe [/home/tim/software/rpkgdev/mapedit/R/editAttributes.R#192]
  45: <observer>
   2: shiny::runApp
   1: editAttributes [/home/tim/software/rpkgdev/mapedit/R/editAttributes.R#560]

I was about to post that you need to make a new PR off the current master but then I had trouble pushing to the repo... Then I found this:

image

So, great timing... I am not in a state where I should fiddle around with such things anymore today (and likely won't be after work tomorrow or the rest of the week). So unless I can squeeze this into work, you will likely have to wait until the weekend for me to solve the issue of not being able to push to the repo anymore... Sorry for the inconvenience and thanks for the great work on this!

mrjoh3 commented 2 years ago

ouch @tim-salabim sorry to hear. I find SSH either fantastically simple or horrifyingly confusing and I can never predict how it will go on a given day.

For the issue you mentioned above where editAttributes() results in an error, I have made a quick change that sets the zoom area to Africa. This will trigger if zoomto is missing and no other spatial inputs (via dat) can be found. I have also included a small message to indicate the behaviour to users.

I will submit an additional PR for this small change but please don't worry about it until you have the time, there is no rush.