-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support for rotating a rectangle feature #2132
Comments
This is possible through the ipyleaflet Geoman Draw Control. import geemap
from ipyleaflet import Map, GeomanDrawControl
m = geemap.Map(center=(50, 354), zoom=5, draw_ctrl=False)
draw_control = GeomanDrawControl()
draw_control.polyline = {
"pathOptions": {
"color": "#6bc2e5",
"weight": 8,
"opacity": 1.0
}
}
draw_control.polygon = {
"pathOptions": {
"fillColor": "#6be5c3",
"color": "#6be5c3",
"fillOpacity": 1.0
}
}
draw_control.circlemarker = {
"pathOptions": {
"fillColor": "#efed69",
"color": "#efed69",
"fillOpacity": 0.62
}
}
draw_control.rectangle = {
"pathOptions": {
"fillColor": "#fca45d",
"color": "#fca45d",
"fillOpacity": 1.0
}
}
m.add(draw_control)
m |
This is precisely what I thought with P1. Thank you, Prof. @giswqs! For P2, how to load previously saved features and edit their geometry? |
I am not sure it if supports loading existing vector data. You need to study their source code to see if it is feasible. |
Sure, Prof. @giswqs. I'll try to figure it out and if it works, will share here for everyone. |
Prof. @giswqs, how to access the rotated bounding box created by the Geoman Draw Control example shared above? I tried the following methods but they didn't work. print(m.draw_control)
# None print(m.draw_features)
# [] |
Description
Motivation
Oriented bounding box (OBB) detection applications are increasing, especially in communities working on aerial/satellite imagery. Top computer vision conferences such as CVPR and ICCV have numerous papers proposing new methods to detect OBBs every year. OpenMMLab has a library
mmrotate
just for OBB detection. Few paperswithcode threads track the state-of-the-art in OBB detection [thread1, thread2].Proposals
geemap
drawing tools allow drawing a rectangle as well as a polygon. An OBB is something between the two. It needs 4 coordinates like a quadrilateral (Polygon) to represent itself correctly, but it has to be rectangular. Imagery labeling tools such as label-studio and Microsoft's satellite imagery labeling tool allow drawing a rectangle and then allow to rotate it. I thinkgeemap
has the necessary building blocks to make this happen and will immensely benefit the growing OBB community. Specifically, programmatic control ofgeemap
makes it a very attractive tool for OBB labeling.geemap
allows loading existing Polygons, not as a layer but an editable feature, it can be very useful to adjust wrongly predicted bounding boxes. Changing the class value is currently possible inleafmap
via a solution proposed here.The text was updated successfully, but these errors were encountered: