Skip to content
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

Lines crossing the antimeridian are not rendered correctly. #33

Open
mbostock opened this issue Sep 25, 2010 · 4 comments
Open

Lines crossing the antimeridian are not rendered correctly. #33

mbostock opened this issue Sep 25, 2010 · 4 comments
Labels

Comments

@mbostock
Copy link
Contributor

When we encounter such geometry, presumably we should project so as to minimize the distance between adjacent points.

Interestingly this bug was also in Google Earth:

http://code.google.com/p/kml-samples/issues/detail?id=227

@arktisma
Copy link

arktisma commented Dec 7, 2011

Is this bug still active? Because I have attempted to run a line from Pitcairn Island to Opua, New Zealand, and am encountering this bug, whereby the line is rendered in reverse to its destination (NZ).

This seems like a fairly significant bug... Are there any workarounds? I am attempting to plot a round the world route. Here is a screen cap: http://cl.ly/1e2R1J2d3M1b193L011i

@arktisma
Copy link

arktisma commented Dec 7, 2011

Additionally, if I attempt to stop my linestring 0.0 and start it again at 180, I encounter a secondary issue: http://cl.ly/0N383q1I2w2e3M3P2X2c

@mbostock
Copy link
Contributor Author

mbostock commented Dec 7, 2011

If you use longitude values greater than +180 or less than -180, you can force Polymaps to pick one side of the Earth, rather than bouncing between the two.

@arktisma
Copy link

arktisma commented Dec 8, 2011

Ok, I'm a bit confused. This is my JSON...

[
{ "source": [ -122.51541137695312, 37.80761398306056 ], "target": [ -72.70751953125, -55.54106495611102] },
{ "source": [ -72.70751953125, -55.54106495611102 ], "target": [ -67.269287109375, -56.016807763203204] },
{ "source": [ -67.269287109375, -56.016807763203204 ], "target": [ -109.3664237, -27.1211919 ] },
{ "source": [ -109.3664237, -27.1211919 ], "target": [ -127.439308, -24.703615 ] },
{ "source": [ -127.439308, -24.703615 ], "target": [ -0.0, -143.94241333007812 ] },
{ "source": [ 180,-35.3130147 ], "target": [ 144.9629796 , -37.8131869 ] }
]

The last line of the above JSON, is the linestring that is being pushed onto the wrong side of the map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants