SurfaceMSLP bundle and plot modle

This commit is contained in:
mjames-upc 2016-08-04 12:51:57 -06:00
parent ea3973cfc7
commit edd6a4b6c6
2 changed files with 104 additions and 0 deletions

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
This_software_product_contains_export-restricted_data_whose
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
an_export_license_or_other_authorization.
Contractor_Name:________Raytheon_Company
Contractor_Address:_____6825_Pine_Street,_Suite_340
________________________Mail_Stop_B8
________________________Omaha,_NE_68106
________________________402.291.0100
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<bundle>
<displayList>
<displays xsi:type="d2DMapRenderableDisplay"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor" currentAnimationMode="Temporal">
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="outlineCapability" outlineWidth="1" outlineOn="true" lineStyle="DEFAULT"/>
<capability xsi:type="magnificationCapability" magnification="2"/>
<capability xsi:type="densityCapability" density=".5"/>
<capability xsi:type="colorableCapability" colorAsString="white"/>
</capabilities>
</loadProperties>
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="plotResourceData" plotSource="Surface Pressures [mb]"
plotModelFile="mslp.svg" spiFile="basemaps/MTR.spi"
isUpdatingOnMetadataOnly="true" retrieveData="false"
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="true" pixelSizeHint="45">
<binOffset posOffset="600" negOffset="600" virtualOffset="0"/>
<metadataMap>
<mapping key="reportType">
<constraint constraintValue="METAR" constraintType="EQUALS" />
</mapping>
<mapping key="pluginName">
<constraint constraintValue="obs" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -0,0 +1,48 @@
<?xml version="1.0"?>
<svg width="80" height="80"
viewBox="0 0 80 80"
overflow="visible"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);">
<defs>
<script type="text/python" plotDelegate="plotDelegate">
import re
class ObsPlotDelegate(PlotDelegate):
def __init__(self):
PlotDelegate.__init__(self)
def getSampleText(self, rec):
sampleString = rec.getString("rawMETAR")
#strip WMO header
sampleString = re.sub("(\\s|\\S)+(METAR)", "\\2", sampleString)
#strip all multiple spaces and replace newlines with spaces
sampleString = re.sub("(\\s)+", " ", sampleString)
return sampleString
plotDelegate = ObsPlotDelegate()
</script>
<style type="text/css">
<![CDATA[
@font-face { font-family: "StandardFont";
src: url(Standard.svg#Standard); }
text.text
{
fill: none;
font-size: 1em;
stroke-width: 1px;
font-family: StandardFont;
font-size: 1em;
}
]]>
</style>
<symbol overflow="visible" id="plotData" class="info">
<text id="pressure" plotMode="text" plotParam="seaLevelPress" plotUnit="dPa" plotFormat="%5.0f" style="text-anchor: start;" x="0px" y="0px">75</text>
</symbol>
</defs>
<use id="mslp" x="40" y="40" width="80" height="80" visibility="visible" xlink:href="#plotData"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB