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


Python KML_ElementMaker.colorMode方法代码示例

本文整理汇总了Python中pykml.factory.KML_ElementMaker.colorMode方法的典型用法代码示例。如果您正苦于以下问题:Python KML_ElementMaker.colorMode方法的具体用法?Python KML_ElementMaker.colorMode怎么用?Python KML_ElementMaker.colorMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pykml.factory.KML_ElementMaker的用法示例。


在下文中一共展示了KML_ElementMaker.colorMode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from pykml.factory import KML_ElementMaker [as 别名]
# 或者: from pykml.factory.KML_ElementMaker import colorMode [as 别名]
def main():
    global folder
    namesKML = ['diff_solar','len_pattern', 'frequency']
      
    for nameKML in namesKML:
        folder = KML.Folder()    
        for i in range(1,9):
            style = KML.Style(
                        KML.PolyStyle(
                            KML.color(colors[str(i)]),
                            KML.colorMode('normal')
                            ),
                        id="color"+str(i)
                    )    
            folder.append(style)
        drawPatterns('patternsbyday', nameKML)       
        outfile = open(nameKML+'.kml','wb')
        outfile.write(etree.tostring(folder, pretty_print=True))
        outfile.close()    
开发者ID:edixred,项目名称:Solar,代码行数:21,代码来源:SunMODISPatternsKML.py

示例2: float

# 需要导入模块: from pykml.factory import KML_ElementMaker [as 别名]
# 或者: from pykml.factory.KML_ElementMaker import colorMode [as 别名]
# for row in data:
# 	item.append(dict(zip(fields, row)))

# points = []
# for row in rows:
#        points.append((float(rows[x]['LATITUDE'].strip('"')), float(item[x]['LONGITUDE'].strip('"')), float(item[x][valuetype].strip('"'))))
#        points.append((item[x]['LATITUDE'], item[x]['LONGITUDE'], float(item[x][valuetype].strip('"'))))

doc = KML.Document()
style1 = KML.Style(
    KML.IconStyle(
        KML.scale(0.5),
        KML.color("BF0000FF"),
        KML.Icon(KML.href("http://www.earthpoint.us/Dots/GoogleEarth/WhitePaddle/blu-blank.png")),
    ),
    KML.LabelStyle(KML.color("BF0000FF"), KML.colorMode("normal"), KML.scale(0.65)),
    id="red",
)
doc.append(style1)

style2 = KML.Style(
    KML.IconStyle(
        KML.scale(0.5),
        KML.color("BF00FFFF"),
        KML.Icon(KML.href("http://www.earthpoint.us/Dots/GoogleEarth/WhitePaddle/blu-blank.png")),
    ),
    KML.LabelStyle(KML.color("BF00FFFF"), KML.colorMode("normal"), KML.scale(0.65)),
    id="yellow",
)
doc.append(style2)
开发者ID:blarghmatey,项目名称:myscripts,代码行数:32,代码来源:rssi_db_kml.py

示例3: range

# 需要导入模块: from pykml.factory import KML_ElementMaker [as 别名]
# 或者: from pykml.factory.KML_ElementMaker import colorMode [as 别名]
for x in range(len(item)):
        points.append((float(item[x]['LATITUDE'].strip('"')), float(item[x]['LONGITUDE'].strip('"')), float(item[x][valuetype].strip('"'))))
#        points.append((item[x]['LATITUDE'], item[x]['LONGITUDE'], float(item[x][valuetype].strip('"'))))

doc = KML.Document()
style1 = KML.Style(
		KML.IconStyle(
			KML.scale(0.5),
			KML.color("BF0000FF"),
			KML.Icon(
				KML.href("http://www.earthpoint.us/Dots/GoogleEarth/WhitePaddle/blu-blank.png")
			)
		),
                KML.LabelStyle(
                        KML.color("BF0000FF"),
                        KML.colorMode("normal"),
                        KML.scale(0.65)
                ),
		id="red"
	)
doc.append(style1)

style2 = KML.Style(
                KML.IconStyle(
                        KML.scale(0.5),
                        KML.color("BF00FFFF"),
                        KML.Icon(
                                KML.href("http://www.earthpoint.us/Dots/GoogleEarth/WhitePaddle/blu-blank.png")
                        )
                ),
                KML.LabelStyle(
开发者ID:blarghmatey,项目名称:myscripts,代码行数:33,代码来源:RSSI_KML_creator.py

示例4: check_filetype

# 需要导入模块: from pykml.factory import KML_ElementMaker [as 别名]
# 或者: from pykml.factory.KML_ElementMaker import colorMode [as 别名]
    # Check type of input file
    filename = args.source
    filetype = check_filetype(filename)
    #assert filetype != '' #DEBUG
    if filetype == 'APM':
        read_log = read_apm_log_file
    elif filetype == 'PIX4UAV':
        read_log = read_pix4uav_file

    # Create KML document
    doc = KML.Document(
            KML.Style(
                KML.LineStyle(
                    KML.color(color['blue']),
                    KML.colorMode('normal'),
                    KML.width('4')
                    ),
                KML.PolyStyle(
                    KML.color(color['light_green'])
                    ),
                id='kml_style'
                )
            )

    # Create KML content
    path_data = []
    idx = 1;
    for row in read_log(filename):
        name = row[0]
        lat = row[1]
开发者ID:cfezequiel,项目名称:geotools,代码行数:32,代码来源:genkml.py


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