本文整理汇总了Python中mpl_toolkits.basemap.Basemap.wmsimage方法的典型用法代码示例。如果您正苦于以下问题:Python Basemap.wmsimage方法的具体用法?Python Basemap.wmsimage怎么用?Python Basemap.wmsimage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mpl_toolkits.basemap.Basemap
的用法示例。
在下文中一共展示了Basemap.wmsimage方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: list
# 需要导入模块: from mpl_toolkits.basemap import Basemap [as 别名]
# 或者: from mpl_toolkits.basemap.Basemap import wmsimage [as 别名]
cs2cs_args = "epsg:26949"
tex_levels = list(np.arange(0,135,5))
ss_level=[0,2.5,5,7.5,10,12.5,15,17.5,20,22.5,25,27.5,30,32.5,35]
fig = plt.figure(figsize=(15,6))
ax = fig.add_subplot(1,5,1)
ax.set_title('50 square pixel')
m = Basemap(projection='merc',
epsg=cs2cs_args.split(':')[1],
llcrnrlon=np.min(glon-0.0009),
llcrnrlat=np.min(glat-0.0006),
urcrnrlon=np.max(glon+0.0009),
urcrnrlat=np.max(glat+0.0009))
m.wmsimage(server='http://grandcanyon.usgs.gov/arcgis/services/Imagery/ColoradoRiverImageryExplorer/MapServer/WmsServer?', layers=['0'], xpixels=1000)
x,y = m.projtran(glon, glat)
im = m.contourf(x,y,ss_data_50.T, cmap='Greys_r',levels=ss_level)
im2 = m.contourf(x, y, tex_data_50.T, alpha=0.4, cmap='YlOrRd', levels=tex_levels)#levels=tex_levels
divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.1)
cax2 = divider.append_axes("right", size="5%", pad=0.3)
cbr = plt.colorbar(im, cax=cax)
cbr2 = plt.colorbar(im2,cax=cax2)
ax1 = fig.add_subplot(1,5,2)
ax1.set_title('70 square pixel')
m1 = Basemap(projection='merc',
epsg=cs2cs_args.split(':')[1],
示例2: Basemap
# 需要导入模块: from mpl_toolkits.basemap import Basemap [as 别名]
# 或者: from mpl_toolkits.basemap.Basemap import wmsimage [as 别名]
lat_min = -60; lat_max = 30.0
# BR
lon_min = -80; lon_max = -30.0
lat_min = -37; lat_max = 13.0
m = Basemap(llcrnrlon=lon_min, urcrnrlat=lat_max,
urcrnrlon=lon_max, llcrnrlat=lat_min,resolution='i',epsg=4326)
m.drawcoastlines(linewidth=0.25)
m.drawcountries(linewidth=0.25)
m.wmsimage(wmsl_oneg['server_url'], xpixels=500,verbose=True,
layers=wmsl_oneg['layers'],
format='image/png',
transparent=True,
alpha=0.5,
)
m.wmsimage(wmsl_br_blt['server_url'], xpixels=500,verbose=True,
layers=wmsl_br_blt['layers'],
format='image/png',
transparent=True,
alpha=0.5,
)
#f = plt.figure()
plt.show()
示例3: Basemap
# 需要导入模块: from mpl_toolkits.basemap import Basemap [as 别名]
# 或者: from mpl_toolkits.basemap.Basemap import wmsimage [as 别名]
# Begin the plot
cs2cs_args = "epsg:26949"
fig = plt.figure(figsize=(15, 12))
ax = plt.subplot2grid((5, 2), (0, 0), rowspan=4)
ax.set_title("R02028: 3 meter grid")
m = Basemap(
projection="merc",
epsg=cs2cs_args.split(":")[1],
llcrnrlon=np.nanmin(r28_lon) - 0.0004,
llcrnrlat=np.nanmin(r28_lat) - 0.0004,
urcrnrlon=np.nanmax(r28_lon) + 0.0004,
urcrnrlat=np.nanmax(r28_lat) + 0.0004,
)
m.wmsimage(
server="http://grandcanyon.usgs.gov/arcgis/services/Imagery/ColoradoRiverImageryExplorer/MapServer/WmsServer?",
layers=["3"],
xpixels=1000,
)
x, y = m.projtran(r28_lon, r28_lat)
im = m.contourf(x, y, R02028.T, cmap="Greys_r", levels=ss_level)
divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.1)
cbr = plt.colorbar(im, cax=cax)
m.readshapefile(
r"C:\workspace\Reach_4a\Multibeam\mb_sed_class\output\shapefiles\may2014_3m_buff_geo", "layer", drawbounds=False
)
# sand, sand/gravel, gravel, sand/rock, rock
s_patch, sg_patch, g_patch, sr_patch, r_patch, = [], [], [], [], []
bound = max(stat["count"] for stat in z_stats_28)
for info, shape in zip(m.layer_info, m.layer):
if info["substrate"] == "sand" and info["count_28"] == bound:
示例4: Basemap
# 需要导入模块: from mpl_toolkits.basemap import Basemap [as 别名]
# 或者: from mpl_toolkits.basemap.Basemap import wmsimage [as 别名]
from mpl_toolkits.basemap import Basemap, pyproj
from datetime import datetime
import numpy as np
import matplotlib.pyplot as plt
serverurl='http://motherlode.ucar.edu:8080/thredds/wms/fmrc/NCEP/NAM/CONUS_12km/NCEP-NAM-CONUS_12km-noaaport_best.ncd?'
lon_min = -118.8; lon_max = -108.6
lat_min = 22.15; lat_max = 32.34
m = Basemap(llcrnrlon=lon_min, urcrnrlat=lat_max,
urcrnrlon=lon_max, llcrnrlat=lat_min,resolution='i',epsg=4326)
plt.figure()
m.wmsimage(serverurl,xpixels=500,verbose=True,
layers=['Temperature_height_above_ground'],
styles=['boxfill/rainbow'],
time=datetime.utcnow().strftime('%Y-%m-%dT00:00:00.000Z'),
elevation='2',
colorscalerange='271.2,308',numcolorbands='20',logscale=False)
m.drawcoastlines(linewidth=0.25)
parallels = np.arange(20,36,2.)
a=m.drawparallels(parallels,labels=[1,0,0,0],fontsize=10)
meridians = np.arange(-120,-100,2.)
b=m.drawmeridians(meridians,labels=[0,0,0,1],fontsize=10)
epsg = 32661
m = Basemap(epsg=epsg, resolution='l',width=20000.e3,height=20000.e3)
plt.figure()
m.wmsimage(serverurl,xpixels=500,
layers=['Temperature_height_above_ground'],
styles=['boxfill/rainbow'],
time=datetime.utcnow().strftime('%Y-%m-%dT00:00:00.000Z'),
示例5: trans
# 需要导入模块: from mpl_toolkits.basemap import Basemap [as 别名]
# 或者: from mpl_toolkits.basemap.Basemap import wmsimage [as 别名]
print 'Now plotting September 2014...'
#ortho_lon, ortho_lat = trans(ortho_x, ortho_y, inverse=True)
cs2cs_args = "epsg:26949"
ss_level=[0,2.5,5,7.5,10,12.5,15,17.5,20,22.5,25,27.5,30,32.5,35]
fig = plt.figure(figsize=(15,12))
ax = plt.subplot2grid((10,2),(0, 0),rowspan=9)
ax.set_title('September 2014 \n R01767')
m = Basemap(projection='merc',
epsg=cs2cs_args.split(':')[1],
llcrnrlon=np.min(glon) - 0.0002,
llcrnrlat=np.min(glat) - 0.0006,
urcrnrlon=np.max(glon) + 0.0002,
urcrnrlat=np.max(glat) + 0.0006)
m.wmsimage(server=wms_url, layers=['3'], xpixels=1000)
x,y = m.projtran(glon, glat)
im = m.contourf(x,y,data.T, cmap='Greys_r',levels=ss_level)
divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.05)
cbr = plt.colorbar(im, cax=cax)
cbr.set_label('Sidescan Intensity [dBW]', size=10)
#read shapefile and create polygon collections
##NOTE: Shapefile has to be in WGS84
m.readshapefile( r"C:\workspace\Merged_SS\window_analysis\shapefiles\tex_seg_2014_09_67_geo","layer",drawbounds = False)
#sand, sand/gravel, gravel/sand, ledge, gravel, gravel/boulders, boulders, boulder
s_patch, g_patch, b_patch =[],[],[]
for info, shape in zip(m.layer_info, m.layer):
示例6: Basemap
# 需要导入模块: from mpl_toolkits.basemap import Basemap [as 别名]
# 或者: from mpl_toolkits.basemap.Basemap import wmsimage [as 别名]
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
map = Basemap(llcrnrlon=8.35,llcrnrlat=41.225,urcrnrlon=10.01,urcrnrlat=43.108,
projection='cyl', epsg=4326)
wms_server = "http://www.ga.gov.au/gis/services/topography/Australian_Topography/MapServer/WMSServer"
wms_server = "http://wms.geosignal.fr/metropole?"
map.wmsimage(wms_server, layers=["Communes", "Nationales", "Regions"], verbose=True)
plt.show()