|
From: Dr. P. M. F. <pfe...@ve...> - 2010-01-24 06:59:36
|
I’ve been experimenting with basemap, and have been able to make maps using
the orthographic and polyconic projections. When I try to generate a map
using the geostationary projection, I get the error message shown below. I
haven’t been able to make head or tail of this message; any advice will be
appreciated.
Phillip
RuntimeError Traceback (most recent call last)
C:\Phillip\pmap.py in <module>()
6163
6164 # Create basemap object:
-> 6165 map= Basemap(**map_parms)
6166 ax= fig.add_axes([0.1,0.08,0.7,0.82])
6167
C:\Python25\lib\site-packages\mpl_toolkits\basemap\__init__.pyc in
__init__(self, llcrnrlon, llc
rnrlat, urcrnrlon, urcrnrlat, llcrnrx, llcrnry, urcrnrx, urcrnry, width,
height, projection, res
olution, area_thresh, rsphere, lat_ts, lat_1, lat_2, lat_0, lon_0, lon_1,
lon_2, no_rot, suppres
s_ticks, satellite_height, boundinglat, fix_aspect, anchor, ax)
680
681 # initialize proj4
--> 682 proj =
Proj(projparams,self.llcrnrlon,self.llcrnrlat,self.urcrnrlon,self.urcrnrl
at)
683
684 # make sure axis ticks are suppressed.
C:\Python25\lib\site-packages\mpl_toolkits\basemap\proj.pyc in
__init__(self, projparams, llcrnr
lon, llcrnrlat, urcrnrlon, urcrnrlat, urcrnrislatlon)
117 urcrnry = -llcrnry
118 elif self.projection == 'geos':
--> 119 self._proj4 = pyproj.Proj(projparams)
120 # find major and minor axes of ellipse defining map proj
region.
121 # h is measured from surface of earth at equator.
C:\Python25\lib\site-packages\mpl_toolkits\basemap\pyproj.pyc in
__new__(self, projparams, **kwa
rgs)
146 kvpairs.append(kvpair+' ')
147 projstring = ''.join(kvpairs)
--> 148 return _Proj.__new__(self, projstring)
149
150 def __call__(self, *args, **kw):
C:\Python25\lib\site-packages\mpl_toolkits\basemap\_proj.pyd in
_proj.Proj.__cinit__ (src/_proj.
c:587)()
23
24
---> 25
26
27
RuntimeError: unknown prime meridian conversion id
WARNING: Failure executing file: <pmap.py>
--
View this message in context: http://old.nabble.com/strange-error-when-attempting-to-generate-a-map-using-%27geos%27-projection-tp27292730p27292730.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Jeff W. <js...@fa...> - 2010-01-24 14:06:10
|
Dr. Phillip M. Feldman wrote: > I’ve been experimenting with basemap, and have been able to make maps using > the orthographic and polyconic projections. When I try to generate a map > using the geostationary projection, I get the error message shown below. I > haven’t been able to make head or tail of this message; any advice will be > appreciated. > > Phillip > > RuntimeError Traceback (most recent call last) > > C:\Phillip\pmap.py in <module>() > 6163 > 6164 # Create basemap object: > -> 6165 map= Basemap(**map_parms) > 6166 ax= fig.add_axes([0.1,0.08,0.7,0.82]) > 6167 > > C:\Python25\lib\site-packages\mpl_toolkits\basemap\__init__.pyc in > __init__(self, llcrnrlon, llc > rnrlat, urcrnrlon, urcrnrlat, llcrnrx, llcrnry, urcrnrx, urcrnry, width, > height, projection, res > olution, area_thresh, rsphere, lat_ts, lat_1, lat_2, lat_0, lon_0, lon_1, > lon_2, no_rot, suppres > s_ticks, satellite_height, boundinglat, fix_aspect, anchor, ax) > 680 > 681 # initialize proj4 > --> 682 proj = > Proj(projparams,self.llcrnrlon,self.llcrnrlat,self.urcrnrlon,self.urcrnrl > at) > 683 > 684 # make sure axis ticks are suppressed. > > C:\Python25\lib\site-packages\mpl_toolkits\basemap\proj.pyc in > __init__(self, projparams, llcrnr > lon, llcrnrlat, urcrnrlon, urcrnrlat, urcrnrislatlon) > 117 urcrnry = -llcrnry > 118 elif self.projection == 'geos': > --> 119 self._proj4 = pyproj.Proj(projparams) > 120 # find major and minor axes of ellipse defining map proj > region. > 121 # h is measured from surface of earth at equator. > > C:\Python25\lib\site-packages\mpl_toolkits\basemap\pyproj.pyc in > __new__(self, projparams, **kwa > rgs) > 146 kvpairs.append(kvpair+' ') > 147 projstring = ''.join(kvpairs) > --> 148 return _Proj.__new__(self, projstring) > 149 > 150 def __call__(self, *args, **kw): > > C:\Python25\lib\site-packages\mpl_toolkits\basemap\_proj.pyd in > _proj.Proj.__cinit__ (src/_proj. > c:587)() > 23 > 24 > ---> 25 > 26 > 27 > > RuntimeError: unknown prime meridian conversion id > WARNING: Failure executing file: <pmap.py> > > Philip: That's an error from the proj4 c library saying that it didn't like one of the parameters you used to define the projection. Since you didn't include the parameters you used, I can't say which one is the culprit. -Jeff |
|
From: Dr. P. M. F. <pfe...@ve...> - 2010-01-24 18:25:25
|
Jeff Whitaker wrote: > > <snip> > Philip: That's an error from the proj4 c library saying that it didn't > like one of the parameters you used to define the projection. Since you > didn't include the parameters you used, I can't say which one is the > culprit. > > -Jeff > I've boiled the code down to something small that demonstrates the problem. Thanks! http://old.nabble.com/file/p27297693/temp.py temp.py -- View this message in context: http://old.nabble.com/strange-error-when-attempting-to-generate-a-map-using-%27geos%27-projection-tp27292730p27297693.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Jeff W. <js...@fa...> - 2010-01-25 03:03:16
|
Dr. Phillip M. Feldman wrote: > Jeff Whitaker wrote: > >> <snip> >> Philip: That's an error from the proj4 c library saying that it didn't >> like one of the parameters you used to define the projection. Since you >> didn't include the parameters you used, I can't say which one is the >> culprit. >> >> -Jeff >> >> > > Philip: I believe that lat_0 must be zero for the geostationary projection (you have to be looking down on the equator). I usually leave the lat_0 parameter off entirely, in which case zero is assumed. I'll try to catch that and raise a more insightful error message. -Jeff |
|
From: Phillip M. F. <pfe...@ve...> - 2010-01-25 03:19:00
|
Jeff Whitaker wrote: > Dr. Phillip M. Feldman wrote: >> Jeff Whitaker wrote: >> >>> <snip> >>> Philip: That's an error from the proj4 c library saying that it >>> didn't like one of the parameters you used to define the >>> projection. Since you didn't include the parameters you used, I >>> can't say which one is the culprit. >>> >>> -Jeff >>> >>> >> >> > Philip: I believe that lat_0 must be zero for the geostationary > projection (you have to be looking down on the equator). I usually > leave the lat_0 parameter off entirely, in which case zero is > assumed. I'll try to catch that and raise a more insightful error > message. > > -Jeff > Hm. I suppose that you are right. "Geostationary" does imply that the viewer is 35786.2 km above the equator. What would be more useful is a geosynchronous projection. This would allow the viewer to be located at any latitude. Geostationary is a special case of geosynchronous. Even more useful than a geosynchronous projection is a camera projection that allows one to place the viewer at any location in space (i.e., any latitude and longitude for the nadir point, and any altitude). (I wrote something like this is Fortran 25 years ago). Generalizing the existing geostationary projection to turn it into a camera projection would make it far more useful. I hope that someone will consider making this change. Phillip |