drawmapscale() and 'cyl' projection [SEC=UNCLASSIFIED]

View: New views
4 Messages — Rating Filter:   Alert me  

drawmapscale() and 'cyl' projection [SEC=UNCLASSIFIED]

by Ross.Wilson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

Sorry if this has been discussed before, but I can't find any previous threads on this.

I'm trying to draw a scale on an equidistant cylindrical projection, and I'm seeing a ValueError exception with the message:
    Cannot draw map scale for projection='cyl'

And indeed, in basemap/__init__.py (about line 3286, 0.99.4) there is an explicit test for the 'cyl' projection and a raise of the above exception.

Maybe I'm just extra ignorant today, but why *shouldn't* a scale be drawn on a 'cyl' projection????

Thanks,
Ross


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Re: drawmapscale() and 'cyl' projection [SEC=UNCLASSIFIED]

by Jeff Whitaker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ross.Wilson@... wrote:

> Hi all,
>
> Sorry if this has been discussed before, but I can't find any previous threads on this.
>
> I'm trying to draw a scale on an equidistant cylindrical projection, and I'm seeing a ValueError exception with the message:
>     Cannot draw map scale for projection='cyl'
>
> And indeed, in basemap/__init__.py (about line 3286, 0.99.4) there is an explicit test for the 'cyl' projection and a raise of the above exception.
>
> Maybe I'm just extra ignorant today, but why *shouldn't* a scale be drawn on a 'cyl' projection????
>
> Thanks,
> Ross
>  
Ross: Because a cylindrical projection isn't really a projection at all
- it's just a lat/lon coordinate system.

-Jeff

--
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


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Re: drawmapscale() and 'cyl' projection [SEC=UNCLASSIFIED]

by Ross.Wilson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----Original Message-----
<snip>
> Maybe I'm just extra ignorant today, but why *shouldn't* a scale be drawn on a 'cyl' projection????
>
<snip>

Ross: Because a cylindrical projection isn't really a projection at all
- it's just a lat/lon coordinate system.

-Jeff

<snip>
-----Original Message-----

Hi Jeff,

Yes, surely, cylindrical isn't a real hairy-chested projection like Mercator, et al, yet I can create a map with the 'Equidistant Cylindrical Projection' and a scale has just as much meaning on a cylindrical 'projection' as any other.

That is, the semantics of the drawmapscale() method have meaning, even in cyclindrical: "draw an annotation at this point representing the scale at that other _point_".  Yes, as you move away from the point the scale annotation is representing the errors grow, but that is true of many projections. True, the errors for cylindrical projections get rather large, especially in the higher latitudes, but that just means the creator/user must understand the limitations.

Ross

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Re: drawmapscale() and 'cyl' projection [SEC=UNCLASSIFIED]

by Jeff Whitaker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ross.Wilson@... wrote:

> -----Original Message-----
> <snip>
>  
>> Maybe I'm just extra ignorant today, but why *shouldn't* a scale be drawn on a 'cyl' projection????
>>
>>    
> <snip>
>
> Ross: Because a cylindrical projection isn't really a projection at all
> - it's just a lat/lon coordinate system.
>
> -Jeff
>
> <snip>
> -----Original Message-----
>
> Hi Jeff,
>
> Yes, surely, cylindrical isn't a real hairy-chested projection like Mercator, et al, yet I can create a map with the 'Equidistant Cylindrical Projection' and a scale has just as much meaning on a cylindrical 'projection' as any other.
>
> That is, the semantics of the drawmapscale() method have meaning, even in cyclindrical: "draw an annotation at this point representing the scale at that other _point_".  Yes, as you move away from the point the scale annotation is representing the errors grow, but that is true of many projections. True, the errors for cylindrical projections get rather large, especially in the higher latitudes, but that just means the creator/user must understand the limitations.
>
> Ross
>  
Ross:   You're right, I guess the real reason is that when you create a
basemap instance with projection='cyl', then do

x,y = map(lon, lat) # map is a Basemap instance for projection='cyl'

nothing happens - that is x,y are still longitudes and latitudes in
degrees.  So, there is nothing from which to compute a map scale, since
no projection is happening.

-Jeff


--
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


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users