-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Improvement of annotators #583
Conversation
The geometry not being visible is definitely an issue but I'm not sure I love the fix. I would expect the geometry returned by the element to match the |
The SVG created by shapely doesn't show up in the notebook. It seems to be related to Jupyter as far as I can see: If I open the saved file in Inkscape, it renders correctly: It seems to be a known issue: shapely/shapely#574 Codefrom IPython.display import SVG, display
from shapely.geometry import MultiPoint, Point
yy = [-10131185, -10131943, -10131766, -10131032]
xx = [3805587, 3803182, 3801073, 3799778]
points = [Point(x, y) for (x, y) in zip(xx, yy)]
multi = MultiPoint(points)
multi._repr_svg_()
with open("tmp.svg", "w") as f:
f.write(multi._repr_svg_()) |
Thanks for investigating that. If it's a known bug in shapely I'm a strong -1 in changing our behavior. What I would be in favor of is to add a |
Completely agree with you. I have implemented this suggestion. I have removed the flip from Another thing is I added an extra point in the first example to avoid #584. |
Hmm, I guess I'm confused about that. Why is the svg rotated? When I load shapely objects via geopandas for example they use the same convention for storing x/y that we do and do not appear to be flipped. |
Issue #584 is also a problem with 5 points. I will update the issue with more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think this is a big improvement.
Fixes #526
Fixes problems seen in Annotators.
Things done:
transform_shapely_to_wsg84
as large coordinates shows a blank shapely figure. Also visible on the website.Converted string to pathlib.
Update hover and link code with correct projection functions. Used this example.
Changed
.opts
to.options
, though I'm not entirely sure if this is the correct fix.Things not done:
I did not see this error mentioned in annotators wont work in geoviews #526 when running the notebook.TODO