本文整理汇总了Python中pykml.factory.KML_ElementMaker.rotation方法的典型用法代码示例。如果您正苦于以下问题:Python KML_ElementMaker.rotation方法的具体用法?Python KML_ElementMaker.rotation怎么用?Python KML_ElementMaker.rotation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pykml.factory.KML_ElementMaker
的用法示例。
在下文中一共展示了KML_ElementMaker.rotation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_cbar_element
# 需要导入模块: from pykml.factory import KML_ElementMaker [as 别名]
# 或者: from pykml.factory.KML_ElementMaker import rotation [as 别名]
def generate_cbar_element(inps):
out_name_base = plot.auto_figure_title(inps.ts_file, inps_dict=vars(inps))
cbar_png_file = '{}_cbar.png'.format(out_name_base)
cbar_png_file = plot_colorbar(out_file=cbar_png_file, vmin=inps.vlim[0], vmax=inps.vlim[1], cmap=inps.colormap)
cbar_overlay = KML.ScreenOverlay(
KML.name('Colorbar'),
KML.Icon(
KML.href("{}".format(cbar_png_file)),
KML.viewBoundScale(0.75)
),
KML.overlayXY(x="0", y="0", xunits="fraction", yunits="fraction"),
KML.screenXY(x="0", y="0", xunits="fraction", yunits="fraction"),
KML.size(x="0", y="250", xunits="pixel", yunits="pixel"),
KML.rotation(0),
KML.visibility(1),
KML.open(0)
)
print('add colorbar.')
return cbar_overlay, cbar_png_file
示例2:
# 需要导入模块: from pykml.factory import KML_ElementMaker [as 别名]
# 或者: from pykml.factory.KML_ElementMaker import rotation [as 别名]
DRAW_LAB.text((int(LEGEND.size[0]/4)+5, POS_V), LAB, font=FONT, fill='rgb(255, 255, 255)')
LEGEND.save(LEGEND_NAME + ".png")
#kml creation
MYKML = KML.kml()
DOC = KML.Document()
MYGO = KML.GroundOverlay(
KML.color('ffffffff'),
KML.Icon(KML.href(CODE_NAME + ".png")),
KML.LatLonBox(
KML.north(str(LATMAX/FRAC_LAT)),
KML.south(str(LATMIN/FRAC_LAT)),
KML.east(str(LONMAX/FRAC_LON)),
KML.west(str(LONMIN/FRAC_LON)),
KML.rotation('0')
)
)
MYSO = KML.ScreenOverlay(
KML.name('Legend'),
KML.Icon(KML.href(LEGEND_NAME + ".png")),
KML.overlayXY(x=".01",y=".99",xunits="fraction",yunits="fraction",),
KML.screenXY(x=".01",y=".99",xunits="fraction",yunits="fraction",),
KML.rotationXY(x="0.5",y="0.5",xunits="fraction",yunits="fraction",),
KML.size(x="0",y="0",xunits="pixels",yunits="pixels",)
)
DOC.append(MYSO)
DOC.append(MYGO)
MYKML.append(DOC)