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

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

···

Ross.Wilson@...2808... 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
  

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

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

···

Ross.Wilson@...2808... 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
  

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