Hi, I am having some problems using the oblique mercator projection in
basemap.  I want to define a rectangular orthogonal grid, rotated clockwise
by about 13 degrees.  I want to define grid cells of size, say, about 20x20
km.  The script I have so far is below.  The problem is that at some point
(the makegrid step) I lose the rotation, as seen in the plot.

I'd appreciate any help with this, thanks, Evan


from matplotlib.toolkits.basemap import Basemap

M = Basemap(projection = 'omerc',           \
               resolution  = None,                   \
           llcrnrlon  = -43.7,   \
           llcrnrlat   = 14.7,    \
           urcrnrlon = -4.0,    \
           urcrnrlat  = 41.9,    \
           lat_2       = 11.0,    \
           lat_1       = 45.5,    \
           lon_2      = -27.8,   \
           lon_1      = -19.9)

dl = 20000.
nx = int((M.xmax - M.xmin) / dl) + 1
ny = int((M.ymax - M.ymin) / dl) + 1

lonr, latr = M.makegrid(nx, ny)

plot(lonr, latr, 'c.')
show()
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to