Comments (7)
Your drawing is correct, but North Pole is [0,90]
. You can play with the following block if you want to see what happens when you change parameters and values.
http://blockbuilder.org/Fil/cafad70aea7ec49d787e123b1026db06
It defines a red and a blue "centers", with a set of circles drawn from these centers and with a radius going from 5° to 90°.
As you can see on this equirectangular projection, the circles centered on the North Pole (the red ones) are drawn as straight lines, whereas the circles centered on WashingtonDC are drawn as, well, geographic circles :))
Now change the projection to d3.geoOrthographic()
:
from d3-geo.
https://github.com/d3/d3-geo#geoCircle
geoCircle is a polygon generator that approximates a circle on the sphere. Think "Arctic circle", not "a circle drawn on flat paper with a compass".
If you set its center on the pole, and its radius at 90°, you get a line on the Equator. With a radius of 23.43° you get the Arctic circle (23.43 = 90° for North Pole - 66° 34′ 0″ N).
So indeed the radius is defined as an angle; but remember, this circle is a polygon generator, not a "circle". In many projections it is going to be shown as a straight line. It's only in 3D (x,y,z - space) that this circle is drawn as a "circle made with a compass" (though I doubt you can use a compass in empty space… ah). And it's true that, in that case, the drawing has a radius, that would be r * sin(radius)
.
HTH
from d3-geo.
This has gotta be the greatest confusing terminology invented in Mathematics. Thanks, @Fil.
OK, so are you saying that the 'radius' is actually the longitude, and the circle on the sphere is always parallel to the equator line?
I'm reading https://en.wikipedia.org/wiki/Great-circle_distance and the diagram has a rotated circle, which confused me further. One radius (read: angle) can't be enough to define this circle, unless it's always going to be parallel to the equator line.
from d3-geo.
The circle is a parallel if (and only if) it is centered on one of the poles.
See https://github.com/d3/d3-geo#circle_center
from d3-geo.
Set the centre to [-90, 0]
(North pole, right?) and radius to 90
, you get the 'equator' on the sphere ... I think?
I drew this picture to make sure my understanding is 100%.
from d3-geo.
Thanks, that makes perfect sense now!
from d3-geo.
Hi there I am looking for way to draw these circles with a stroke, but not have it draw the stroke on the outside edge of the map. I thought I found an article about how to convert the geoCircle to a GeoJSON and then pass it to the path projection but I can't seem to find it anywhere. Any help would be useful. Thanks.
from d3-geo.
Related Issues (20)
- How can I clamp a geodesic to between a max/min latitude? HOT 1
- fit-test.js Remove duplicate test HOT 1
- Geojson to SVG offset HOT 1
- Geojson to SVG offset
- Cannot import d3-geo in node with typescript HOT 8
- Geographic or Geodetic HOT 1
- D3 uses GeoJSON to represent geographic features in JavaScript HOT 2
- postclip with polygon path maybe... HOT 10
- Error [ERR_REQUIRE_ESM]: Must use import to load ES Module / require() of ES modules is not supported HOT 2
- geoAzimuthalEqualArea not rendering straight lines HOT 2
- clipCircle's precision is too low
- Configurable precision for d3.geoPath
- Mercator. Getting boundary values by longitude HOT 2
- Mercator with rotate. Incorrect conversion from projection to geographic coordinates HOT 3
- Сonvert geographic points considering antimeridian and pole HOT 1
- geoContains function doesn't seem to handle MultiPolygons HOT 9
- path.bounds should return numbers even when input coordinates are strings
- [Question] API for chekcing if point is in view or not given projection HOT 3
- Mercator Map centered on the Pacific HOT 1
- geoCircle produces an open LinearRing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-geo.