springmeyer / arc.js

great circle routes in javascript
http://springmeyer.github.io/arc.js/
BSD 2-Clause "Simplified" License
369 stars 69 forks source link

Making multiline strings to address international date line #5

Closed smit1678 closed 12 years ago

smit1678 commented 12 years ago

@springmeyer

I want to ping you on the international date line issue and see if there is a possible solution by using MultiLineStrings. Is it possible to create multiline strings when an arc crosses the date line?

Another issue with breaking into two lines is the gap that is formed between the two points that cross the date line. Is it also possible to create two points, along the arc, that would be just offset from the date line? So when the line is broken, create two points, at -179.99 and +179.99 at the appropriate latitude?

Example of a line: https://gist.github.com/39ab121a3e225c516885

springmeyer commented 12 years ago

ya, one sec :)

springmeyer commented 12 years ago

@smit1678 & @tristen - give that a shot ^^.

springmeyer commented 12 years ago

see https://github.com/springmeyer/arc.js/issues/4#issuecomment-6072091 for some examples

springmeyer commented 12 years ago

ping @smit1678 - did you ever have a chance to try this ^^?

smit1678 commented 12 years ago

@springmeyer yes, sorry I didn't respond here. This work flawlessly for about 5,000 lines. I need to do a bit more testing to determine exactly but it seems there might be some bugs when getting over that. I saw a few edge cases where they were not being split into multi linestrings. I will post some more details here and keep this ticket open.

springmeyer commented 12 years ago

@smit1678 - okay, thanks for the update. I've not really considered how this code would perform for lots of lines, so we may need to test that more. I'm going to close this issue. Please re-open another on perf/memory usage when you get there.