本文整理汇总了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()
示例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)
示例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(
示例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]