gnome.outputters.kmz_templates

templates for the kmz outputter

Module Contents

Functions

build_one_timestep(floating_positions, ...)

Attributes

caveat

header_template

point_template

timestep_header_template

one_run_header

one_run_footer

timestep_footer

footer

gnome.outputters.kmz_templates.caveat = 'This trajectory was produced by GNOME (General NOAA Operational Modeling Environment), and...'
gnome.outputters.kmz_templates.header_template = Multiline-String
Show Value
"""<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>{kml_name}</name>
    <open>1</open>
    <description><![CDATA[<b>Valid for:</b> {valid_timestring}<br>
                          <b>Issued:</b>{issued_timestring} <br>
                          {caveat}]]>
    </description>

    <Style id="RedDotIcon">
      <IconStyle>
         <scale>0.2</scale>
         <color>ff0000ff</color>
         <Icon>
            <href>dot.png</href>
         </Icon>
          <hotSpot x="0.5"  y="0.5" xunits="fraction" yunits="fraction"/>
      </IconStyle>
      <LabelStyle>
         <color>00000000</color>
      </LabelStyle>
    </Style>

    <Style id="BlackDotIcon">
      <IconStyle>
         <scale>0.2</scale>
         <Icon>
            <href>dot.png</href>
         </Icon>
         <color>ff000000</color>
         <hotSpot x="0.5"  y="0.5" xunits="fraction" yunits="fraction"/>
      </IconStyle>
      <LabelStyle>
         <color>00000000</color>
      </LabelStyle>
    </Style>

    <Style id="YellowDotIcon">
      <IconStyle>
         <scale>0.2</scale>
         <Icon>
            <href>dot.png</href>
         </Icon>
         <color>ff00ffff</color>
         <hotSpot x="0.5"  y="0.5" xunits="fraction" yunits="fraction"/>
      </IconStyle>
      <LabelStyle>
         <color>00000000</color>
      </LabelStyle>
    </Style>

    <Style id="RedXIcon">
      <IconStyle>
         <scale>0.2</scale>
         <color>ff0000ff</color>
         <Icon>
            <href>x.png</href>
         </Icon>
          <hotSpot x="0.5"  y="0.5" xunits="fraction" yunits="fraction"/>
      </IconStyle>
      <LabelStyle>
         <color>00000000</color>
      </LabelStyle>
    </Style>

    <Style id="BlackXIcon">
      <IconStyle>
         <scale>0.2</scale>
         <Icon>
            <href>x.png</href>
         </Icon>
         <color>ff000000</color>
         <hotSpot x="0.5"  y="0.5" xunits="fraction" yunits="fraction"/>
      </IconStyle>
      <LabelStyle>
         <color>00000000</color>
      </LabelStyle>
    </Style>

    <Style id="YellowXIcon">
      <IconStyle>
         <scale>0.2</scale>
         <Icon>
            <href>x.png</href>
         </Icon>
         <color>ff00ffff</color>
         <hotSpot x="0.5"  y="0.5" xunits="fraction" yunits="fraction"/>
      </IconStyle>
      <LabelStyle>
         <color>00000000</color>
      </LabelStyle>
    </Style>
"""
gnome.outputters.kmz_templates.point_template = Multiline-String
Show Value
"""             <Point>
                     <altitudeMode>relativeToGround</altitudeMode>
                     <coordinates>{:.6f},{:.6f},1.000000</coordinates>
             </Point>
"""
gnome.outputters.kmz_templates.timestep_header_template = Multiline-String
Show Value
"""<Folder>
  <name>{date_string}:{certain}</name>
"""
gnome.outputters.kmz_templates.one_run_header = Multiline-String
Show Value
"""    <Placemark>
      <name>{certain} {status} Splots </name>
      <styleUrl>{style}</styleUrl>
      <TimeSpan id="ID">
        <begin>{start_time}</begin>     <!-- kml:dateTime -->
        <end>{end_time}</end>         <!-- kml:dateTime -->
      </TimeSpan>
      <MultiGeometry>
"""
Show Value
"""      </MultiGeometry>
    </Placemark>
"""
Show Value
"""
</Folder>
"""
gnome.outputters.kmz_templates.build_one_timestep(floating_positions, beached_positions, start_time, end_time, uncertain)
gnome.outputters.kmz_templates.footer = Multiline-String
Show Value
"""
  </Document>
</kml>
"""