-
Notifications
You must be signed in to change notification settings - Fork 33
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
[feature request] select-able table of non-spatial data for editMap #56
Comments
This is a very interesting idea, and I very much appreciate the suggestion. It seems like this functionality might align nicely with our yet untouched objective of attribute editing and offer some synergy with existing mapedit capabilities. I will try to assemble a quick poc. @tim-salabim, would love to hear your thoughts. |
Agreed! A very nice idea. I usually approach spatial data from the geometry side of things, not from he attribute side, so this perspective never occurred to me. But I do find this a very interesting option that I would love to see implemented.
As I said, these just popped into my head when thinking about this a little. I very much like this idea, especially as it is something that standard GIS systems usually don't provide in an easy fashion (if at all), |
@tim-salabim, I commented inline above. Thanks for listing out your thoughts. I will try to create the quickest poc I can to stimulate additional thought. http://geojson.io will be a good reference point and also |
Also added some comments inline above |
Thanks @tiernanmartin and @tim-salabim. See if this rough poc is headed in the right direction, but I just realized in this implementation if you draw first (likely) then successive edit and/or delete will be ignored. Will make the quick fix if I get positive feedback. Also, in this case, we will most likely want to turn off multiple mode in
|
One other idea would be we could use |
@timelyportfolio It's hard for me to imagine a more perfect poc - your gif illustrates the exact workflow I had in mind! Really nice stuff 👍 It seems that this implementation doesn't allow users to create |
@tiernanmartin oh good! I did not test with |
|
Ok, this allows draw, edit, delete, but I don't know a good way to easily handle multiple edit, deletes. It can be done but requires much more complicated logic. Also need to add zoom_to functionality on datatable select if a feature exists on the selected row, but that also requires more work :).
|
ideally, zoom_to + highlight |
Rather than copy/pasting with each iteration, I saved the code here so we can track changes. I was able to add zoom on datatable selected row. Also, I think I have an idea for @tim-salabim, I think lessons learned in this exercise will be very useful, but I am not sure how far we shoudl push this poc. Zoom/highlight will likely be necessary for edit attributes functionality. |
@timelyportfolio this is coming along nicely I think! The zoom doesn't seem to work for points as, I guess, |
Wow, this is awesome. |
Hi. I just wish to add that this would be great functionality for the remote sensing community also. For example, it would allow selecting Areas of Interest over a satellite image on zones with different characteristics (e.g., different land use), to be used for example for plotting purposes (e.g., plotting time series), or as training / testing data for raster classification. These are common tasks, which are currently accomplished using QGIS, ENVI, or other RS software. Any plans to develop it further? (sorry I can't help but I am not fluent (yet) with leaflet/shiny). |
@lbusett good point! This will be developed further, no doubt. We are currently not pushing mapedit development too much as we would like to wait until leaflet has been upgraded to use leafletjs 1.x (there's a lot of changes and a lot of new goodies). Nonetheless, I think it would be useful to have a working basic implementation of this functionality for users to test and report back so we can get a feel of what the expectations for such a tool are in real life. |
Thanks for the reply. Looking forward for this! PS: I'm aware of the issue about not being able to "query" the raster data. Indeed, I recently developed some routines for "efficient" raster extraction starting from https://lbusett.github.io/sprawl/reference/extract_rast.html |
Somehow related to this, a very useful feature could also to be able to edit the attribute table of a vector when editing it using "editFeature". For example: consider I want to "split" an existing polygon into multiple polygons, thus creating new geometries, and that I have an "ID" column in the original vector's attributes table. It would be nice to be able to interactively assing a new "ID" to the newly created polygons before returning the updated object to "R". I recon this may be complex, and maybe calls for a dedicated shiny/lealflet app, but I think it's a "use case" worth considering. |
@lbusett, thanks, and yes we plan to add attribute editing soon. As of now, we are waiting on Leaflet > 1. Hopefully, we will be back to work on this soon. |
I am coming to this discussion a bit late, but it is exactly the workflow I have been looking for. Lately I have also been integrating editable I have created a pull request (fb2f63a) for the example but basically you just create a
@lbusett and @timelyportfolio I am curious if this is the functionality you were after and if this experiment had progressed any further? |
It would be nice if users could control which feature they were editing by selecting a row from a
DT
table widget in theeditMap
editor.Here's my use case: I have a
tibble
of non-spatial data that I want to convert into ansf
object, adding geometries to each row.mapedit
seems like the right package for the job! I can convert thetibble
tosf
by adding asfc
with empty geometries, but then there's no way to select them in theeditMap
editor. Having a table + map interface in the editor would allow a users to add new geometries to non-spatial data by going row by row, highlighting and drawing each shape/line/point one by one.Additionally, I could see such an interface being useful for users who want to create
MULTI*
geometries (e.g., aMULTIPOLYGON
containing > 1 polygons).The text was updated successfully, but these errors were encountered: