Omaha #3333 added grid lightning to cave
Change-Id: I4e5d21c39168bac285125a39fd148fe69906f221 Former-commit-id: 33736a713a2c360e70f5a06972a7a21937f2b34c
This commit is contained in:
parent
9eb9abd3f4
commit
29fc7e7ec4
17 changed files with 1839 additions and 407 deletions
|
@ -2,12 +2,18 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Lightning Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.lightning;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.14.1.qualifier
|
||||
Bundle-Vendor: Raytheon
|
||||
Require-Bundle: com.raytheon.uf.common.dataplugin.binlightning;bundle-version="1.0.0",
|
||||
com.raytheon.viz.core,
|
||||
com.raytheon.viz.ui
|
||||
com.raytheon.viz.ui,
|
||||
com.raytheon.viz.grid;bundle-version="1.14.0",
|
||||
com.raytheon.uf.common.style;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.colormap;bundle-version="1.14.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.viz.lightning
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Import-Package: com.raytheon.uf.viz.productbrowser
|
||||
Import-Package: com.raytheon.uf.common.numeric.buffer,
|
||||
com.raytheon.uf.common.numeric.filter,
|
||||
com.raytheon.uf.common.numeric.source,
|
||||
com.raytheon.uf.viz.productbrowser
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
<?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">
|
||||
<resource>
|
||||
<loadProperties xsi:type="gridLoadProperties" loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="gridLightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="true" handlingNegativeStrikes="true"
|
||||
handlingPulses="false" handlingCloudFlashes="false"
|
||||
kmResolution="${resolution}">
|
||||
<binOffset posOffset="0" negOffset="${negOffset}" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
</bundle>
|
|
@ -0,0 +1,50 @@
|
|||
<?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">
|
||||
<resource>
|
||||
<loadProperties xsi:type="gridLoadProperties" loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="gridLightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="false" handlingCloudFlashes="true"
|
||||
kmResolution="${resolution}">
|
||||
<binOffset posOffset="0" negOffset="${negOffset}" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
</bundle>
|
|
@ -0,0 +1,50 @@
|
|||
<?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">
|
||||
<resource>
|
||||
<loadProperties xsi:type="gridLoadProperties" loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="gridLightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="true" handlingCloudFlashes="false"
|
||||
kmResolution="${resolution}">
|
||||
<binOffset posOffset="0" negOffset="${negOffset}" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
</bundle>
|
|
@ -0,0 +1,50 @@
|
|||
<?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">
|
||||
<resource>
|
||||
<loadProperties xsi:type="gridLoadProperties" loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="gridLightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="true" handlingNegativeStrikes="true"
|
||||
handlingPulses="false" handlingCloudFlashes="true"
|
||||
kmResolution="${resolution}">
|
||||
<binOffset posOffset="0" negOffset="${negOffset}" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
</bundle>
|
|
@ -0,0 +1,74 @@
|
|||
<?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.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCGPlot.xml"
|
||||
menuText="60min cloud to ground density" id="1HrGridLightningCGPlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCloudFlashPlot.xml"
|
||||
menuText="60min cloud flash density" id="1HrGridLightningCloudFlashPlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningTotalFlashPlot.xml"
|
||||
menuText="60min total flash density" id="1HrGridLightningFlashPlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningPulsePlot.xml"
|
||||
menuText="60min pulse density" id="1HrGridLightningPulsePlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCGPlot.xml"
|
||||
menuText="15min cloud to ground density" id="1HrGridLightningCGPlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCloudFlashPlot.xml"
|
||||
menuText="15min cloud flash density" id="1HrGridLightningCloudFlashPlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningTotalFlashPlot.xml"
|
||||
menuText="15min total flash density" id="1HrGridLightningFlashPlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningPulsePlot.xml"
|
||||
menuText="15min pulse density" id="1HrGridLightningPulsePlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCGPlot.xml"
|
||||
menuText="5min cloud to ground density" id="1HrGridLightningCGPlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCloudFlashPlot.xml"
|
||||
menuText="5min cloud flash density" id="1HrGridLightningCloudFlashPlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningTotalFlashPlot.xml"
|
||||
menuText="5min total flash density" id="1HrGridLightningFlashPlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningPulsePlot.xml"
|
||||
menuText="5min pulse density" id="1HrGridLightningPulsePlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
|
||||
</menuTemplate>
|
|
@ -0,0 +1,52 @@
|
|||
<?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.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="subMenu" menuText="1km" id="1kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="1" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="3km" id="3kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="3" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="5km" id="5kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="5" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="8km" id="8kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="8" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="20km" id="20kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="20" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="40km" id="40kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="40" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
</menuTemplate>
|
|
@ -24,14 +24,29 @@
|
|||
<substitute key="source" value="NLDN"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="NLDN Grid" id="entlnGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningMenuItems.xml">
|
||||
<substitute key="source" value="NLDN"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="GLD" id="GLDSubMenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gldLightningBundleItems.xml">
|
||||
<substitute key="source" value="GLD"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="GLD Grid" id="entlnGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningMenuItems.xml">
|
||||
<substitute key="source" value="GLD"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Total Lightning" id="ENTLNSubMenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/entlnLightningBundleItems.xml">
|
||||
<substitute key="source" value="ENTLN"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Total Lightning Grid" id="entlnGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningMenuItems.xml">
|
||||
<substitute key="source" value="ENTLN"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
</menuTemplate>
|
|
@ -29,6 +29,13 @@
|
|||
renderingOrderId="PLOT"
|
||||
resourceType="PLAN_VIEW">
|
||||
</resource>
|
||||
<resource
|
||||
class="com.raytheon.viz.lightning.GridLightningResource"
|
||||
name="GridLightning"
|
||||
recordClass="com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord"
|
||||
renderingOrderId="PLOT"
|
||||
resourceType="PLAN_VIEW">
|
||||
</resource>
|
||||
</extension>
|
||||
|
||||
<extension
|
||||
|
|
|
@ -0,0 +1,343 @@
|
|||
/**
|
||||
* 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.
|
||||
**/
|
||||
package com.raytheon.viz.lightning;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||
import org.geotools.coverage.grid.GridEnvelope2D;
|
||||
import org.geotools.geometry.DirectPosition2D;
|
||||
import org.geotools.referencing.operation.DefaultMathTransformFactory;
|
||||
import org.opengis.coverage.grid.GridEnvelope;
|
||||
import org.opengis.geometry.Envelope;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
import org.opengis.referencing.cs.CoordinateSystemAxis;
|
||||
import org.opengis.referencing.datum.PixelInCell;
|
||||
import org.opengis.referencing.operation.MathTransform;
|
||||
|
||||
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.numeric.buffer.ShortBufferWrapper;
|
||||
import com.raytheon.uf.common.numeric.filter.UnsignedFilter;
|
||||
import com.raytheon.uf.common.style.ParamLevelMatchCriteria;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.cache.CacheObject;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.viz.grid.rsc.general.AbstractGridResource;
|
||||
import com.raytheon.viz.grid.rsc.general.GeneralGridData;
|
||||
import com.raytheon.viz.lightning.cache.LightningFrame;
|
||||
import com.raytheon.viz.lightning.cache.LightningFrameMetadata;
|
||||
import com.raytheon.viz.lightning.cache.LightningFrameRetriever;
|
||||
|
||||
/**
|
||||
* Resource to render lightning point data as contours and images
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 7, 2014 3333 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class GridLightningResource extends
|
||||
AbstractGridResource<GridLightningResourceData> {
|
||||
|
||||
public static final String DENSITY_PARAM = "lightning density";
|
||||
|
||||
private final Map<DataTime, CacheObject<LightningFrameMetadata, LightningFrame>> cacheObjectMap = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* @param resourceData
|
||||
* @param loadProperties
|
||||
*/
|
||||
protected GridLightningResource(GridLightningResourceData resourceData,
|
||||
LoadProperties loadProperties) {
|
||||
super(resourceData, loadProperties);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.grid.rsc.general.AbstractGridResource#getMatchCriteria()
|
||||
*/
|
||||
@Override
|
||||
public ParamLevelMatchCriteria getMatchCriteria() {
|
||||
ParamLevelMatchCriteria rval = new ParamLevelMatchCriteria();
|
||||
rval.setParameterName(Arrays.asList(DENSITY_PARAM));
|
||||
return rval;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.grid.rsc.general.AbstractGridResource#
|
||||
* createColorMapParameters
|
||||
* (com.raytheon.viz.grid.rsc.general.GeneralGridData)
|
||||
*/
|
||||
@Override
|
||||
protected ColorMapParameters createColorMapParameters(GeneralGridData data)
|
||||
throws VizException {
|
||||
ColorMapParameters rval = super.createColorMapParameters(data);
|
||||
rval.setNoDataValue(0);
|
||||
return rval;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.grid.rsc.general.AbstractGridResource#disposeInternal()
|
||||
*/
|
||||
@Override
|
||||
protected void disposeInternal() {
|
||||
cacheObjectMap.clear();
|
||||
super.disposeInternal();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.grid.rsc.general.AbstractGridResource#remove(com.raytheon
|
||||
* .uf.common.time.DataTime)
|
||||
*/
|
||||
@Override
|
||||
public void remove(DataTime dataTime) {
|
||||
cacheObjectMap.remove(dataTime);
|
||||
super.remove(dataTime);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.grid.rsc.general.AbstractGridResource#getData(com.raytheon
|
||||
* .uf.common.time.DataTime, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public List<GeneralGridData> getData(DataTime time,
|
||||
List<PluginDataObject> pdos) throws VizException {
|
||||
CoordinateReferenceSystem crs = descriptor.getCRS();
|
||||
GeneralGridGeometry gridGeom = descriptor.getGridGeometry();
|
||||
int kmResolution = resourceData.getKmResolution();
|
||||
/* convert to meters to match projection dimension units */
|
||||
int mResolution = kmResolution * 1000;
|
||||
int nx = getAxisDimension(0, mResolution);
|
||||
int ny = getAxisDimension(1, mResolution);
|
||||
GridEnvelope gridRange = new GridEnvelope2D(0, 0, nx, ny);
|
||||
GeneralGridGeometry imageGeometry = new GeneralGridGeometry(gridRange,
|
||||
gridGeom.getEnvelope());
|
||||
|
||||
MathTransform latLonToGrid = getLonLatTransform(crs, imageGeometry);
|
||||
|
||||
/*
|
||||
* use shorts to save space, a grid cell is unlikely to contain over 64K
|
||||
* strikes
|
||||
*/
|
||||
short[] data = new short[nx * ny];
|
||||
|
||||
LightningFrame frame = getFrame(time, pdos);
|
||||
|
||||
List<Iterator<double[]>> iterators = new ArrayList<>(4);
|
||||
if (resourceData.isHandlingPositiveStrikes()) {
|
||||
iterators.add(frame.getPosLatLonList().iterator());
|
||||
}
|
||||
if (resourceData.isHandlingNegativeStrikes()) {
|
||||
iterators.add(frame.getNegLatLonList().iterator());
|
||||
}
|
||||
if (resourceData.isHandlingCloudFlashes()) {
|
||||
iterators.add(frame.getCloudLatLonList().iterator());
|
||||
}
|
||||
if (resourceData.isHandlingPulses()) {
|
||||
iterators.add(frame.getPulseLatLonList().iterator());
|
||||
}
|
||||
|
||||
for (Iterator<double[]> iter : iterators) {
|
||||
while (iter.hasNext()) {
|
||||
double[] lonLat = iter.next();
|
||||
DirectPosition2D src = new DirectPosition2D(lonLat[0],
|
||||
lonLat[1]);
|
||||
DirectPosition2D dest = new DirectPosition2D();
|
||||
try {
|
||||
latLonToGrid.transform(src, dest);
|
||||
} catch (Exception e) {
|
||||
throw new VizException(e.getLocalizedMessage(), e);
|
||||
}
|
||||
int gridX = (int) Math.round(dest.x);
|
||||
int gridY = (int) Math.round(dest.y);
|
||||
int index = (nx * gridY) + gridX;
|
||||
if (index < data.length) {
|
||||
data[(nx * gridY) + gridX] += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ShortBufferWrapper source = new ShortBufferWrapper(data, nx, ny);
|
||||
GeneralGridData gridData = GeneralGridData.createScalarData(
|
||||
imageGeometry, UnsignedFilter.apply(source), Unit.ONE);
|
||||
return Arrays.asList(gridData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated frame from cache
|
||||
*
|
||||
* @param time
|
||||
* @param pdos
|
||||
* @return
|
||||
*/
|
||||
private LightningFrame getFrame(DataTime time, List<PluginDataObject> pdos) {
|
||||
LightningFrameRetriever retriever = LightningFrameRetriever
|
||||
.getInstance();
|
||||
CacheObject<LightningFrameMetadata, LightningFrame> co;
|
||||
synchronized (cacheObjectMap) {
|
||||
co = cacheObjectMap.get(time);
|
||||
if (co == null) {
|
||||
/*
|
||||
* no local reference to cache object, create key and get cache
|
||||
* object which may be new or from another resource
|
||||
*/
|
||||
LightningFrameMetadata key = new LightningFrameMetadata(time,
|
||||
resourceData.getBinOffset());
|
||||
co = CacheObject.newCacheObject(key, retriever);
|
||||
cacheObjectMap.put(time, co);
|
||||
}
|
||||
}
|
||||
|
||||
return retriever.updateAndGet(ensurePdoType(pdos), co);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pdos
|
||||
* @return list of all BinLightningRecords in pdos
|
||||
*/
|
||||
private List<BinLightningRecord> ensurePdoType(List<PluginDataObject> pdos) {
|
||||
List<BinLightningRecord> rval = new ArrayList<>(pdos.size());
|
||||
for (PluginDataObject pdo : pdos) {
|
||||
if (pdo instanceof BinLightningRecord) {
|
||||
rval.add((BinLightningRecord) pdo);
|
||||
}
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get grid dimension for ordinal axis using the provided resolution. Uses
|
||||
* the CRS and grid geometry of the descriptor.
|
||||
*
|
||||
* @param axis
|
||||
* 0 for x, 1 for y
|
||||
* @param mResolution
|
||||
* in meters
|
||||
* @return
|
||||
*/
|
||||
private int getAxisDimension(int axis, int mResolution) {
|
||||
CoordinateReferenceSystem crs = descriptor.getCRS();
|
||||
GeneralGridGeometry gridGeometry = descriptor.getGridGeometry();
|
||||
CoordinateSystemAxis csa = crs.getCoordinateSystem().getAxis(axis);
|
||||
Unit<?> crsUnit = csa.getUnit();
|
||||
UnitConverter converter = crsUnit.getConverterTo(SI.METER);
|
||||
Envelope env = gridGeometry.getEnvelope();
|
||||
return (int) Math.round(converter.convert(env.getSpan(axis))
|
||||
/ mResolution);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new transform from lon/lat to grid coordinates
|
||||
*
|
||||
* @param crs
|
||||
* coordinate reference system of display
|
||||
* @param gridGeom
|
||||
* target grid geometry
|
||||
* @return
|
||||
* @throws VizException
|
||||
*/
|
||||
private MathTransform getLonLatTransform(CoordinateReferenceSystem crs,
|
||||
GeneralGridGeometry gridGeom)
|
||||
throws VizException {
|
||||
try {
|
||||
MathTransform latLonToCrs = MapUtil.getTransformFromLatLon(crs);
|
||||
MathTransform crsToGrid = gridGeom.getGridToCRS(
|
||||
PixelInCell.CELL_CENTER).inverse();
|
||||
DefaultMathTransformFactory dmtf = new DefaultMathTransformFactory();
|
||||
return dmtf.createConcatenatedTransform(
|
||||
latLonToCrs, crsToGrid);
|
||||
} catch (Exception e) {
|
||||
throw new VizException(
|
||||
"Problem converting from lon/lat to requested grid geometry",
|
||||
e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all plugin data objects to resource
|
||||
*
|
||||
* @param pdos
|
||||
*/
|
||||
public void add(List<PluginDataObject> pdos) {
|
||||
for (PluginDataObject pdo : pdos) {
|
||||
addDataObject(pdo);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.core.rsc.AbstractVizResource#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
int res = resourceData.getKmResolution();
|
||||
return LightningResource.formatResourceName(resourceData)
|
||||
+ "Lightning " + res + "km Grid ";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.grid.rsc.general.AbstractGridResource#project(org.opengis
|
||||
* .referencing.crs.CoordinateReferenceSystem)
|
||||
*/
|
||||
@Override
|
||||
public void project(CoordinateReferenceSystem crs) throws VizException {
|
||||
clearRequestedData();
|
||||
super.project(crs);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
/**
|
||||
* 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.
|
||||
**/
|
||||
package com.raytheon.viz.lightning;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
|
||||
/**
|
||||
* Configuration data needed to render lightning as grids
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 7, 2014 3333 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class GridLightningResourceData extends LightningResourceData {
|
||||
|
||||
@XmlAttribute
|
||||
/* defaults to 40km if not specified in bundle */
|
||||
private int kmResolution = 40;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.lightning.LightningResourceData#constructResource(com
|
||||
* .raytheon.uf.viz.core.rsc.LoadProperties,
|
||||
* com.raytheon.uf.common.dataplugin.PluginDataObject[])
|
||||
*/
|
||||
@Override
|
||||
protected AbstractVizResource<?, ?> constructResource(
|
||||
LoadProperties loadProperties, PluginDataObject[] objects) {
|
||||
GridLightningResource rval = new GridLightningResource(this,
|
||||
loadProperties);
|
||||
rval.add(Arrays.asList(objects));
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the kmResolution
|
||||
*/
|
||||
public int getKmResolution() {
|
||||
return kmResolution;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param kmResolution
|
||||
* the kmResolution to set
|
||||
*/
|
||||
public void setKmResolution(int kmResolution) {
|
||||
this.kmResolution = kmResolution;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + kmResolution;
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (!super.equals(obj))
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
GridLightningResourceData other = (GridLightningResourceData) obj;
|
||||
if (kmResolution != other.kmResolution)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -20,11 +20,8 @@
|
|||
package com.raytheon.viz.lightning;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -33,28 +30,13 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.HDF5Util;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.LightningConstants;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgStrikeType;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
||||
import com.raytheon.uf.common.datastorage.IDataStore;
|
||||
import com.raytheon.uf.common.datastorage.Request;
|
||||
import com.raytheon.uf.common.datastorage.StorageException;
|
||||
import com.raytheon.uf.common.datastorage.records.ByteDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.IDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.IntegerDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.LongDataRecord;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.BinOffset;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.core.DrawableString;
|
||||
import com.raytheon.uf.viz.core.IExtent;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
|
@ -63,7 +45,6 @@ import com.raytheon.uf.viz.core.IGraphicsTarget.PointStyle;
|
|||
import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.cache.CacheObject;
|
||||
import com.raytheon.uf.viz.core.cache.CacheObject.IObjectRetrieverAndDisposer;
|
||||
import com.raytheon.uf.viz.core.drawables.IFont;
|
||||
import com.raytheon.uf.viz.core.drawables.IFont.Style;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
|
@ -76,6 +57,9 @@ import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
|||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.DensityCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability;
|
||||
import com.raytheon.viz.lightning.cache.LightningFrame;
|
||||
import com.raytheon.viz.lightning.cache.LightningFrameMetadata;
|
||||
import com.raytheon.viz.lightning.cache.LightningFrameRetriever;
|
||||
|
||||
/**
|
||||
* LightningResource
|
||||
|
@ -104,6 +88,8 @@ import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability;
|
|||
* Jun 06, 2014 DR 17367 D. Friedman Fix cache object usage.
|
||||
* Jun 19, 2014 3214 bclement added pulse and cloud flash support
|
||||
* Jul 07, 2014 3333 bclement removed lightSource field
|
||||
* Jul 10, 2014 3333 bclement moved cache object inner classes to own package
|
||||
* moved name formatting to static method
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -114,124 +100,6 @@ public class LightningResource extends
|
|||
AbstractVizResource<LightningResourceData, IMapDescriptor> implements
|
||||
IResourceDataChanged {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(LightningResource.class);
|
||||
|
||||
private static class LightningFrame {
|
||||
|
||||
public LightningFrameMetadata metadata;
|
||||
|
||||
public DataTime frameTime;
|
||||
|
||||
public List<double[]> posLatLonList = new ArrayList<double[]>();
|
||||
|
||||
public List<double[]> negLatLonList = new ArrayList<double[]>();
|
||||
|
||||
public List<double[]> cloudLatLonList = new ArrayList<double[]>();
|
||||
|
||||
public List<double[]> pulseLatLonList = new ArrayList<double[]>();
|
||||
}
|
||||
|
||||
private static class LightningFrameMetadata {
|
||||
|
||||
private BinOffset offset;
|
||||
|
||||
private DataTime frameTime;
|
||||
|
||||
private List<BinLightningRecord> newRecords = new ArrayList<BinLightningRecord>();
|
||||
|
||||
private List<BinLightningRecord> processed = new ArrayList<BinLightningRecord>();
|
||||
|
||||
public LightningFrameMetadata(DataTime frameTime, BinOffset offset) {
|
||||
this.frameTime = frameTime;
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((frameTime == null) ? 0 : frameTime.hashCode());
|
||||
result = prime * result
|
||||
+ ((offset == null) ? 0 : offset.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
LightningFrameMetadata other = (LightningFrameMetadata) obj;
|
||||
if (frameTime == null) {
|
||||
if (other.frameTime != null)
|
||||
return false;
|
||||
} else if (!frameTime.equals(other.frameTime))
|
||||
return false;
|
||||
if (offset == null) {
|
||||
if (other.offset != null)
|
||||
return false;
|
||||
} else if (!offset.equals(other.offset))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class LightningFrameRetriever implements
|
||||
IObjectRetrieverAndDisposer<LightningFrameMetadata, LightningFrame> {
|
||||
|
||||
@Override
|
||||
public LightningFrame retrieveObject(LightningFrameMetadata metadata) {
|
||||
synchronized (metadata) {
|
||||
LightningFrame bundle = new LightningFrame();
|
||||
bundle.frameTime = metadata.frameTime;
|
||||
bundle.metadata = metadata;
|
||||
populateData(metadata, bundle);
|
||||
return bundle;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize(LightningFrame object) {
|
||||
int doubleCount = 0;
|
||||
if (object != null) {
|
||||
synchronized (object) {
|
||||
for (double[] arr : object.posLatLonList) {
|
||||
doubleCount += arr.length;
|
||||
}
|
||||
for (double[] arr : object.negLatLonList) {
|
||||
doubleCount += arr.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 8 bytes per double
|
||||
return doubleCount * 8;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.cache.CacheObject.IObjectRetrieverAndDisposer
|
||||
* #disposeObject(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void disposeObject(LightningFrame object) {
|
||||
LightningFrameMetadata metadata = object.metadata;
|
||||
synchronized (metadata) {
|
||||
metadata.newRecords.addAll(metadata.processed);
|
||||
metadata.processed.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final LightningFrameRetriever resourceBuilder = new LightningFrameRetriever();
|
||||
|
||||
private Map<DataTime, CacheObject<LightningFrameMetadata, LightningFrame>> cacheObjectMap;
|
||||
|
||||
private DataTime lastPaintedTime;
|
||||
|
@ -309,56 +177,71 @@ public class LightningResource extends
|
|||
}
|
||||
|
||||
});
|
||||
this.resourceName = formatResourceName(resourceData)
|
||||
+ "Lightning Plot ";
|
||||
}
|
||||
|
||||
String timeString = "";
|
||||
int absTimeInterval = Math.abs(this.resourceData.getBinOffset()
|
||||
/**
|
||||
* Create a resource name string from resource data configuration. Includes
|
||||
* time interval, cloud flash, pos/neg, pulse and source name.
|
||||
*
|
||||
* @param resourceData
|
||||
* @return
|
||||
*/
|
||||
public static String formatResourceName(LightningResourceData resourceData) {
|
||||
String rval = "";
|
||||
int absTimeInterval = Math.abs(resourceData.getBinOffset()
|
||||
.getInterval());
|
||||
|
||||
// If a virtual offset is provided, it is aged lightning, so use
|
||||
// the virtual offset to provide the "Old" time
|
||||
int virtualOffset = this.resourceData.getBinOffset().getVirtualOffset();
|
||||
int virtualOffset = resourceData.getBinOffset().getVirtualOffset();
|
||||
if (virtualOffset != 0) {
|
||||
timeString = convertTimeIntervalToString(virtualOffset) + "Old ";
|
||||
rval = convertTimeIntervalToString(virtualOffset) + "Old ";
|
||||
} else {
|
||||
timeString = convertTimeIntervalToString(absTimeInterval);
|
||||
rval = convertTimeIntervalToString(absTimeInterval);
|
||||
}
|
||||
if (this.resourceData.isExclusiveForType()) {
|
||||
if (resourceData.isExclusiveForType()) {
|
||||
String modifier;
|
||||
if (this.resourceData.isHandlingCloudFlashes()) {
|
||||
if (resourceData.isHandlingCloudFlashes()) {
|
||||
modifier = "Cloud Flash ";
|
||||
} else if (this.resourceData.isHandlingNegativeStrikes()) {
|
||||
} else if (resourceData.isHandlingNegativeStrikes()) {
|
||||
modifier = "Negative ";
|
||||
} else if (this.resourceData.isHandlingPositiveStrikes()) {
|
||||
} else if (resourceData.isHandlingPositiveStrikes()) {
|
||||
modifier = "Positive ";
|
||||
} else if (this.resourceData.isHandlingPulses()) {
|
||||
} else if (resourceData.isHandlingPulses()) {
|
||||
modifier = "Pulse ";
|
||||
} else {
|
||||
/* space to preserve formatting */
|
||||
modifier = " ";
|
||||
}
|
||||
this.resourceName = timeString + modifier;
|
||||
} else {
|
||||
this.resourceName = timeString;
|
||||
rval += modifier;
|
||||
}
|
||||
|
||||
HashMap<String, RequestConstraint> metadata = this.resourceData
|
||||
HashMap<String, RequestConstraint> metadata = resourceData
|
||||
.getMetadataMap();
|
||||
if (metadata != null && metadata.containsKey(LightningConstants.SOURCE)) {
|
||||
this.resourceName += metadata.get(LightningConstants.SOURCE)
|
||||
rval += metadata.get(LightningConstants.SOURCE)
|
||||
.getConstraintValue() + " ";
|
||||
}
|
||||
|
||||
this.resourceName += "Lightning Plot ";
|
||||
return rval;
|
||||
}
|
||||
|
||||
private String convertTimeIntervalToString(int time) {
|
||||
/**
|
||||
* Format time interval to human readable display string
|
||||
*
|
||||
* @param time
|
||||
* in seconds
|
||||
* @return
|
||||
*/
|
||||
private static String convertTimeIntervalToString(int time) {
|
||||
time = Math.abs(time);
|
||||
String timeString = null;
|
||||
if (time >= 60 * 60) {
|
||||
int hrs = time / (60 * 60);
|
||||
if (time >= TimeUtil.SECONDS_PER_HOUR) {
|
||||
int hrs = time / (TimeUtil.SECONDS_PER_HOUR);
|
||||
timeString = hrs + " Hour ";
|
||||
} else if (time < 60 * 60) {
|
||||
int mins = time / 60;
|
||||
} else {
|
||||
int mins = time / TimeUtil.SECONDS_PER_MINUTE;
|
||||
timeString = mins + " Minute ";
|
||||
}
|
||||
|
||||
|
@ -414,16 +297,20 @@ public class LightningResource extends
|
|||
if (needsUpdate) {
|
||||
needsUpdate = false;
|
||||
if (resourceData.isHandlingNegativeStrikes()) {
|
||||
currNegList = convertToPixel(bundle.negLatLonList);
|
||||
currNegList = convertToPixel(bundle
|
||||
.getNegLatLonList());
|
||||
}
|
||||
if (resourceData.isHandlingPositiveStrikes()) {
|
||||
currPosList = convertToPixel(bundle.posLatLonList);
|
||||
currPosList = convertToPixel(bundle
|
||||
.getPosLatLonList());
|
||||
}
|
||||
if (resourceData.isHandlingCloudFlashes()) {
|
||||
currCloudList = convertToPixel(bundle.cloudLatLonList);
|
||||
currCloudList = convertToPixel(bundle
|
||||
.getCloudLatLonList());
|
||||
}
|
||||
if (resourceData.isHandlingPulses()) {
|
||||
currPulseList = convertToPixel(bundle.pulseLatLonList);
|
||||
currPulseList = convertToPixel(bundle
|
||||
.getPulseLatLonList());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -555,7 +442,8 @@ public class LightningResource extends
|
|||
if (co != null) {
|
||||
LightningFrameMetadata metadata = co.getMetadata();
|
||||
synchronized (metadata) {
|
||||
if (metadata.newRecords.size() + metadata.processed.size() < 2) {
|
||||
if (metadata.getNewRecords().size()
|
||||
+ metadata.getProcessed().size() < 2) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -603,40 +491,25 @@ public class LightningResource extends
|
|||
|
||||
List<BinLightningRecord> records = entry.getValue();
|
||||
|
||||
LightningFrameMetadata frame;
|
||||
LightningFrameRetriever retriever = LightningFrameRetriever
|
||||
.getInstance();
|
||||
CacheObject<LightningFrameMetadata, LightningFrame> co;
|
||||
synchronized (cacheObjectMap) {
|
||||
co = cacheObjectMap.get(dt);
|
||||
if (co == null) {
|
||||
// New frame
|
||||
/*
|
||||
* no local reference to cache object, create key and get
|
||||
* cache object which may be new or from another resource
|
||||
*/
|
||||
LightningFrameMetadata key = new LightningFrameMetadata(dt,
|
||||
resourceData.getBinOffset());
|
||||
co = CacheObject.newCacheObject(key, resourceBuilder);
|
||||
co = CacheObject.newCacheObject(key, retriever);
|
||||
cacheObjectMap.put(dt, co);
|
||||
dataTimes.add(dt);
|
||||
}
|
||||
}
|
||||
frame = co.getMetadata();
|
||||
|
||||
synchronized (frame) {
|
||||
// Add as new records
|
||||
for (BinLightningRecord record : records) {
|
||||
if (frame.newRecords.contains(record) == false
|
||||
&& frame.processed.contains(record) == false) {
|
||||
frame.newRecords.add(record);
|
||||
}
|
||||
}
|
||||
|
||||
if (frame.processed.size() > 0 && frame.newRecords.size() > 0) {
|
||||
// if we've already processed some records, request the
|
||||
// new ones now and merge
|
||||
LightningFrame existing = co.getObjectSync();
|
||||
LightningFrame newBundle = resourceBuilder
|
||||
.retrieveObject(frame);
|
||||
existing.posLatLonList.addAll(newBundle.posLatLonList);
|
||||
existing.negLatLonList.addAll(newBundle.negLatLonList);
|
||||
}
|
||||
}
|
||||
retriever.updateAndGet(records, co);
|
||||
}
|
||||
issueRefresh();
|
||||
}
|
||||
|
@ -670,220 +543,4 @@ public class LightningResource extends
|
|||
issueRefresh();
|
||||
}
|
||||
|
||||
private static void populateData(LightningFrameMetadata frame,
|
||||
LightningFrame bundle) {
|
||||
long t0 = System.currentTimeMillis();
|
||||
long strikeCount = 0;
|
||||
long dsTime = 0;
|
||||
|
||||
// Bin up requests to the same hdf5
|
||||
Map<File, List<BinLightningRecord>> fileMap = new HashMap<File, List<BinLightningRecord>>();
|
||||
|
||||
for (BinLightningRecord record : frame.newRecords) {
|
||||
File f = HDF5Util.findHDF5Location(record);
|
||||
List<BinLightningRecord> recList = fileMap.get(f);
|
||||
if (recList == null) {
|
||||
recList = new ArrayList<BinLightningRecord>();
|
||||
fileMap.put(f, recList);
|
||||
}
|
||||
recList.add(record);
|
||||
frame.processed.add(record);
|
||||
}
|
||||
frame.newRecords.clear();
|
||||
|
||||
for (File f : fileMap.keySet()) {
|
||||
List<BinLightningRecord> recList = fileMap.get(f);
|
||||
String[] groups = new String[recList.size()];
|
||||
for (int i = 0; i < recList.size(); i++) {
|
||||
groups[i] = recList.get(i).getDataURI();
|
||||
}
|
||||
|
||||
// Go fetch data
|
||||
try {
|
||||
long tDS0 = System.currentTimeMillis();
|
||||
IDataStore ds = DataStoreFactory.getDataStore(f);
|
||||
IDataRecord[] records = ds.retrieveGroups(groups, Request.ALL);
|
||||
|
||||
long tDS1 = System.currentTimeMillis();
|
||||
dsTime += (tDS1 - tDS0);
|
||||
// Throw in a map for easy accessibility
|
||||
Map<String, List<IDataRecord>> recordMap = createRecordMap(records);
|
||||
|
||||
List<IDataRecord> times = recordMap
|
||||
.get(LightningConstants.TIME_DATASET);
|
||||
List<IDataRecord> intensities = recordMap
|
||||
.get(LightningConstants.INTENSITY_DATASET);
|
||||
List<IDataRecord> lats = recordMap
|
||||
.get(LightningConstants.LAT_DATASET);
|
||||
List<IDataRecord> lons = recordMap
|
||||
.get(LightningConstants.LON_DATASET);
|
||||
List<IDataRecord> types = recordMap
|
||||
.get(LightningConstants.STRIKE_TYPE_DATASET);
|
||||
List<IDataRecord> pulseIndexes = recordMap
|
||||
.get(LightningConstants.PULSE_INDEX_DATASET);
|
||||
|
||||
int k = 0;
|
||||
for (IDataRecord timeRec : times) {
|
||||
if (hasPulseData(pulseIndexes, k)) {
|
||||
populatePulseData(frame, bundle, timeRec.getGroup(), ds);
|
||||
}
|
||||
LongDataRecord time = (LongDataRecord) timeRec;
|
||||
// Now loop through the obs times and intensities and
|
||||
// start categorizing strikes
|
||||
int numRecords = (int) time.getSizes()[0];
|
||||
|
||||
long[] timeData = time.getLongData();
|
||||
|
||||
int[] intensityData = ((IntegerDataRecord) intensities
|
||||
.get(k)).getIntData();
|
||||
float[] latitudeData = ((FloatDataRecord) lats.get(k))
|
||||
.getFloatData();
|
||||
float[] longitudeData = ((FloatDataRecord) lons.get(k))
|
||||
.getFloatData();
|
||||
byte[] typeData = ((ByteDataRecord) types.get(k))
|
||||
.getByteData();
|
||||
|
||||
for (int i = 0; i < numRecords; i++) {
|
||||
|
||||
DataTime dt = new DataTime(new Date(timeData[i]));
|
||||
dt = frame.offset.getNormalizedTime(dt);
|
||||
List<double[]> list;
|
||||
LtgStrikeType type = LtgStrikeType.getById(typeData[i]);
|
||||
switch(type){
|
||||
case CLOUD_TO_CLOUD:
|
||||
list = bundle.cloudLatLonList;
|
||||
break;
|
||||
default:
|
||||
if (intensityData[i] > 0) {
|
||||
list = bundle.posLatLonList;
|
||||
} else {
|
||||
list = bundle.negLatLonList;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
double[] latLon = new double[] { longitudeData[i],
|
||||
latitudeData[i] };
|
||||
|
||||
// only add the strike to the list if the data time
|
||||
// of the strike matches the data time of the frame
|
||||
if (dt.equals(bundle.frameTime)) {
|
||||
list.add(latLon);
|
||||
strikeCount++;
|
||||
}
|
||||
|
||||
}
|
||||
k++;
|
||||
}
|
||||
} catch (StorageException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Storage error retrieving lightning data", e);
|
||||
} catch (FileNotFoundException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Unable to open lightning file", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
long t1 = System.currentTimeMillis();
|
||||
|
||||
System.out.println("Decoded: " + strikeCount + " strikes in "
|
||||
+ (t1 - t0) + "ms (hdf5 time = " + dsTime + "ms)");
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpack records into map keyed by record name
|
||||
*
|
||||
* @param records
|
||||
* @return
|
||||
*/
|
||||
private static Map<String, List<IDataRecord>> createRecordMap(
|
||||
IDataRecord[] records) {
|
||||
Map<String, List<IDataRecord>> recordMap = new HashMap<String, List<IDataRecord>>();
|
||||
for (IDataRecord rec : records) {
|
||||
List<IDataRecord> recordList = recordMap.get(rec.getName());
|
||||
if (recordList == null) {
|
||||
recordList = new ArrayList<IDataRecord>();
|
||||
recordMap.put(rec.getName(), recordList);
|
||||
}
|
||||
recordList.add(rec);
|
||||
}
|
||||
return recordMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search records and return first found with name
|
||||
*
|
||||
* @param records
|
||||
* @param name
|
||||
* @return null if none found
|
||||
*/
|
||||
private static IDataRecord findDataRecord(IDataRecord[] records, String name) {
|
||||
IDataRecord rval = null;
|
||||
for (IDataRecord record : records) {
|
||||
if (record.getName().equals(name)) {
|
||||
rval = record;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pulseIndexes
|
||||
* @param recordIndex
|
||||
* @return true if any data record in list has a valid pulse index
|
||||
*/
|
||||
private static boolean hasPulseData(List<IDataRecord> pulseIndexes,
|
||||
int recordIndex) {
|
||||
if (pulseIndexes != null) {
|
||||
IDataRecord record = pulseIndexes.get(recordIndex);
|
||||
int[] indexData = ((IntegerDataRecord) record).getIntData();
|
||||
for (int i = 0; i < indexData.length; ++i) {
|
||||
if (indexData[i] >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read pulse data from datastore and populate in frame
|
||||
*
|
||||
* @param frame
|
||||
* @param bundle
|
||||
* @param group
|
||||
* @param ds
|
||||
*/
|
||||
private static void populatePulseData(LightningFrameMetadata frame,
|
||||
LightningFrame bundle, String group, IDataStore ds) {
|
||||
try {
|
||||
IDataRecord[] records = ds.retrieve(group + DataURI.SEPARATOR
|
||||
+ LightningConstants.PULSE_HDF5_GROUP_SUFFIX);
|
||||
FloatDataRecord latRecord = (FloatDataRecord) findDataRecord(
|
||||
records, LightningConstants.LAT_DATASET);
|
||||
FloatDataRecord lonRecord = (FloatDataRecord) findDataRecord(
|
||||
records, LightningConstants.LON_DATASET);
|
||||
if (latRecord == null || lonRecord == null) {
|
||||
throw new StorageException(
|
||||
"Missing pulse latitude and/or longitude data", null);
|
||||
}
|
||||
float[] lats = latRecord.getFloatData();
|
||||
float[] lons = lonRecord.getFloatData();
|
||||
if (lats.length != lons.length) {
|
||||
throw new StorageException(
|
||||
"Mismatched pulse latitude/longitude data", latRecord);
|
||||
}
|
||||
for (int i = 0; i < lats.length; ++i) {
|
||||
bundle.pulseLatLonList.add(new double[] { lons[i], lats[i] });
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
statusHandler.error("Unable to open lightning file", e);
|
||||
} catch (StorageException e) {
|
||||
statusHandler.error("Unable to read pulse datasets for group "
|
||||
+ group, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
148
cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/cache/LightningFrame.java
vendored
Normal file
148
cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/cache/LightningFrame.java
vendored
Normal file
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
* 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.
|
||||
**/
|
||||
package com.raytheon.viz.lightning.cache;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
|
||||
/**
|
||||
* Lightning location data for a single time frame. Data is separated out by
|
||||
* flash/pulse category.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 9, 2014 3333 bclement moved from LightningResource
|
||||
* added merge() and getDataSize()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class LightningFrame {
|
||||
|
||||
private final LightningFrameMetadata metadata;
|
||||
|
||||
private final DataTime frameTime;
|
||||
|
||||
private final List<double[]> posLatLonList = new ArrayList<double[]>();
|
||||
|
||||
private final List<double[]> negLatLonList = new ArrayList<double[]>();
|
||||
|
||||
private final List<double[]> cloudLatLonList = new ArrayList<double[]>();
|
||||
|
||||
private final List<double[]> pulseLatLonList = new ArrayList<double[]>();
|
||||
|
||||
private static final int BYTES_PER_DOUBLE = Double.SIZE / Byte.SIZE;
|
||||
|
||||
/**
|
||||
* @param frameTime
|
||||
* @param metadata
|
||||
*/
|
||||
public LightningFrame(DataTime frameTime, LightningFrameMetadata metadata) {
|
||||
this.frameTime = frameTime;
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all locations from other to this frame
|
||||
*
|
||||
* @param other
|
||||
*/
|
||||
public void merge(LightningFrame other) {
|
||||
this.posLatLonList.addAll(other.posLatLonList);
|
||||
this.negLatLonList.addAll(other.negLatLonList);
|
||||
this.cloudLatLonList.addAll(other.cloudLatLonList);
|
||||
this.pulseLatLonList.addAll(other.pulseLatLonList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return total size of location data in bytes
|
||||
*/
|
||||
public int getDataSize() {
|
||||
int doubleCount = 0;
|
||||
doubleCount += getSize(getPosLatLonList());
|
||||
doubleCount += getSize(getNegLatLonList());
|
||||
doubleCount += getSize(getCloudLatLonList());
|
||||
doubleCount += getSize(getPulseLatLonList());
|
||||
return doubleCount * BYTES_PER_DOUBLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lonLatList
|
||||
* @return total number of doubles in list
|
||||
*/
|
||||
private static int getSize(List<double[]> lonLatList) {
|
||||
int rval = 0;
|
||||
for (double[] arr : lonLatList) {
|
||||
rval += arr.length;
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the metadata
|
||||
*/
|
||||
public LightningFrameMetadata getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the frameTime
|
||||
*/
|
||||
public DataTime getFrameTime() {
|
||||
return frameTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the posLatLonList
|
||||
*/
|
||||
public List<double[]> getPosLatLonList() {
|
||||
return posLatLonList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the negLatLonList
|
||||
*/
|
||||
public List<double[]> getNegLatLonList() {
|
||||
return negLatLonList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cloudLatLonList
|
||||
*/
|
||||
public List<double[]> getCloudLatLonList() {
|
||||
return cloudLatLonList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pulseLatLonList
|
||||
*/
|
||||
public List<double[]> getPulseLatLonList() {
|
||||
return pulseLatLonList;
|
||||
}
|
||||
|
||||
}
|
119
cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/cache/LightningFrameMetadata.java
vendored
Normal file
119
cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/cache/LightningFrameMetadata.java
vendored
Normal file
|
@ -0,0 +1,119 @@
|
|||
/**
|
||||
* 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.
|
||||
**/
|
||||
package com.raytheon.viz.lightning.cache;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
|
||||
import com.raytheon.uf.common.time.BinOffset;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
|
||||
/**
|
||||
* Time and record data used to create a LightningFrame
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 9, 2014 3333 bclement moved from LightningResource
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class LightningFrameMetadata {
|
||||
|
||||
private final BinOffset offset;
|
||||
|
||||
private final DataTime frameTime;
|
||||
|
||||
private final List<BinLightningRecord> newRecords = new ArrayList<BinLightningRecord>();
|
||||
|
||||
private final List<BinLightningRecord> processed = new ArrayList<BinLightningRecord>();
|
||||
|
||||
public LightningFrameMetadata(DataTime frameTime, BinOffset offset) {
|
||||
this.frameTime = frameTime;
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the offset
|
||||
*/
|
||||
public BinOffset getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the frameTime
|
||||
*/
|
||||
public DataTime getFrameTime() {
|
||||
return frameTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the newRecords
|
||||
*/
|
||||
public List<BinLightningRecord> getNewRecords() {
|
||||
return newRecords;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the processed
|
||||
*/
|
||||
public List<BinLightningRecord> getProcessed() {
|
||||
return processed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((frameTime == null) ? 0 : frameTime.hashCode());
|
||||
result = prime * result + ((offset == null) ? 0 : offset.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
LightningFrameMetadata other = (LightningFrameMetadata) obj;
|
||||
if (frameTime == null) {
|
||||
if (other.frameTime != null)
|
||||
return false;
|
||||
} else if (!frameTime.equals(other.frameTime))
|
||||
return false;
|
||||
if (offset == null) {
|
||||
if (other.offset != null)
|
||||
return false;
|
||||
} else if (!offset.equals(other.offset))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
398
cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/cache/LightningFrameRetriever.java
vendored
Normal file
398
cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/cache/LightningFrameRetriever.java
vendored
Normal file
|
@ -0,0 +1,398 @@
|
|||
/**
|
||||
* 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.
|
||||
**/
|
||||
package com.raytheon.viz.lightning.cache;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.HDF5Util;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.LightningConstants;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgStrikeType;
|
||||
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
||||
import com.raytheon.uf.common.datastorage.IDataStore;
|
||||
import com.raytheon.uf.common.datastorage.Request;
|
||||
import com.raytheon.uf.common.datastorage.StorageException;
|
||||
import com.raytheon.uf.common.datastorage.records.ByteDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.IDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.IntegerDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.LongDataRecord;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.cache.CacheObject;
|
||||
import com.raytheon.uf.viz.core.cache.CacheObject.IObjectRetrieverAndDisposer;
|
||||
|
||||
/**
|
||||
* Cache object retriever for lighting frame data. Singleton to ensure that
|
||||
* cached data is shared between resources.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 9, 2014 3333 bclement moved from LightningResource
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class LightningFrameRetriever implements
|
||||
IObjectRetrieverAndDisposer<LightningFrameMetadata, LightningFrame> {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(LightningFrameRetriever.class);
|
||||
|
||||
private static final LightningFrameRetriever instance = new LightningFrameRetriever();
|
||||
|
||||
/**
|
||||
* @return singleton instance
|
||||
*/
|
||||
public static LightningFrameRetriever getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* singleton constructor
|
||||
*/
|
||||
private LightningFrameRetriever() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add any new records to cache and return the updated frame
|
||||
*
|
||||
* @param records
|
||||
* @param co
|
||||
* @return
|
||||
*/
|
||||
public LightningFrame updateAndGet(List<BinLightningRecord> records,
|
||||
CacheObject<LightningFrameMetadata, LightningFrame> co) {
|
||||
LightningFrameMetadata metadata = co.getMetadata();
|
||||
LightningFrame rval;
|
||||
synchronized (metadata) {
|
||||
// Add as new records
|
||||
List<BinLightningRecord> newRecords = metadata.getNewRecords();
|
||||
List<BinLightningRecord> processed = metadata.getProcessed();
|
||||
for (BinLightningRecord record : records) {
|
||||
if (newRecords.contains(record) == false
|
||||
&& processed.contains(record) == false) {
|
||||
newRecords.add(record);
|
||||
}
|
||||
}
|
||||
rval = co.getObjectAsync();
|
||||
if (processed.size() > 0 && newRecords.size() > 0) {
|
||||
// if we've already processed some records, request the
|
||||
// new ones now and merge
|
||||
LightningFrame newBundle = retrieveObject(metadata);
|
||||
rval.merge(newBundle);
|
||||
}
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.cache.CacheObject.IObjectRetriever#retrieveObject
|
||||
* (java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public LightningFrame retrieveObject(LightningFrameMetadata metadata) {
|
||||
synchronized (metadata) {
|
||||
LightningFrame bundle = new LightningFrame(metadata.getFrameTime(),
|
||||
metadata);
|
||||
populateData(metadata, bundle);
|
||||
return bundle;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.cache.CacheObject.IObjectRetriever#getSize(java
|
||||
* .lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int getSize(LightningFrame object) {
|
||||
int rval = 0;
|
||||
if (object != null) {
|
||||
synchronized (object) {
|
||||
rval = object.getDataSize();
|
||||
}
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.cache.CacheObject.IObjectRetrieverAndDisposer
|
||||
* #disposeObject(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void disposeObject(LightningFrame object) {
|
||||
LightningFrameMetadata metadata = object.getMetadata();
|
||||
synchronized (metadata) {
|
||||
List<BinLightningRecord> newRecords = metadata.getNewRecords();
|
||||
List<BinLightningRecord> processed = metadata.getProcessed();
|
||||
newRecords.addAll(processed);
|
||||
processed.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate frame with data from HDF5
|
||||
*
|
||||
* @param frame
|
||||
* @param bundle
|
||||
*/
|
||||
private static void populateData(final LightningFrameMetadata frame,
|
||||
LightningFrame bundle) {
|
||||
long t0 = System.currentTimeMillis();
|
||||
long strikeCount = 0;
|
||||
long dsTime = 0;
|
||||
|
||||
// Bin up requests to the same hdf5
|
||||
Map<File, List<BinLightningRecord>> fileMap = new HashMap<File, List<BinLightningRecord>>();
|
||||
List<BinLightningRecord> newRecords = frame.getNewRecords();
|
||||
List<BinLightningRecord> processed = frame.getProcessed();
|
||||
for (BinLightningRecord record : newRecords) {
|
||||
File f = HDF5Util.findHDF5Location(record);
|
||||
List<BinLightningRecord> recList = fileMap.get(f);
|
||||
if (recList == null) {
|
||||
recList = new ArrayList<BinLightningRecord>();
|
||||
fileMap.put(f, recList);
|
||||
}
|
||||
recList.add(record);
|
||||
processed.add(record);
|
||||
}
|
||||
newRecords.clear();
|
||||
|
||||
for (File f : fileMap.keySet()) {
|
||||
List<BinLightningRecord> recList = fileMap.get(f);
|
||||
String[] groups = new String[recList.size()];
|
||||
for (int i = 0; i < recList.size(); i++) {
|
||||
groups[i] = recList.get(i).getDataURI();
|
||||
}
|
||||
|
||||
// Go fetch data
|
||||
try {
|
||||
long tDS0 = System.currentTimeMillis();
|
||||
IDataStore ds = DataStoreFactory.getDataStore(f);
|
||||
IDataRecord[] records = ds.retrieveGroups(groups, Request.ALL);
|
||||
|
||||
long tDS1 = System.currentTimeMillis();
|
||||
dsTime += (tDS1 - tDS0);
|
||||
// Throw in a map for easy accessibility
|
||||
Map<String, List<IDataRecord>> recordMap = createRecordMap(records);
|
||||
|
||||
List<IDataRecord> times = recordMap
|
||||
.get(LightningConstants.TIME_DATASET);
|
||||
List<IDataRecord> intensities = recordMap
|
||||
.get(LightningConstants.INTENSITY_DATASET);
|
||||
List<IDataRecord> lats = recordMap
|
||||
.get(LightningConstants.LAT_DATASET);
|
||||
List<IDataRecord> lons = recordMap
|
||||
.get(LightningConstants.LON_DATASET);
|
||||
List<IDataRecord> types = recordMap
|
||||
.get(LightningConstants.STRIKE_TYPE_DATASET);
|
||||
List<IDataRecord> pulseIndexes = recordMap
|
||||
.get(LightningConstants.PULSE_INDEX_DATASET);
|
||||
|
||||
int k = 0;
|
||||
for (IDataRecord timeRec : times) {
|
||||
if (hasPulseData(pulseIndexes, k)) {
|
||||
populatePulseData(frame, bundle, timeRec.getGroup(), ds);
|
||||
}
|
||||
LongDataRecord time = (LongDataRecord) timeRec;
|
||||
// Now loop through the obs times and intensities and
|
||||
// start categorizing strikes
|
||||
int numRecords = (int) time.getSizes()[0];
|
||||
|
||||
long[] timeData = time.getLongData();
|
||||
|
||||
int[] intensityData = ((IntegerDataRecord) intensities
|
||||
.get(k)).getIntData();
|
||||
float[] latitudeData = ((FloatDataRecord) lats.get(k))
|
||||
.getFloatData();
|
||||
float[] longitudeData = ((FloatDataRecord) lons.get(k))
|
||||
.getFloatData();
|
||||
byte[] typeData = ((ByteDataRecord) types.get(k))
|
||||
.getByteData();
|
||||
|
||||
for (int i = 0; i < numRecords; i++) {
|
||||
|
||||
DataTime dt = new DataTime(new Date(timeData[i]));
|
||||
dt = frame.getOffset().getNormalizedTime(dt);
|
||||
List<double[]> list;
|
||||
LtgStrikeType type = LtgStrikeType.getById(typeData[i]);
|
||||
switch (type) {
|
||||
case CLOUD_TO_CLOUD:
|
||||
list = bundle.getCloudLatLonList();
|
||||
break;
|
||||
default:
|
||||
if (intensityData[i] > 0) {
|
||||
list = bundle.getPosLatLonList();
|
||||
} else {
|
||||
list = bundle.getNegLatLonList();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
double[] latLon = new double[] { longitudeData[i],
|
||||
latitudeData[i] };
|
||||
|
||||
// only add the strike to the list if the data time
|
||||
// of the strike matches the data time of the frame
|
||||
if (dt.equals(bundle.getFrameTime())) {
|
||||
list.add(latLon);
|
||||
strikeCount++;
|
||||
}
|
||||
|
||||
}
|
||||
k++;
|
||||
}
|
||||
} catch (StorageException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Storage error retrieving lightning data", e);
|
||||
} catch (FileNotFoundException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Unable to open lightning file", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
long t1 = System.currentTimeMillis();
|
||||
|
||||
System.out.println("Decoded: " + strikeCount + " strikes in "
|
||||
+ (t1 - t0) + "ms (hdf5 time = " + dsTime + "ms)");
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpack records into map keyed by record name
|
||||
*
|
||||
* @param records
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, List<IDataRecord>> createRecordMap(
|
||||
IDataRecord[] records) {
|
||||
Map<String, List<IDataRecord>> recordMap = new HashMap<String, List<IDataRecord>>();
|
||||
for (IDataRecord rec : records) {
|
||||
List<IDataRecord> recordList = recordMap.get(rec.getName());
|
||||
if (recordList == null) {
|
||||
recordList = new ArrayList<IDataRecord>();
|
||||
recordMap.put(rec.getName(), recordList);
|
||||
}
|
||||
recordList.add(rec);
|
||||
}
|
||||
return recordMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search records and return first found with name
|
||||
*
|
||||
* @param records
|
||||
* @param name
|
||||
* @return null if none found
|
||||
*/
|
||||
private static IDataRecord findDataRecord(IDataRecord[] records, String name) {
|
||||
IDataRecord rval = null;
|
||||
for (IDataRecord record : records) {
|
||||
if (record.getName().equals(name)) {
|
||||
rval = record;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pulseIndexes
|
||||
* @param recordIndex
|
||||
* @return true if any data record in list has a valid pulse index
|
||||
*/
|
||||
private static boolean hasPulseData(List<IDataRecord> pulseIndexes,
|
||||
int recordIndex) {
|
||||
if (pulseIndexes != null) {
|
||||
IDataRecord record = pulseIndexes.get(recordIndex);
|
||||
int[] indexData = ((IntegerDataRecord) record).getIntData();
|
||||
for (int i = 0; i < indexData.length; ++i) {
|
||||
if (indexData[i] >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read pulse data from datastore and populate in frame
|
||||
*
|
||||
* @param frame
|
||||
* @param bundle
|
||||
* @param group
|
||||
* @param ds
|
||||
*/
|
||||
private static void populatePulseData(LightningFrameMetadata frame,
|
||||
LightningFrame bundle, String group, IDataStore ds) {
|
||||
try {
|
||||
IDataRecord[] records = ds.retrieve(group + DataURI.SEPARATOR
|
||||
+ LightningConstants.PULSE_HDF5_GROUP_SUFFIX);
|
||||
FloatDataRecord latRecord = (FloatDataRecord) findDataRecord(
|
||||
records, LightningConstants.LAT_DATASET);
|
||||
FloatDataRecord lonRecord = (FloatDataRecord) findDataRecord(
|
||||
records, LightningConstants.LON_DATASET);
|
||||
if (latRecord == null || lonRecord == null) {
|
||||
throw new StorageException(
|
||||
"Missing pulse latitude and/or longitude data", null);
|
||||
}
|
||||
float[] lats = latRecord.getFloatData();
|
||||
float[] lons = lonRecord.getFloatData();
|
||||
if (lats.length != lons.length) {
|
||||
throw new StorageException(
|
||||
"Mismatched pulse latitude/longitude data", latRecord);
|
||||
}
|
||||
for (int i = 0; i < lats.length; ++i) {
|
||||
bundle.getPosLatLonList()
|
||||
.add(new double[] { lons[i], lats[i] });
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
statusHandler.error("Unable to open lightning file", e);
|
||||
} catch (StorageException e) {
|
||||
statusHandler.error("Unable to read pulse datasets for group "
|
||||
+ group, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,259 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<colorMap>
|
||||
<color a="1.0" b="1.0" g="1.0" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="1.0" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.9843137" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.96862745" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.9529412" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.93333334" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.91764706" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.8980392" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.88235295" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.8627451" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.84313726" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.8235294" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.8039216" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.78431374" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.7607843" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.7411765" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.7176471" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.69803923" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.67058825" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.64705884" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.62352943" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.59607846" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.5686275" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.5372549" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.5058824" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.4745098" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.4392157" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.4" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.35686275" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.30980393" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.2509804" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.1764706" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.9843137"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.96862745"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.9529412"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.9372549"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.92156863"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.9019608"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.8862745"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.8666667"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.84705883"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.83137256"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.8117647"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.7921569"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.77254903"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.7490196"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.7294118"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.7058824"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.6862745"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.6627451"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.6392157"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.6117647"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.5882353"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.56078434"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.5294118"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.49803922"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.46666667"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.43137255"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.39607844"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.3529412"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.30588236"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.24705882"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.1764706"/>
|
||||
<color a="1.0" b="1.0" g="0.0" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.1764706" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.24705882" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.30588236" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.3529412" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.39607844" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.43137255" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.46666667" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.49803922" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.5294118" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.56078434" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.5882353" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.6117647" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.6392157" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.6627451" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.6862745" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.7058824" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.7294118" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.7490196" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.77254903" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.7921569" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.8117647" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.83137256" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.84705883" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.8666667" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.8862745" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.9019608" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.92156863" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.9372549" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.9529412" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.96862745" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="0.9843137" r="0.0"/>
|
||||
<color a="1.0" b="1.0" g="1.0" r="0.0"/>
|
||||
<color a="1.0" b="0.99215686" g="0.99215686" r="0.09411765"/>
|
||||
<color a="1.0" b="0.98039216" g="0.98039216" r="0.13725491"/>
|
||||
<color a="1.0" b="0.96862745" g="0.96862745" r="0.16470589"/>
|
||||
<color a="1.0" b="0.95686275" g="0.95686275" r="0.19215687"/>
|
||||
<color a="1.0" b="0.94509804" g="0.94509804" r="0.21568628"/>
|
||||
<color a="1.0" b="0.93333334" g="0.93333334" r="0.23529412"/>
|
||||
<color a="1.0" b="0.92156863" g="0.92156863" r="0.25490198"/>
|
||||
<color a="1.0" b="0.9098039" g="0.9098039" r="0.27450982"/>
|
||||
<color a="1.0" b="0.8980392" g="0.8980392" r="0.2901961"/>
|
||||
<color a="1.0" b="0.8862745" g="0.8862745" r="0.30588236"/>
|
||||
<color a="1.0" b="0.87058824" g="0.87058824" r="0.32156864"/>
|
||||
<color a="1.0" b="0.85882354" g="0.85882354" r="0.33333334"/>
|
||||
<color a="1.0" b="0.84705883" g="0.84705883" r="0.34901962"/>
|
||||
<color a="1.0" b="0.8352941" g="0.8352941" r="0.36078432"/>
|
||||
<color a="1.0" b="0.81960785" g="0.81960785" r="0.37254903"/>
|
||||
<color a="1.0" b="0.80784315" g="0.80784315" r="0.3882353"/>
|
||||
<color a="1.0" b="0.7921569" g="0.7921569" r="0.4"/>
|
||||
<color a="1.0" b="0.78039217" g="0.78039217" r="0.4117647"/>
|
||||
<color a="1.0" b="0.7647059" g="0.7647059" r="0.42352942"/>
|
||||
<color a="1.0" b="0.7490196" g="0.7490196" r="0.43137255"/>
|
||||
<color a="1.0" b="0.7372549" g="0.7372549" r="0.44313726"/>
|
||||
<color a="1.0" b="0.72156864" g="0.72156864" r="0.45490196"/>
|
||||
<color a="1.0" b="0.7058824" g="0.7058824" r="0.4627451"/>
|
||||
<color a="1.0" b="0.6901961" g="0.6901961" r="0.4745098"/>
|
||||
<color a="1.0" b="0.6745098" g="0.6745098" r="0.48235294"/>
|
||||
<color a="1.0" b="0.65882355" g="0.65882355" r="0.49411765"/>
|
||||
<color a="1.0" b="0.6392157" g="0.6392157" r="0.5019608"/>
|
||||
<color a="1.0" b="0.62352943" g="0.62352943" r="0.5137255"/>
|
||||
<color a="1.0" b="0.6039216" g="0.6039216" r="0.52156866"/>
|
||||
<color a="1.0" b="0.5882353" g="0.5882353" r="0.5294118"/>
|
||||
<color a="1.0" b="0.5686275" g="0.5686275" r="0.5372549"/>
|
||||
<color a="1.0" b="0.54901963" g="0.54901963" r="0.54901963"/>
|
||||
<color a="1.0" b="0.5372549" g="0.5686275" r="0.5372549"/>
|
||||
<color a="1.0" b="0.5294118" g="0.5882353" r="0.5294118"/>
|
||||
<color a="1.0" b="0.52156866" g="0.60784316" r="0.52156866"/>
|
||||
<color a="1.0" b="0.50980395" g="0.62352943" r="0.50980395"/>
|
||||
<color a="1.0" b="0.5019608" g="0.6431373" r="0.5019608"/>
|
||||
<color a="1.0" b="0.49019608" g="0.65882355" r="0.49019608"/>
|
||||
<color a="1.0" b="0.48235294" g="0.6784314" r="0.48235294"/>
|
||||
<color a="1.0" b="0.47058824" g="0.69411767" r="0.47058824"/>
|
||||
<color a="1.0" b="0.4627451" g="0.70980394" r="0.4627451"/>
|
||||
<color a="1.0" b="0.4509804" g="0.7254902" r="0.4509804"/>
|
||||
<color a="1.0" b="0.4392157" g="0.7411765" r="0.4392157"/>
|
||||
<color a="1.0" b="0.42745098" g="0.75686276" r="0.42745098"/>
|
||||
<color a="1.0" b="0.41568628" g="0.77254903" r="0.41568628"/>
|
||||
<color a="1.0" b="0.40392157" g="0.78431374" r="0.40392157"/>
|
||||
<color a="1.0" b="0.39215687" g="0.8" r="0.39215687"/>
|
||||
<color a="1.0" b="0.38039216" g="0.8156863" r="0.38039216"/>
|
||||
<color a="1.0" b="0.36862746" g="0.827451" r="0.36862746"/>
|
||||
<color a="1.0" b="0.3529412" g="0.84313726" r="0.3529412"/>
|
||||
<color a="1.0" b="0.34117648" g="0.85490197" r="0.34117648"/>
|
||||
<color a="1.0" b="0.3254902" g="0.8666667" r="0.3254902"/>
|
||||
<color a="1.0" b="0.30980393" g="0.88235295" r="0.30980393"/>
|
||||
<color a="1.0" b="0.29411766" g="0.89411765" r="0.29411766"/>
|
||||
<color a="1.0" b="0.2784314" g="0.90588236" r="0.2784314"/>
|
||||
<color a="1.0" b="0.25882354" g="0.91764706" r="0.25882354"/>
|
||||
<color a="1.0" b="0.23921569" g="0.92941177" r="0.23921569"/>
|
||||
<color a="1.0" b="0.21960784" g="0.94509804" r="0.21960784"/>
|
||||
<color a="1.0" b="0.19607843" g="0.95686275" r="0.19607843"/>
|
||||
<color a="1.0" b="0.16862746" g="0.96862745" r="0.16862746"/>
|
||||
<color a="1.0" b="0.13725491" g="0.98039216" r="0.13725491"/>
|
||||
<color a="1.0" b="0.09803922" g="0.9882353" r="0.09803922"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.0"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.1764706"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.24705882"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.30588236"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.3529412"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.39607844"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.43137255"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.46666667"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.49803922"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.5294118"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.56078434"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.5882353"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.6117647"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.6392157"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.6627451"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.6862745"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.7058824"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.7294118"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.7490196"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.77254903"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.7921569"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.8117647"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.83137256"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.84705883"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.8666667"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.8862745"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.9019608"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.92156863"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.9372549"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.9529412"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.96862745"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="0.9843137"/>
|
||||
<color a="1.0" b="0.0" g="1.0" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.9843137" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.96862745" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.9529412" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.9372549" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.92156863" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.9019608" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.8862745" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.8666667" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.84705883" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.83137256" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.8117647" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.7921569" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.77254903" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.7490196" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.7294118" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.7058824" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.6862745" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.6627451" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.6392157" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.6117647" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.5882353" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.56078434" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.5294118" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.49803922" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.46666667" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.43137255" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.39607844" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.3529412" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.30588236" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.24705882" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.1764706" r="1.0"/>
|
||||
<color a="1.0" b="0.0" g="0.0" r="1.0"/>
|
||||
<color a="1.0" b="0.1764706" g="0.1764706" r="1.0"/>
|
||||
<color a="1.0" b="0.24705882" g="0.24705882" r="1.0"/>
|
||||
<color a="1.0" b="0.30588236" g="0.30588236" r="1.0"/>
|
||||
<color a="1.0" b="0.3529412" g="0.3529412" r="1.0"/>
|
||||
<color a="1.0" b="0.39607844" g="0.39607844" r="1.0"/>
|
||||
<color a="1.0" b="0.43137255" g="0.43137255" r="1.0"/>
|
||||
<color a="1.0" b="0.46666667" g="0.46666667" r="1.0"/>
|
||||
<color a="1.0" b="0.49803922" g="0.49803922" r="1.0"/>
|
||||
<color a="1.0" b="0.5294118" g="0.5294118" r="1.0"/>
|
||||
<color a="1.0" b="0.56078434" g="0.56078434" r="1.0"/>
|
||||
<color a="1.0" b="0.5882353" g="0.5882353" r="1.0"/>
|
||||
<color a="1.0" b="0.6117647" g="0.6117647" r="1.0"/>
|
||||
<color a="1.0" b="0.6392157" g="0.6392157" r="1.0"/>
|
||||
<color a="1.0" b="0.6627451" g="0.6627451" r="1.0"/>
|
||||
<color a="1.0" b="0.6862745" g="0.6862745" r="1.0"/>
|
||||
<color a="1.0" b="0.7058824" g="0.7058824" r="1.0"/>
|
||||
<color a="1.0" b="0.7294118" g="0.7294118" r="1.0"/>
|
||||
<color a="1.0" b="0.7490196" g="0.7490196" r="1.0"/>
|
||||
<color a="1.0" b="0.77254903" g="0.77254903" r="1.0"/>
|
||||
<color a="1.0" b="0.7921569" g="0.7921569" r="1.0"/>
|
||||
<color a="1.0" b="0.8117647" g="0.8117647" r="1.0"/>
|
||||
<color a="1.0" b="0.83137256" g="0.83137256" r="1.0"/>
|
||||
<color a="1.0" b="0.84705883" g="0.84705883" r="1.0"/>
|
||||
<color a="1.0" b="0.8666667" g="0.8666667" r="1.0"/>
|
||||
<color a="1.0" b="0.8862745" g="0.8862745" r="1.0"/>
|
||||
<color a="1.0" b="0.9019608" g="0.9019608" r="1.0"/>
|
||||
<color a="1.0" b="0.92156863" g="0.92156863" r="1.0"/>
|
||||
<color a="1.0" b="0.9372549" g="0.9372549" r="1.0"/>
|
||||
<color a="1.0" b="0.9529412" g="0.9529412" r="1.0"/>
|
||||
<color a="1.0" b="0.96862745" g="0.96862745" r="1.0"/>
|
||||
<color a="1.0" b="0.9843137" g="0.9843137" r="1.0"/>
|
||||
<color a="1.0" b="1.0" g="1.0" r="1.0"/>
|
||||
</colorMap>
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<styleRuleset>
|
||||
<styleRule>
|
||||
<paramLevelMatches>
|
||||
<parameter>lightning density</parameter>
|
||||
</paramLevelMatches>
|
||||
<imageStyle>
|
||||
<interpolate>false</interpolate>
|
||||
<range levelScale="LINEAR" adaptive="true">
|
||||
<minValue>0</minValue>
|
||||
<maxValue>1000</maxValue>
|
||||
</range>
|
||||
<defaultColormap>Grid/gridded data</defaultColormap>
|
||||
</imageStyle>
|
||||
</styleRule>
|
||||
</styleRuleset>
|
Loading…
Add table
Reference in a new issue