[Matplotlib-users] Basemap.pyproj: towgs84

2009-01-16 Thread Stephane Raynaud
Hi,

it seems that pyproj.Proj does not take into account the towgs84 optional
parameter.
Here is what I simply tried:

from mpl_toolkits.basemap import *
lonref = -3.
latref = 47.

kwproj  = dict(proj=lcc,  a=6378249.2, b=6356515., x_0=60.,
y_0=20.,
lon_0=2d20'14.025, lat_0=46d48',  lat_1=45d53'56.108,
lat_2=47d41'45.652)
print pyproj.Proj(**kwproj)(lonref, latref)

kwproj.update(towgs84=-168,-60,+320)
print pyproj.Proj(**kwproj)(lonref, latref)

Both transforms give the same result.

Try the same parameters with cs2cs changes the results as expected.
Did I miss something?

--
Stephane Raynaud
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Basemap.pyproj: towgs84

2009-01-16 Thread Jeff Whitaker
Stephane Raynaud wrote:
 Hi,

 it seems that pyproj.Proj does not take into account the towgs84 
 optional parameter.
 Here is what I simply tried:

 from mpl_toolkits.basemap import *
 lonref = -3.
 latref = 47.

 kwproj  = dict(proj=lcc,  a=6378249.2, b=6356515., x_0=60.,  
 y_0=20.,
 lon_0=2d20'14.025, lat_0=46d48',  lat_1=45d53'56.108, 
 lat_2=47d41'45.652)
 print pyproj.Proj(**kwproj)(lonref, latref)

 kwproj.update(towgs84=-168,-60,+320)
 print pyproj.Proj(**kwproj)(lonref, latref)

 Both transforms give the same result.

 Try the same parameters with cs2cs changes the results as expected.
 Did I miss something?

 --
 Stephane Raynaud

Stephanie:  All the arguments you pass to the Proj instance were used.  
I don't pretend to understand what's supposed to be happening here, but  
I guess you are mis-specifying or mis-interpreting some of the proj 
arguments.  The command-line version of proj gives the same answer:

 echo -3.0 47.0 | proj +proj='lcc' +units=m +a=6378249.2 
+lon_0=2d20'14.025 +y_0=20.0 +b=6356515.0  +x_0=60.0 
+lat_2=47d41'45.652 +lat_1=45d53'56.108 +lat_0=46d48'
194411.84   236007.03

echo -3.0 47.0 | proj +proj='lcc' +units=m +a=6378249.2 
+lon_0=2d20'14.025 +y_0=20.0 +b=6356515.0 +x_0=60.0 
+lat_2=47d41'45.652 +lat_1=45d53'56.108 +lat_0=46d48' 
+towgs84=-168,-60,+320
194411.84   236007.03

-Jeff

-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users