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

Add support for editing vector data (geojson, shapefile, etc.) interactively #179

Closed
giswqs opened this issue Jan 14, 2022 Discussed in #178 · 3 comments
Closed

Add support for editing vector data (geojson, shapefile, etc.) interactively #179

giswqs opened this issue Jan 14, 2022 Discussed in #178 · 3 comments
Assignees
Labels
Feature Request New feature or request

Comments

@giswqs
Copy link
Member

giswqs commented Jan 14, 2022

Discussed in #178

Originally posted by jamesvrt January 13, 2022
I'm interested in using leafmap to annotate satellite imagery from within notebooks. Currently I can use m.user_rois to access drawn features which allows for a basic way to do this. However, I would like to be able to edit an existing vector dataset imported to the leafmap map. Some functionality that would be a good start:

  • Add features to the vector dataset
  • Fill out attributes for a selected feature
  • Delete existing features
  • Modify existing attribute fields for selected features

I've seen from @giswqs reply here that some of this functionality is available in geemap, but it doesn't appear it is possible in leafmap.

I can see that ipyleaflet supports some basic polygon editing but I don't think this would let me do what I want.

Select geometries based on mouse click: https://automating-gis-processes.github.io/CSC18/lessons/L4/point-in-polygon.html

Demo:
draw_control

@giswqs
Copy link
Member Author

giswqs commented Jan 14, 2022

By integrating ipysheet, it seems possible to edit vector data attributes interactively. @jamesvrt

jupyter nbextension enable --py --sys-prefix ipysheet

@giswqs giswqs self-assigned this Jan 22, 2022
@giswqs giswqs added the Feature Request New feature or request label Jan 22, 2022
giswqs added a commit that referenced this issue Jan 23, 2022
giswqs added a commit that referenced this issue Jan 23, 2022
giswqs added a commit that referenced this issue Jan 25, 2022
giswqs added a commit that referenced this issue Jan 27, 2022
giswqs added a commit that referenced this issue Jan 29, 2022
@giswqs
Copy link
Member Author

giswqs commented Jan 29, 2022

@jamesvrt This feature has been implemented. This was a very challenging one. It took me many hours to debug this feature. Happy to see it is working finally.

46_edit_vector.mp4

@giswqs giswqs closed this as completed Jan 29, 2022
@giswqs
Copy link
Member Author

giswqs commented Jan 29, 2022

Here is a notebook example https://leafmap.org/notebooks/46_edit_vector/

sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Feb 18, 2023
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Feb 18, 2023
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Feb 18, 2023
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Feb 18, 2023
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Feb 18, 2023
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Feb 18, 2023
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Jul 10, 2024
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Jul 10, 2024
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Jul 10, 2024
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Jul 10, 2024
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Jul 10, 2024
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this issue Jul 10, 2024
kuzja111 pushed a commit to kuzja111/leafmap that referenced this issue Jul 25, 2024
kuzja111 pushed a commit to kuzja111/leafmap that referenced this issue Jul 25, 2024
kuzja111 pushed a commit to kuzja111/leafmap that referenced this issue Jul 25, 2024
kuzja111 pushed a commit to kuzja111/leafmap that referenced this issue Jul 25, 2024
kuzja111 pushed a commit to kuzja111/leafmap that referenced this issue Jul 25, 2024
kuzja111 pushed a commit to kuzja111/leafmap that referenced this issue Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant