You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bounds given are: [-62302.98385274002, -62581.853071795864] and [63311.853071795864, 63081.853071808815]
which are not correct.
With, for example, the coordinates : [[[0.6673, 51.4574], [0.6759, 51.4583], [0.6815, 51.4578], [0.6873, 51.4595], [0.6673, 51.4574]]], the bug doesn't appear.
The text was updated successfully, but these errors were encountered:
Update :
Then, I wondered if that may be linked to the polygon being taken in the wrong way (problem probably linked with clockwise / antoclokwise way). So I reversed the coordinates and I got the right answer :
d3.geo requires polygons to wind clockwise around their interior (right-hand/right-foot winding rule). Your polygon looked like it might be degenerate (self-intersecting) at first glance (I removed the coincident point for clarity):
If you zoom in, you realise there is no degeneracy, therefore the problem was simply the incorrect winding order. The numbers from 0 to 3 indicate the order, and you can see that the winding order is counterclockwise relative to the small interior.
I wonder if this issue may be linked with the bug #2025.
I'm plotting a map using geojson data and d3.geo. It appears that for some of the objects, the function bounds() returns wrong bounds.
Here is an example:
The bounds given are: [-62302.98385274002, -62581.853071795864] and [63311.853071795864, 63081.853071808815]
which are not correct.
With, for example, the coordinates : [[[0.6673, 51.4574], [0.6759, 51.4583], [0.6815, 51.4578], [0.6873, 51.4595], [0.6673, 51.4574]]], the bug doesn't appear.
The text was updated successfully, but these errors were encountered: