fatuheeva | 3 Jul 2012 19:39
Picon
Favicon

draw track across the Dateline in Basemap

Hello,
I am wondering if Basemap has the ability to plot a track across the Dateline? Plotting longitudes that go across the Dateline (e.g., [175,177,179,-179,-176]) wraps the track back around the globe when it goes from 179 to -179. Instead, I want them directly connected. My Basemap instance looks like:

m = Basemap(projection='merc',llcrnrlat = 10,urcrnrlat = 30,llcrnrlon = 160,\
                urcrnrlon = -160,lat_ts = 20,resolution = 'l',lon_0 = 180)

Am I screwed on this one?
Thanks,

Mike
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Jeff Whitaker | 3 Jul 2012 20:21
Picon
Favicon

Re: draw track across the Dateline in Basemap

On 7/3/12 11:39 AM, fatuheeva wrote:
Hello,
I am wondering if Basemap has the ability to plot a track across the Dateline? Plotting longitudes that go across the Dateline (e.g., [175,177,179,-179,-176]) wraps the track back around the globe when it goes from 179 to -179. Instead, I want them directly connected. My Basemap instance looks like:

m = Basemap(projection='merc',llcrnrlat = 10,urcrnrlat = 30,llcrnrlon = 160,\
                urcrnrlon = -160,lat_ts = 20,resolution = 'l',lon_0 = 180)

Am I screwed on this one?
Thanks,

Mike

Mike:  There's no automagical way to do this. You either have to shift your map so the dateline is in the middle, or split you track into two segments.

-Jeff
-- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker-32lpuo7BZBA@public.gmane.org 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Eric Firing | 4 Jul 2012 00:17
Favicon
Gravatar

Re: draw track across the Dateline in Basemap

On 07/03/2012 08:21 AM, Jeff Whitaker wrote:
> On 7/3/12 11:39 AM, fatuheeva wrote:
>> Hello,
>> I am wondering if Basemap has the ability to plot a track across the
>> Dateline? Plotting longitudes that go across the Dateline (e.g.,
>> [175,177,179,-179,-176]) wraps the track back around the globe when it
>> goes from 179 to -179. Instead, I want them directly connected. My
>> Basemap instance looks like:
>>
>> m = Basemap(projection='merc',llcrnrlat = 10,urcrnrlat = 30,llcrnrlon
>> = 160,\
>>                 urcrnrlon = -160,lat_ts = 20,resolution = 'l',lon_0 = 180)
>>
>> Am I screwed on this one?
>> Thanks,
>>
>> Mike
>
> Mike:  There's no automagical way to do this. You either have to shift
> your map so the dateline is in the middle, or split you track into two
> segments.
>
> -Jeff

If I am reading the original message correctly, what is needed is for 
the longitudes that are to be plotted to be unwrapped as well, as in the 
unwrap_lon (and unwrap) function here:

http://currents.soest.hawaii.edu/hg/pycurrents/file/2851d48cd865/data/navcalc.py

Eric

>
> --
> Jeffrey S. Whitaker         Phone  : (303)497-6313
> Meteorologist               FAX    : (303)497-6449
> NOAA/OAR/PSD  R/PSD1        Email  :Jeffrey.S.Whitaker@...
> 325 Broadway                Office : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web    :http://tinyurl.com/5telg
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
fatuheeva | 4 Jul 2012 00:41
Picon
Favicon

Re: draw track across the Dateline in Basemap

Thanks Jeff. I'll explore those options and see what I can do.

Mike


From: Jeff Whitaker <jeffrey.s.whitaker-32lpuo7BZBA@public.gmane.org>
To: matplotlib-users-5NWGOfrQmnetEtDZOKyKiw@public.gmane.orgrge.net; fatuheeva-/E1597aS9LQAvxtiuMwx3w@public.gmane.org
Sent: Tuesday, July 3, 2012 11:21 AM
Subject: Re: [Matplotlib-users] draw track across the Dateline in Basemap

On 7/3/12 11:39 AM, fatuheeva wrote:
Hello,
I am wondering if Basemap has the ability to plot a track across the Dateline? Plotting longitudes that go across the Dateline (e.g., [175,177,179,-179,-176]) wraps the track back around the globe when it goes from 179 to -179. Instead, I want them directly connected. My Basemap instance looks like:

m = Basemap(projection='merc',llcrnrlat = 10,urcrnrlat = 30,llcrnrlon = 160,\
                urcrnrlon = -160,lat_ts = 20,resolution = 'l',lon_0 = 180)

Am I screwed on this one?
Thanks,

Mike

Mike:  There's no automagical way to do this. You either have to shift your map so the dateline is in the middle, or split you track into two segments.

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


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Gmane