当前位置: 首页>>代码示例>>Python>>正文


Python KML_ElementMaker.rotation方法代码示例

本文整理汇总了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
开发者ID:hfattahi,项目名称:PySAR,代码行数:23,代码来源:save_kmz_timeseries.py

示例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)
开发者ID:ludomentis,项目名称:repostory,代码行数:32,代码来源:gehm.py


注:本文中的pykml.factory.KML_ElementMaker.rotation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。