The radius of the circle is not accurate
See original GitHub issueI’ve set a radius of my geofence to 2500 meters. I have a point that its distance to the center of this geofence is 2332.84 meters. So it should be inside the geofence. Here it is in Bokeh: You can clearly see the point is outside the geofence, however when I verify the distance with Google Maps you can see it’s the same as the one I’ve calculated:
This is the line of the code:
circle = Circle(x="longitude_deg", y="latitude_deg", radius=2500, fill_color="#ffbdaf", fill_alpha=0.4, line_color="#2471A3")
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Circles and Accuracy - Alias workbench
Accurate: Consistent radius value at every point on the circle. ... However it is difficult to get accurate circles with Non-Rational.
Read more >If the value of pi cannot be determined accurately does that ...
Not accurate. To have an accurate area of the circle, it would mandatory to have an accurate measurement of the radius. This means...
Read more >Diameter, Radius, & Circumference of Circles (Video & Practice)
This tutorial video and set of practice questions describes the diameter, radius, and circumference of circles. Test your knowledge!
Read more >Radius, diameter, & circumference | Circles (article)
Learn the relationship between the radius, diameter, and circumference of a circle.
Read more >Cannot get circle radius correct in OpenLayers - Stack Overflow
You need to one of the above, not both. Try to create the layer without specifying projection , it would use the default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@arashgmn Because the amount of space taken up by the bottom axis is not the same as the amount of space taken up by the left axis. Therefore the central area in the plot frame is not square, even though the HTML canvas is. Therefore: the pixel aspect ratio and the data aspect ratio do not match.
To demonstrate this, note that setting a large
min_border
:will force the interior plot frame to actually be square, and you will see your observed effect go away.
Edit:
To be clear, this:
is not the underlying concern. There concern is more generally that the pixel aspect ratio of the plot frame, and the aspect ratio of the data ranges do not match, which can happen with any values of the ranges (yes, even when they are set identical). depending on the pixel dimensions of the frame.
@birdsarah Only if the aspect ratios line up is this true. In your case you should be setting
match_aspect=True
to force the ranges to adjust so that the screen aspect and data aspect ratios to match. That is the only way to ensure circles are circles in data space (since canvas will always draw circles in pixel space)I am still unfortunately not sure what is the issue in the gmap case, or what to do about it.