Seb
2015-05-05 19:54:48 UTC
Hello,
I noticed that a Basemap instance yields 1e30 when projecting lat/lon
NaN coordinates. In the following, nav is a pandas data frame with
navigation coordinates:
llcrnrlon=np.round(np.min(nav['longitude']))
llcrnrlat=np.round(np.min(nav['latitude']))
urcrnrlon=np.round(np.max(nav['longitude']))
urcrnrlat=np.round(np.max(nav['latitude']))
lat_0=(llcrnrlat + urcrnrlat) / 2
lon_0=(llcrnrlon + urcrnrlon) / 2
lat_1=llcrnrlat + ((urcrnrlat - llcrnrlat) / 6)
lat_2=urcrnrlat - ((urcrnrlat - llcrnrlat) / 6)
m=Basemap(projection="aea", lon_0=lon_0, lat_0=lat_0,
lat_1=lat_1, lat_2=lat_2, width=6000000, height=5000000,
resolution="h")
x, y = m(nav['longitude'].values, nav['latitude'].values)
Wherever the coordinates are NaN in the nav object, Basemap projects
them to 1e30 in x and y. Is this a bug in my Debian sid python 2.7.9
version?
Thanks,
I noticed that a Basemap instance yields 1e30 when projecting lat/lon
NaN coordinates. In the following, nav is a pandas data frame with
navigation coordinates:
llcrnrlon=np.round(np.min(nav['longitude']))
llcrnrlat=np.round(np.min(nav['latitude']))
urcrnrlon=np.round(np.max(nav['longitude']))
urcrnrlat=np.round(np.max(nav['latitude']))
lat_0=(llcrnrlat + urcrnrlat) / 2
lon_0=(llcrnrlon + urcrnrlon) / 2
lat_1=llcrnrlat + ((urcrnrlat - llcrnrlat) / 6)
lat_2=urcrnrlat - ((urcrnrlat - llcrnrlat) / 6)
m=Basemap(projection="aea", lon_0=lon_0, lat_0=lat_0,
lat_1=lat_1, lat_2=lat_2, width=6000000, height=5000000,
resolution="h")
x, y = m(nav['longitude'].values, nav['latitude'].values)
Wherever the coordinates are NaN in the nav object, Basemap projects
them to 1e30 in x and y. Is this a bug in my Debian sid python 2.7.9
version?
Thanks,
--
Seb
Seb