cyclic longitude in Basemap

Hi all,

Does anybody know how one gets a mpl_toolkits.basemap.Basemap map to automatically recognize when a feature has run off the end of the longitude range, and needs to wrap around and show up on the far side of a map having global extent? I have a bunch of linear features I'm trying to plot intelligently... and what happens now is, either the feature runs off the edge, and disappears, or, if I change the coordinates making up the object to all lie within the longitude range that the map contains, then I end up with a line going all the way across the map from one side to the other, connecting the two portions of the feature.

There's this function "addcyclic", but I don't think it does what I want. Actually, I'm not exactly clear on what it does.

Thanks for any insight you might have,

Zane

···

--
Zane Selvans
Amateur Earthling
http://zaneselvans.org
zane@...1923...
303/815-6866
PGP Key: 55E0815F

Zane Selvans wrote:

Hi all,

Does anybody know how one gets a mpl_toolkits.basemap.Basemap map to automatically recognize when a feature has run off the end of the longitude range, and needs to wrap around and show up on the far side of a map having global extent? I have a bunch of linear features I'm trying to plot intelligently... and what happens now is, either the feature runs off the edge, and disappears, or, if I change the coordinates making up the object to all lie within the longitude range that the map contains, then I end up with a line going all the way across the map from one side to the other, connecting the two portions of the feature.
  
Zane: This has come up several times before on the list, and unfortunately the answer is no - I don't know of any general way to do what you ask. Unless someone else has a solution, I think you'll have to manually split up your lines so they all fit in the map region.

If all you lines are in one hemisphere, another potential solution is to use a polar stereographic map (projection = 'npstere' or 'spstere'). That way, you'll be looking down on the earth from above the pole, and the lines will all be within the map (never crossing an edge).

There's this function "addcyclic", but I don't think it does what I want. Actually, I'm not exactly clear on what it does.
  
It adds an extra column of data that repeats the first longitude, so you don't get a gap on the plot when you plot a global dataset.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg