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

Export a draw circle #1565

Closed
giswqs opened this issue Jan 19, 2022 · 4 comments
Closed

Export a draw circle #1565

giswqs opened this issue Jan 19, 2022 · 4 comments
Assignees

Comments

@giswqs
Copy link
Contributor

giswqs commented Jan 19, 2022

This exported geojson of a circle has only one point. Should there be a radius in the output geojson?

import folium
import folium.plugins as plugins

m = folium.Map()
plugins.Draw(export=True).add_to(m)
m

folium

@NickkRodriguez
Copy link

I would love to solve this issue for you @giswqs. Can I be assigned to this issue?

@NickkRodriguez
Copy link

NickkRodriguez commented Jan 28, 2022

@Conengmo @ocefpaf I'm having some issues solving this problem. Could you or other contributors offer some guidance? This is one of my first contributions, and I would like to keep contributing to Folium.

I understand that in the plugin Draw, Folium uses Leaflet's own Draw, but Leaflet's documentation doesn't contain attributes for the radius so I'm not sure that's the right way to tackle this unless I bring in new libraries. Maybe I could use the radius that shows up on the screen when making a circle, but I can't find a way to capture that.

Any other ideas?

Which files should I be working with?

I thought instead of making a plugin, it would be best to add/change code from existing files. Whatever works and is more efficient.

If there's a way to privately message, I would appreciate that even more.

Thank you.

@alessioarena
Copy link
Contributor

I think this is related Leaflet/Leaflet.draw#551
Also, see this https://gis.stackexchange.com/questions/285352/how-to-get-the-exact-circle-that-user-has-drawn-using-leaflet-draw-circle

Bottom line is that GeoJSON standard does not have a Circle

@Conengmo
Copy link
Member

Thanks @alessioarena! Unfortunately not much we can do about it. If new information comes up do please share here.

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

4 participants