Issue #2947 Redo satellite derived parameters to use an inventory to determine availability.

Former-commit-id: 2d8106bc5b [formerly bb51fb299a] [formerly 709e3411c4] [formerly 2d8106bc5b [formerly bb51fb299a] [formerly 709e3411c4] [formerly a8bb2c0dfd [formerly 709e3411c4 [formerly 1a041cb3be1141f4af116335e5b9540beda817cb]]]]
Former-commit-id: a8bb2c0dfd
Former-commit-id: 858deeaef5 [formerly a51b965c4f] [formerly 4a7f1c2296d79b72f15c1dafa088a798fe5a813e [formerly 119ced4a01]]
Former-commit-id: fc1291a1e39fed83821a2edd5ba3bf44aa962f2a [formerly cc6d858f47]
Former-commit-id: 3c1adead47
This commit is contained in:
Ben Steffensmeier 2014-04-15 17:42:23 -05:00
parent dd609f2851
commit f1d28d027f
31 changed files with 1573 additions and 851 deletions

View file

@ -25,7 +25,10 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.viz.core,
javax.measure,
com.raytheon.uf.common.inventory;bundle-version="1.14.0",
com.raytheon.uf.viz.datacube;bundle-version="1.14.0"
com.raytheon.uf.viz.datacube;bundle-version="1.14.0",
com.raytheon.uf.common.dataplugin.level,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.numeric
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.viz.satellite,
com.raytheon.viz.satellite.rsc

View file

@ -1,77 +1,98 @@
<?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" density="1.0" magnification="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<displayList>
<displays xsi:type="d2DMapRenderableDisplay"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorMapCapability">
<colorMapParameters colorMapName="${colormap}"/>
</capability>
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0"/>
</capabilities>
<resourceType>PLAIN_VIEW</resourceType>
<perspectiveProperty xsi:type="d2dLoadProperties" overlayMatchTolerance="1"/>
</loadProperties>
<resourceData xsi:type="satBlendedResourceData" timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0"/>
</capabilities>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
<resourceData xsi:type="satResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite" constraintType="EQUALS"/>
</mapping>
<mapping key="physicalElement">
<constraint constraintValue="${element}" constraintType="IN"/>
</mapping>
<mapping key="sectorID">
<constraint constraintValue="${sector0}" constraintType="EQUALS"/>
</mapping>
<mapping key="creatingEntity">
<constraint constraintValue="${entity}" constraintType="LIKE"/>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorMapCapability">
<colorMapParameters colorMapName="${colormap}" />
</capability>
<capability xsi:type="imagingCapability" />
</capabilities>
<perspectiveProperty xsi:type="d2dLoadProperties"
overlayMatchTolerance="1" />
</loadProperties>
<resourceData xsi:type="satBlendedResourceData"
timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="imagingCapability" />
</capabilities>
</loadProperties>
<resourceData xsi:type="satResourceData">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
constraintType="EQUALS" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="execute1" constraintType="EQUALS"/>
<mapping key="physicalElement">
<constraint constraintValue="${element}"
constraintType="IN" />
</mapping>
</metadataMap>
</resourceData>
</resource>
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0"/>
</capabilities>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
<resourceData xsi:type="satResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite" constraintType="EQUALS"/>
</mapping>
<mapping key="physicalElement">
<constraint constraintValue="${element}" constraintType="IN"/>
</mapping>
<mapping key="sectorID">
<constraint constraintValue="${sector1}" constraintType="EQUALS"/>
</mapping>
<mapping key="creatingEntity">
<constraint constraintValue="${entity}" constraintType="LIKE"/>
<mapping key="sectorID">
<constraint constraintValue="${sector0}"
constraintType="EQUALS" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="execute1" constraintType="EQUALS"/>
<mapping key="creatingEntity">
<constraint constraintValue="${entity}"
constraintType="LIKE" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</metadataMap>
</resourceData>
</resource>
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="imagingCapability" />
</capabilities>
</loadProperties>
<resourceData xsi:type="satResourceData">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
constraintType="EQUALS" />
</mapping>
<mapping key="physicalElement">
<constraint constraintValue="${element}"
constraintType="IN" />
</mapping>
<mapping key="sectorID">
<constraint constraintValue="${sector1}"
constraintType="EQUALS" />
</mapping>
<mapping key="creatingEntity">
<constraint constraintValue="${entity}"
constraintType="LIKE" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</resourceData>
</resource>
<timeMatcher xsi:type="d2DTimeMatcher" deltaFilter="0" forecastFilter="0"/>
</descriptor>
</displays>
</displayList>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -1,21 +1,39 @@
<?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" density="1.0"
magnification="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<displays xsi:type="d2DMapRenderableDisplay"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<!-- best res satellite resource -->
<!-- best res satellite resource -->
<resource>
<loadProperties loadWithoutData="false">
<capabilities>
<capability xsi:type="imagingCapability"
interpolationState="false" brightness="1.0" contrast="1.0" />
<capability xsi:type="imagingCapability" />
<capability xsi:type="colorMapCapability">
<colorMapParameters colorMapName="${colormap}" />
</capability>
</capabilities>
</loadProperties>
<resourceData xsi:type="satBestResResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<resourceData xsi:type="satBestResResourceData">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
@ -33,28 +51,19 @@
<constraint constraintValue="${entity}"
constraintType="LIKE" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="true" constraintType="EQUALS"/>
</mapping>
</metadataMap>
<!-- low res blended satellite -->
<!-- low res blended satellite -->
<resource>
<loadProperties loadWithoutData="false" />
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false" isVisible="true">
<properties>
<pdProps maxDisplayWidth="100000000" minDisplayWidth="10000000" />
</properties>
<resourceData xsi:type="satBlendedResourceData" timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resourceData xsi:type="satBlendedResourceData"
timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resource>
<loadProperties loadWithoutData="false" />
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false" isVisible="true">
</properties>
<resourceData xsi:type="satResourceData"
isUpdatingOnMetadataOnly="false"
isRequeryNecessaryOnTimeMatch="true">
<binOffset posOffset="900" negOffset="900" virtualOffset="0"/>
<resourceData xsi:type="satResourceData">
<binOffset posOffset="900" negOffset="900" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
@ -72,9 +81,6 @@
<constraint constraintValue="${entity}"
constraintType="LIKE" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="true" constraintType="EQUALS"/>
</mapping>
</metadataMap>
</resourceData>
</resource>
@ -82,21 +88,14 @@
</resource>
<!-- medium res blended satellite -->
<resource>
<loadProperties loadWithoutData="false" />
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false" isVisible="true">
<properties>
<pdProps maxDisplayWidth="10000000" minDisplayWidth="6000000" />
</properties>
<resourceData xsi:type="satBlendedResourceData" timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resourceData xsi:type="satBlendedResourceData"
timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resource>
<loadProperties loadWithoutData="false" />
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false" isVisible="true">
</properties>
<resourceData xsi:type="satResourceData"
isUpdatingOnMetadataOnly="false"
isRequeryNecessaryOnTimeMatch="true">
<binOffset posOffset="900" negOffset="900" virtualOffset="0"/>
<resourceData xsi:type="satResourceData">
<binOffset posOffset="900" negOffset="900" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
@ -114,31 +113,21 @@
<constraint constraintValue="${entity}"
constraintType="LIKE" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="true" constraintType="EQUALS"/>
</mapping>
</metadataMap>
</resourceData>
</resource>
</resourceData>
</resource>
<!-- high res blended satellite -->
<!-- high res blended satellite -->
<resource>
<loadProperties loadWithoutData="false" />
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false" isVisible="true">
<properties>
<pdProps maxDisplayWidth="6000000" minDisplayWidth="2500000" />
</properties>
<resourceData xsi:type="satBlendedResourceData" timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resourceData xsi:type="satBlendedResourceData"
timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resource>
<loadProperties loadWithoutData="false" />
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false" isVisible="true">
</properties>
<resourceData xsi:type="satResourceData"
isUpdatingOnMetadataOnly="false"
isRequeryNecessaryOnTimeMatch="true">
<binOffset posOffset="450" negOffset="450" virtualOffset="0"/>
<resourceData xsi:type="satResourceData">
<binOffset posOffset="450" negOffset="450" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
@ -156,21 +145,12 @@
<constraint constraintValue="${entity}"
constraintType="LIKE" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="true" constraintType="EQUALS"/>
</mapping>
</metadataMap>
</resourceData>
</resource>
<resource>
<loadProperties loadWithoutData="false" />
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false" isVisible="true">
</properties>
<resourceData xsi:type="satResourceData"
isUpdatingOnMetadataOnly="false"
isRequeryNecessaryOnTimeMatch="true">
<binOffset posOffset="450" negOffset="450" virtualOffset="0"/>
<resourceData xsi:type="satResourceData">
<binOffset posOffset="450" negOffset="450" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
@ -188,9 +168,6 @@
<constraint constraintValue="${entity}"
constraintType="LIKE" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="true" constraintType="EQUALS"/>
</mapping>
</metadataMap>
</resourceData>
</resource>
@ -198,20 +175,13 @@
</resource>
<!-- A single side of the image -->
<resource>
<loadProperties loadWithoutData="false" />
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false" isVisible="true">
<properties>
<pdProps maxDisplayWidth="2500000" minDisplayWidth="0" />
</properties>
<resourceData xsi:type="satBlendedResourceData" timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resourceData xsi:type="satBlendedResourceData"
timeMatchMode="${timeMatchMode;EVERY_IMAGE}">
<resource>
<loadProperties loadWithoutData="false" />
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false" isVisible="true">
</properties>
<resourceData xsi:type="satResourceData"
isUpdatingOnMetadataOnly="false"
isRequeryNecessaryOnTimeMatch="true">
<resourceData xsi:type="satResourceData">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
@ -229,9 +199,6 @@
<constraint constraintValue="${entity}"
constraintType="LIKE" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="true" constraintType="EQUALS"/>
</mapping>
</metadataMap>
</resourceData>
</resource>

View file

@ -1,37 +1,53 @@
<?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" density="1.0" magnification="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
<perspectiveProperty xsi:type="d2dLoadProperties" overlayMatchTolerance="1"/>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
</properties>
<resourceData xsi:type="satResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite" constraintType="EQUALS"/>
</mapping>
<mapping key="physicalElement">
<constraint constraintValue="poesDif11u3_7uIR" constraintType="EQUALS"/>
</mapping>
<mapping key="creatingEntity">
<constraint constraintValue="NOAA18" constraintType="LIKE"/>
<displayList>
<displays xsi:type="d2DMapRenderableDisplay"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="imagingCapability" />
</capabilities>
<perspectiveProperty xsi:type="d2dLoadProperties"
overlayMatchTolerance="1" />
</loadProperties>
<resourceData xsi:type="satResourceData">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
constraintType="EQUALS" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="execute1" constraintType="EQUALS"/>
<mapping key="physicalElement">
<constraint constraintValue="poesDif11u3_7uIR"
constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
<timeMatcher xsi:type="d2DTimeMatcher" deltaFilter="0" forecastFilter="0"/>
</descriptor>
</displays>
</displayList>
<mapping key="creatingEntity">
<constraint constraintValue="NOAA18" constraintType="LIKE" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -1,43 +1,61 @@
<?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" density="1.0" magnification="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorMapCapability">
<colorMapParameters colorMapName="${colormap}"/>
</capability>
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
<perspectiveProperty xsi:type="d2dLoadProperties" overlayMatchTolerance="1"/>
</loadProperties>
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
</properties>
<resourceData xsi:type="satResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite" constraintType="EQUALS"/>
</mapping>
<mapping key="physicalElement">
<constraint constraintValue="${element}" constraintType="EQUALS"/>
</mapping>
<mapping key="sectorID">
<constraint constraintValue="${sector}" constraintType="EQUALS"/>
</mapping>
<mapping key="creatingEntity">
<constraint constraintValue="${entity}" constraintType="LIKE"/>
<displayList>
<displays xsi:type="d2DMapRenderableDisplay"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorMapCapability">
<colorMapParameters colorMapName="${colormap}" />
</capability>
<capability xsi:type="imagingCapability" />
</capabilities>
<perspectiveProperty xsi:type="d2dLoadProperties"
overlayMatchTolerance="1" />
</loadProperties>
<resourceData xsi:type="satResourceData">
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="satellite"
constraintType="EQUALS" />
</mapping>
<mapping key="DERIVED">
<constraint constraintValue="execute1" constraintType="EQUALS"/>
<mapping key="physicalElement">
<constraint constraintValue="${element}"
constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
<timeMatcher xsi:type="d2DTimeMatcher" deltaFilter="0" forecastFilter="0"/>
</descriptor>
</displays>
</displayList>
<mapping key="sectorID">
<constraint constraintValue="${sector}"
constraintType="EQUALS" />
</mapping>
<mapping key="creatingEntity">
<constraint constraintValue="${entity}"
constraintType="LIKE" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -55,4 +55,11 @@
itemProvider="com.raytheon.viz.satellite.menu.SatBundleMenuContribution">
</contributionItemProvider>
</extension>
<extension
point="com.raytheon.uf.viz.core.units">
<units
class="com.raytheon.viz.satellite.inventory.SatelliteUnitRegistrar"
name="com.raytheon.viz.satellite.units">
</units>
</extension>
</plugin>

View file

@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="satelliteDataCubeAdapter" class="com.raytheon.viz.satellite.SatelliteDataCubeAdapter" />
<bean id="satelliteDataCubeAdapter" class="com.raytheon.viz.satellite.inventory.SatelliteDataCubeAdapter" />
<bean id="satelliteDataCubeAdapterRegistered"
factory-bean="dataCubeAdapterRegistry"

View file

@ -1,525 +0,0 @@
/**
* 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.satellite;
import java.awt.Transparency;
import java.awt.color.ColorSpace;
import java.awt.image.ColorModel;
import java.awt.image.ComponentColorModel;
import java.awt.image.DataBuffer;
import java.awt.image.DataBufferByte;
import java.awt.image.Raster;
import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import javax.media.jai.Interpolation;
import org.geotools.coverage.grid.GridCoverage2D;
import org.geotools.coverage.grid.GridCoverageFactory;
import org.geotools.coverage.grid.GridGeometry2D;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.satellite.SatMapCoverage;
import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.dataquery.requests.TimeQueryRequest;
import com.raytheon.uf.common.dataquery.requests.TimeQueryRequestSet;
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.records.ByteDataRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.geospatial.MapUtil;
import com.raytheon.uf.common.time.BinOffset;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.catalog.CatalogQuery;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.uf.viz.datacube.DefaultDataCubeAdapter;
import com.raytheon.uf.viz.datacube.IDataCubeAdapter;
import com.raytheon.uf.common.derivparam.library.DerivParamDesc;
import com.raytheon.uf.common.derivparam.library.DerivParamField;
import com.raytheon.uf.common.derivparam.library.DerivParamMethod;
import com.raytheon.uf.common.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.common.derivparam.library.DerivedParameterRequest;
import com.raytheon.uf.common.derivparam.library.IDerivParamField;
/**
* {@link IDataCubeAdapter} for satellite plugin data
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 27, 2009 jsanchez Initial creation
* Nov 21, 2009 3576 rjpeter Refactored use of DerivParamDesc.
* Aug 03, 2012 798 jkorman Explicitly set interpolationLevels from
* "source" record.
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Jun 04, 2013 2041 bsteffen Switch derived parameters to use
* concurrent python for threading.
* Sep 9, 2013 2277 mschenke Got rid of ScriptCreator references
* </pre>
*
* @author jsanchez
* @version 1.0
*/
public class SatelliteDataCubeAdapter extends DefaultDataCubeAdapter {
private static final String PE = "physicalElement";
public static final String DERIVED = "DERIVED";
private Map<String, DerivParamDesc> derParLibrary;
/**
* @param pluginName
*/
public SatelliteDataCubeAdapter() {
super(SatelliteRecord.PLUGIN_ID);
}
@Override
public PluginDataObject[] getData(
Map<String, RequestConstraint> constraints, DataTime[] selectedTimes)
throws DataCubeException {
Map<String, RequestConstraint> originalQuery = constraints;
if (originalQuery.containsKey(DERIVED) == false) {
return super.getData(originalQuery, selectedTimes);
}
String requestedParam;
List<PluginDataObject> initResponses = new ArrayList<PluginDataObject>();
List<DerivedParameterRequest> listOfRequests = new ArrayList<DerivedParameterRequest>();
Map<String, RequestConstraint> modifiedQuery = new HashMap<String, RequestConstraint>(
originalQuery);
modifiedQuery.remove(DERIVED);
modifiedQuery.remove(PE);
if (!originalQuery.containsKey(PE)
|| !originalQuery.containsKey("pluginName")) {
throw new DataCubeException("getData method requires more query "
+ "information for plugin : "
+ originalQuery.get("pluginName").getConstraintValue());
} else {
String[] physicalElements = originalQuery.get(PE)
.getConstraintValue().split(",");
requestedParam = physicalElements[physicalElements.length - 1];
}
List<String> baseParams;
try {
baseParams = new ArrayList<String>(Arrays.asList(CatalogQuery
.performQuery(PE, modifiedQuery)));
} catch (VizException e) {
throw new DataCubeException(e);
}
if (!baseParams.contains(requestedParam)
&& derParLibrary.containsKey(requestedParam)) {
DerivParamDesc desc = derParLibrary.get(requestedParam);
DerivParamMethod method = desc.getMethods().get(0);
boolean requestInitialized = false;
for (IDerivParamField ifield : method.getFields()) {
DerivParamField field = (DerivParamField) ifield;
Map<String, RequestConstraint> query = modifyQuery(
modifiedQuery, field);
PluginDataObject[] pdos = super.getData(query, selectedTimes);
for (PluginDataObject pdo : pdos) {
SatelliteRecord record = (SatelliteRecord) pdo;
if (requestInitialized) {
for (DerivedParameterRequest definedRequest : listOfRequests) {
if (record.getDataTime().compareTo(
definedRequest.getBaseTime()) != 0) {
continue;
}
definedRequest.addBaseParam(record);
break;
}
} else {
DerivedParameterRequest request = new DerivedParameterRequest();
request.setParameterAbbreviation(requestedParam);
request.setMethod(method.getName());
request.addBaseParam(record);
request.setBaseTime(record.getDataTime());
listOfRequests.add(request);
SatelliteRecord derivedRecord = new SatelliteRecord(
record.getDataURI());
// Make sure to get the number of interpolation levels!
derivedRecord.setInterpolationLevels(record
.getInterpolationLevels());
derivedRecord.setPhysicalElement(originalQuery.get(PE)
.getConstraintValue());
derivedRecord.setMessageData(request);
derivedRecord.setCoverage(record.getCoverage());
// Reset dataURI after setting fields
derivedRecord.setDataURI(null);
initResponses.add(derivedRecord);
}
}
requestInitialized = true;
}
for (int i = 0; i < initResponses.size(); i++) {
Object satObject = initResponses.get(i);
SatelliteRecord record = (SatelliteRecord) satObject;
DerivedParameterRequest currentRequest = (DerivedParameterRequest) record
.getMessageData();
if (currentRequest.getBaseParams().size() != method.getFields()
.size()) {
if (initResponses.remove(satObject)) {
i--;
}
}
}
return initResponses.toArray(new PluginDataObject[0]);
} else {
return super.getData(originalQuery, selectedTimes);
}
}
@Override
public IDataRecord[] getRecord(PluginDataObject obj)
throws DataCubeException {
if (obj.getMessageData() == null) {
return super.getRecord(obj);
}
return null;
}
@Override
public IDataRecord[] getRecord(PluginDataObject obj, Request req,
String dataset) throws DataCubeException {
if (obj.getMessageData() == null) {
return super.getRecord(obj, req, dataset);
}
boolean interpolate = false;
int targetWidth = 0;
int targetHeight = 0;
ArrayList<File> hdf5Files = new ArrayList<File>();
ArrayList<String> datasets = new ArrayList<String>();
ArrayList<SatelliteRecord> records = new ArrayList<SatelliteRecord>();
ArrayList<Object> bytes = new ArrayList<Object>();
DerivedParameterRequest derivedRequest = (DerivedParameterRequest) obj
.getMessageData();
// clone the request in case of multiple threads.
derivedRequest = new DerivedParameterRequest(derivedRequest);
for (Object param : derivedRequest.getBaseParams()) {
records.add((SatelliteRecord) param);
hdf5Files.add(HDF5Util.findHDF5Location((SatelliteRecord) param));
datasets.add(getDataset(((SatelliteRecord) param).getDataURI(),
dataset));
}
int largestRecIdx = 0;
/*
* Need to update to take into account if more than 2 sat records are
* used in derived parameter
*/
GridGeometry2D geo = null;
if (!records.get(0).getCoverage().getNx()
.equals(records.get(1).getCoverage().getNx())
|| !records.get(0).getCoverage().getNy()
.equals(records.get(1).getCoverage().getNy())) {
interpolate = true;
SatMapCoverage coverage = records.get(largestRecIdx).getCoverage();
geo = coverage.getGridGeometry();
targetWidth = coverage.getNx();
targetHeight = coverage.getNy();
}
try {
int i = 0;
for (File file : hdf5Files) {
IDataStore ds = DataStoreFactory.getDataStore(file);
IDataRecord rec = null;
if (interpolate && i != largestRecIdx) {
if (obj.getRecord() == null) {
rec = ds.retrieve("", datasets.get(i), Request.ALL);
int w = (int) ((ByteDataRecord) rec).getSizes()[0];
int h = (int) ((ByteDataRecord) rec).getSizes()[1];
obj.setRecord(interpolate((ByteDataRecord) rec, w, h,
targetWidth, targetHeight, geo));
}
// cut out the tiles from that interpolated dataset
// and make an image from just that small subset
ByteDataRecord bdr = cutTile(
(ByteDataRecord) obj.getRecord(), req);
bytes.add(bdr);
} else {
rec = ds.retrieve("", datasets.get(i), req);
bytes.add((ByteDataRecord) rec);
}
i++;
}
} catch (Exception e) {
throw new DataCubeException("Error in Satellite Data Cube", e);
}
derivedRequest.setArgumentRecords(bytes.toArray(new Object[] {}));
List<?> finalResult;
try {
finalResult = DerivedParameterGenerator.calculate(derivedRequest);
} catch (ExecutionException e) {
throw new DataCubeException(e);
}
if (finalResult != null && finalResult.size() == 1) {
return new IDataRecord[] { ((ByteDataRecord) finalResult.get(0)) };
}
return null;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.core.datastructure.IDataCubeAdapter#getRecords(java
* .util.List, com.raytheon.uf.common.datastorage.Request, java.lang.String)
*/
@Override
public void getRecords(List<PluginDataObject> objs, Request req,
String dataset) throws DataCubeException {
for (PluginDataObject obj : objs) {
IDataRecord[] records = getRecord(obj, req, dataset);
obj.setMessageData(records);
}
}
@Override
public void initInventory() {
derParLibrary = DerivedParameterGenerator.getDerParLibrary();
}
private String getDataset(String dataUri, String dataset) {
return "/" + dataUri + "/" + dataset;
}
private ByteDataRecord interpolate(ByteDataRecord bdr, int width,
int height, int targetWidth, int targetHeight, GridGeometry2D geo) {
int[] nBits = new int[] { 8 };
GridCoverageFactory factory = new GridCoverageFactory();
ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
ColorModel cm = new ComponentColorModel(cs, nBits, false, true,
Transparency.OPAQUE, DataBuffer.TYPE_BYTE);
DataBufferByte data = new DataBufferByte(bdr.getByteData(), height
* width);
SampleModel sm = cm.createCompatibleSampleModel(width, height);
WritableRaster writeRaster = WritableRaster.createWritableRaster(sm,
data, null);
// Create the coverage for the image
GridCoverage2D gc = factory
.create("in", writeRaster, geo.getEnvelope());
GridCoverage2D projected = MapUtil.reprojectCoverage(gc,
geo.getCoordinateReferenceSystem(), geo,
Interpolation.getInstance(Interpolation.INTERP_NEAREST));
Raster currSatRaster = projected.getRenderedImage().getData();
byte[] currSat = ((DataBufferByte) currSatRaster.getDataBuffer())
.getData();
long newSizes[] = { (long) targetWidth, (long) targetHeight };
ByteDataRecord rval = new ByteDataRecord(bdr.getName(), bdr.getGroup(),
currSat, bdr.getDimension(), newSizes);
return rval;
}
private ByteDataRecord cutTile(ByteDataRecord bdr, Request req) {
int minTileX = req.getMinIndexForSlab()[0];
int minTileY = req.getMinIndexForSlab()[1];
int maxTileX = req.getMaxIndexForSlab()[0];
int maxTileY = req.getMaxIndexForSlab()[1];
int widthOfWholeImage = (int) bdr.getSizes()[0];
int newWidth = maxTileX - minTileX;
int newHeight = maxTileY - minTileY;
long newSizes[] = { (long) newWidth, (long) newHeight };
byte bytes[] = bdr.getByteData();
byte newBytes[] = new byte[newHeight * newWidth];
int index = 0;
for (int j = minTileY; j < maxTileY; j++) {
for (int i = minTileX; i < maxTileX; i++) {
newBytes[index++] = bytes[j * widthOfWholeImage + i];
}
}
ByteDataRecord rval = new ByteDataRecord(bdr.getName(), bdr.getGroup(),
newBytes, bdr.getDimension(), newSizes);
return rval;
}
private static String getPhysicalElement(DerivParamField field) {
return field.getParam().replace("_", " ").replace("pp", ".")
.replace("oo", "(").replace("cc", ")").replace("hh", "-");
}
@Override
public List<Map<String, RequestConstraint>> getBaseUpdateConstraints(
Map<String, RequestConstraint> constraints) {
if (constraints.containsKey(DERIVED)) {
constraints = new HashMap<String, RequestConstraint>(constraints);
constraints.remove(DERIVED);
RequestConstraint pe = constraints.remove(PE);
DerivParamDesc desc = derParLibrary.get(pe.getConstraintValue());
DerivParamMethod method = desc.getMethods().get(0);
pe = new RequestConstraint(null, ConstraintType.IN);
for (IDerivParamField ifield : method.getFields()) {
DerivParamField field = (DerivParamField) ifield;
pe.addToConstraintValueList(getPhysicalElement(field));
}
constraints.put(PE, pe);
}
return super.getBaseUpdateConstraints(constraints);
}
@Override
public List<List<DataTime>> timeQuery(List<TimeQueryRequest> requests)
throws DataCubeException {
Map<TimeQueryRequest, Integer> derivedRequests = new HashMap<TimeQueryRequest, Integer>();
List<TimeQueryRequest> baseRequests = new ArrayList<TimeQueryRequest>(
requests.size());
for (TimeQueryRequest request : requests) {
if (!request.getQueryTerms().containsKey("DERIVED")) {
baseRequests.add(request);
} else {
List<TimeQueryRequest> derived = getDerivedRequests(request,
request.getBinOffset());
derivedRequests.put(request, derived.size());
baseRequests.addAll(derived);
// TODO it might be possible to merge the derived requests that
// have dependencies that are the same as some of the non
// derived requests to avoid hitting the db twice.
}
}
TimeQueryRequestSet set = new TimeQueryRequestSet();
set.setRequests(baseRequests.toArray(new TimeQueryRequest[0]));
List<List<DataTime>> baseResults;
try {
baseResults = (List<List<DataTime>>) ThriftClient.sendRequest(set);
} catch (VizException e) {
throw new DataCubeException(e);
}
List<List<DataTime>> results = new ArrayList<List<DataTime>>(
requests.size());
int baseIndex = 0;
for (TimeQueryRequest request : requests) {
if (derivedRequests.containsKey(request)) {
int size = derivedRequests.get(request);
List<DataTime> timeList = new ArrayList<DataTime>();
for (int i = 0; i < size; i++) {
List<DataTime> derived = baseResults.get(baseIndex);
if (derived != null && !derived.isEmpty()
&& timeList.size() == 0) {
timeList.addAll(derived);
} else if (derived != null && !derived.isEmpty()
&& timeList.size() > 0) {
ArrayList<DataTime> newTimeList = new ArrayList<DataTime>();
for (DataTime result : derived) {
for (DataTime check : timeList) {
if (check.equals(result)) {
newTimeList.add(result);
continue;
}
}
}
timeList = newTimeList;
} else if ((derived == null || derived.isEmpty())
&& timeList.size() > 0) {
timeList.clear();
}
baseIndex += 1;
}
if (request.isMaxQuery() && !timeList.isEmpty()) {
Collections.sort(timeList);
results.add(Arrays.asList(timeList.get(timeList.size() - 1)));
} else {
results.add(timeList);
}
} else {
results.add(baseResults.get(baseIndex));
baseIndex += 1;
}
}
return results;
}
private List<TimeQueryRequest> getDerivedRequests(TimeQueryRequest request,
BinOffset binOffset) {
List<TimeQueryRequest> result = new ArrayList<TimeQueryRequest>(2);
Map<String, RequestConstraint> queryParams = new HashMap<String, RequestConstraint>(
request.getQueryTerms());
String plugin = queryParams.get("pluginName").getConstraintValue();
String param = queryParams.get(PE).getConstraintValue();
if (plugin.matches("satellite") && derParLibrary.containsKey(param)) {
DerivParamDesc derParDesc = derParLibrary.get(param);
DerivParamMethod method = derParDesc.getMethods().get(0);
// We have a derived parameter for the requested grid
for (IDerivParamField ifield : method.getFields()) {
DerivParamField field = (DerivParamField) ifield;
TimeQueryRequest newRequest = new TimeQueryRequest();
newRequest.setBinOffset(binOffset);
newRequest.setMaxQuery(false);
newRequest.setQueryTerms(modifyQuery(queryParams, field));
newRequest.setPluginName("satellite");
result.add(newRequest);
}
}
return result;
}
private Map<String, RequestConstraint> modifyQuery(
Map<String, RequestConstraint> originalQuery, DerivParamField field) {
HashMap<String, RequestConstraint> query = new HashMap<String, RequestConstraint>(
originalQuery);
String paramAbb = getPhysicalElement(field);
query.put(PE, new RequestConstraint(paramAbb,
RequestConstraint.ConstraintType.EQUALS));
query.remove(DERIVED);
return query;
}
}

View file

@ -0,0 +1,132 @@
/**
* 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.satellite.inventory;
import org.geotools.coverage.grid.GridEnvelope2D;
import org.geotools.coverage.grid.GridGeometry2D;
import org.geotools.geometry.Envelope2D;
import org.opengis.geometry.BoundingBox;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import com.raytheon.uf.common.dataplugin.satellite.SatMapCoverage;
import com.raytheon.uf.common.geospatial.IGridGeometryProvider;
import com.raytheon.uf.common.inventory.IGridGeometryProviderComparable;
/**
* A wrapper around {@link SatMapCoverage} that can be compared with other
* satellite coverages for derived parameters to be able to calculate between
* data at different resolution. It currently always chooses the higher
* resolutioon coverage when doing comparisons.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 11, 2014 2947 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class ComparableSatMapCoverage implements
IGridGeometryProviderComparable {
private final SatMapCoverage coverage;
public ComparableSatMapCoverage(SatMapCoverage coverage) {
this.coverage = coverage;
}
@Override
public GridGeometry2D getGridGeometry() {
return coverage.getGridGeometry();
}
@Override
public IGridGeometryProvider compare(IGridGeometryProvider other) {
if (other instanceof ComparableSatMapCoverage) {
ComparableSatMapCoverage otherCoverage = (ComparableSatMapCoverage) other;
if (otherCoverage.getCRS().equals(getCRS())
&& otherCoverage.getBoundingBox().intersects(
getBoundingBox())){
if(getResolution() > otherCoverage.getResolution()){
return this;
}else{
return other;
}
}
}
return null;
}
public SatMapCoverage getCoverage() {
return coverage;
}
protected CoordinateReferenceSystem getCRS() {
return coverage.getGridGeometry().getCoordinateReferenceSystem();
}
protected BoundingBox getBoundingBox() {
return coverage.getGridGeometry().getEnvelope2D();
}
/**
* @return the resolution of the grid represented by this coverage in
* pixel/(m²).
*/
protected double getResolution() {
GridGeometry2D gg = coverage.getGridGeometry();
Envelope2D e = gg.getEnvelope2D();
GridEnvelope2D r = gg.getGridRange2D();
return (r.width * r.height) / (e.width * e.height);
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((coverage == null) ? 0 : coverage.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;
ComparableSatMapCoverage other = (ComparableSatMapCoverage) obj;
if (coverage == null) {
if (other.coverage != null)
return false;
} else if (!coverage.equals(other.coverage))
return false;
return true;
}
}

View file

@ -0,0 +1,164 @@
/**
* 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.satellite.inventory;
import java.awt.Rectangle;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import javax.measure.unit.UnitFormat;
import org.geotools.coverage.grid.GridEnvelope2D;
import org.geotools.coverage.grid.GridGeometry2D;
import org.opengis.geometry.Envelope;
import org.opengis.referencing.operation.TransformException;
import com.raytheon.uf.common.dataplugin.satellite.SatMapCoverage;
import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.geospatial.interpolation.GridDownscaler;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
/**
* Satellite record which performs derived parameter calculations to get data
* instead of requesting directly from hdf5.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 09, 2014 2947 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class DerivedSatelliteRecord extends SatelliteRecord {
private static final long serialVersionUID = 1L;
private final AbstractRequestableData requestableData;
public DerivedSatelliteRecord(AbstractRequestableData requestableData)
throws DataCubeException {
this.requestableData = requestableData;
setDataTime(requestableData.getDataTime());
setPhysicalElement(requestableData.getParameter());
setSectorID(requestableData.getSource());
setUnits(UnitFormat.getUCUMInstance().format(requestableData.getUnit()));
Set<SatelliteRecord> base = findBaseRecords(requestableData);
Set<String> creatingEntities = new HashSet<String>();
int interpolationLevels = 1;
for (SatelliteRecord record : base) {
creatingEntities.add(record.getCreatingEntity());
interpolationLevels = Math.max(interpolationLevels,
record.getInterpolationLevels());
}
setInterpolationLevels(interpolationLevels);
if (creatingEntities.size() == 1) {
setCreatingEntity(creatingEntities.iterator().next());
} else {
throw new DataCubeException("Too many creating entities: "
+ creatingEntities);
}
if (requestableData.getSpace() instanceof SatMapCoverage) {
setCoverage((SatMapCoverage) requestableData.getSpace());
} else if (requestableData.getSpace() instanceof ComparableSatMapCoverage) {
setCoverage(((ComparableSatMapCoverage) requestableData.getSpace())
.getCoverage());
}
}
/**
* Perform the necessary calculations to get data that matches the provided
* request and dataset and store the result in the messageData field.
*
* @param req
* a {@link Request} specifying the amount of data to return
* @param dataset
* indicates the interpolation level to deriv, uses the same
* naming convention as raw satellite data.
* @throws DataCubeException
*/
public void deriveMessageData(Request req, String dataset)
throws DataCubeException {
Rectangle[] levels = GridDownscaler
.getDownscaleSizes(getGridGeometry());
int level;
for (level = 0; level < levels.length; ++level) {
if (DataStoreFactory.createDataSetName(null,
SatelliteRecord.SAT_DATASET_NAME, level).equals(
dataset)) {
break;
}
}
if (level >= levels.length) {
throw new DataCubeException("Unrecognized dataset: " + dataset);
}
GridGeometry2D gridGeometry = new GridGeometry2D(new GridEnvelope2D(
levels[level]), getGridGeometry().getEnvelope());
if (req.getType() == Request.Type.SLAB) {
int[] min = req.getMinIndexForSlab();
int[] max = req.getMaxIndexForSlab();
GridEnvelope2D range = new GridEnvelope2D(min[0], min[1], max[0]
- min[0], max[1] - min[1]);
Envelope env;
try {
env = gridGeometry.gridToWorld(range);
} catch (TransformException e) {
throw new DataCubeException(e);
}
gridGeometry = new GridGeometry2D(range, env);
} else if (req.getType() != Request.Type.ALL) {
throw new DataCubeException(
"Unsupported request type for derived satellite data: "
+ req.getType());
}
Object dataValue = requestableData.getDataValue(gridGeometry);
setMessageData(dataValue);
}
private static Set<SatelliteRecord> findBaseRecords(
AbstractRequestableData data) {
if (data instanceof SatelliteRequestableData) {
SatelliteRequestableData srd = (SatelliteRequestableData) data;
return Collections.singleton(srd.getRecord());
} else {
Set<SatelliteRecord> entities = new HashSet<SatelliteRecord>();
for (AbstractRequestableData dep : data.getDependencies()) {
entities.addAll(findBaseRecords(dep));
}
return entities;
}
}
public String getName() {
return requestableData.getParameterName();
}
}

View file

@ -0,0 +1,100 @@
/**
* 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.satellite.inventory;
import java.util.HashMap;
import java.util.Map;
import com.raytheon.uf.common.dataplugin.satellite.SatMapCoverage;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.serialization.comm.RequestRouter;
/**
* A cache of {@link SatMapCoverage} based off the gid field. This cache can be
* used to some types of satellite queries that need the SatMapCoverage because
* the query can only request the gid field and then load the full coverage from
* cache.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 09, 2014 2947 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class SatelliteCoverageCache {
private static final String GID = "gid";
/**
* Map containing cached coverages, all access to this map must be
* syncronized.
*/
private final Map<Integer, SatMapCoverage> cache = new HashMap<Integer, SatMapCoverage>();
public SatelliteCoverageCache() throws DataCubeException {
/* Prepopulate the cache. */
DbQueryRequest request = new DbQueryRequest();
request.setEntityClass(SatMapCoverage.class);
handleRequest(request);
}
public SatMapCoverage get(int gid) throws DataCubeException {
synchronized (cache) {
SatMapCoverage result = cache.get(gid);
if (result == null) {
DbQueryRequest request = new DbQueryRequest();
request.setEntityClass(SatMapCoverage.class);
request.addConstraint(GID,
new RequestConstraint(Integer.toString(gid)));
handleRequest(request);
result = cache.get(gid);
}
return result;
}
}
private void handleRequest(DbQueryRequest request) throws DataCubeException {
DbQueryResponse response;
try {
response = (DbQueryResponse) RequestRouter.route(request);
} catch (Exception e) {
throw new DataCubeException(e);
}
SatMapCoverage[] coverages = response
.getEntityObjects(SatMapCoverage.class);
synchronized (cache) {
for (SatMapCoverage coverage : coverages) {
cache.put(coverage.getGid(), coverage);
}
}
}
}

View file

@ -0,0 +1,178 @@
/**
* 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.satellite.inventory;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode.Dependency;
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.datacube.AbstractDataCubeAdapter;
/**
* DataCubeAdapter for satellite
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 09, 2014 2947 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class SatelliteDataCubeAdapter extends AbstractDataCubeAdapter {
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(SatelliteDataCubeAdapter.class);
/**
* @deprecated This used to be a required key in derived request constraints
* but is no longer necessary
*/
@Deprecated
public static final String DERIVED = "DERIVED";
private SatelliteInventory inventory;
public SatelliteDataCubeAdapter() {
super(new String[] { SatelliteInventory.SATELLITE });
}
@Override
public void initInventory() {
if (inventory == null) {
try {
SatelliteInventory inventory = new SatelliteInventory();
inventory
.initTree(DerivedParameterGenerator.getDerParLibrary());
this.inventory = inventory;
} catch (Exception e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
}
}
@Override
public Object getInventory() {
return inventory;
}
@Override
protected List<AbstractRequestableNode> evaluateRequestConstraints(
Map<String, RequestConstraint> constraints) {
return inventory.evaluateRequestConstraints(constraints);
}
@Override
protected List<DataTime> timeAgnosticQuery(
Map<String, RequestConstraint> queryTerms) throws DataCubeException {
return inventory.timeAgnosticQuery(queryTerms);
}
@Override
protected List<PluginDataObject> getData(
Map<String, RequestConstraint> constraints,
DataTime[] selectedTimes, List<AbstractRequestableData> requesters)
throws DataCubeException {
List<PluginDataObject> results = new ArrayList<PluginDataObject>(
requesters.size());
for (AbstractRequestableData requester : requesters) {
if(requester instanceof SatelliteRequestableData){
results.add(((SatelliteRequestableData) requester).getRecord());
} else {
results.add(new DerivedSatelliteRecord(requester));
}
}
return results;
}
@Override
public void getRecords(List<PluginDataObject> objs, Request req,
String dataset) throws DataCubeException {
List<PluginDataObject> simpleRecords = new ArrayList<PluginDataObject>(
objs.size());
for (PluginDataObject obj : objs) {
if (obj instanceof DerivedSatelliteRecord) {
((DerivedSatelliteRecord) obj).deriveMessageData(req, dataset);
} else if (obj instanceof SatelliteRecord) {
simpleRecords.add(obj);
} else if (obj != null) {
throw new DataCubeException(this.getClass().getSimpleName()
+ " cannot get records for a "
+ obj.getClass().getSimpleName());
}
}
if (!simpleRecords.isEmpty()) {
super.getRecords(simpleRecords, req, dataset);
}
}
@Override
public List<Map<String, RequestConstraint>> getBaseUpdateConstraints(
Map<String, RequestConstraint> constraints) {
List<AbstractRequestableNode> nodes = evaluateRequestConstraints(constraints);
List<Map<String, RequestConstraint>> baseConstraints = new ArrayList<Map<String, RequestConstraint>>(
nodes.size() * 2);
for (AbstractRequestableNode node : nodes) {
baseConstraints.addAll(getBaseUpdateConstraints(node));
}
return baseConstraints;
}
protected List<Map<String, RequestConstraint>> getBaseUpdateConstraints(
AbstractRequestableNode node) {
if (node instanceof SatelliteRequestableLevelNode) {
SatelliteRequestableLevelNode satNode = (SatelliteRequestableLevelNode) node;
return Collections.singletonList(satNode.getRequestConstraintMap());
} else if (node instanceof AbstractDerivedDataNode) {
AbstractDerivedDataNode derivedNode = (AbstractDerivedDataNode) node;
List<Map<String, RequestConstraint>> baseConstraints = new ArrayList<Map<String, RequestConstraint>>();
for (Dependency d : derivedNode.getDependencies()) {
baseConstraints.addAll(getBaseUpdateConstraints(d.node));
}
return baseConstraints;
}
return Collections.emptyList();
}
}

View file

@ -0,0 +1,229 @@
/**
* 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.satellite.inventory;
import java.util.Collection;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.derivparam.inv.AbstractInventory;
import com.raytheon.uf.common.derivparam.library.DerivParamDesc;
import com.raytheon.uf.common.derivparam.library.DerivParamField;
import com.raytheon.uf.common.derivparam.library.DerivParamMethod;
import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.DataTree;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.ParameterNode;
import com.raytheon.uf.common.inventory.tree.SourceNode;
import com.raytheon.uf.common.serialization.comm.RequestRouter;
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;
/**
* Inventory of available satellite data. sectorID is used for source and
* physicalElement for parameter, the level is always the entire atmosphere.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 09, 2014 2947 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class SatelliteInventory extends AbstractInventory {
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(SatelliteInventory.class);
public static final String SATELLITE = "satellite";
public static final String SECTOR_ID = "sectorID";
public static final String PHYSICALELEMENT = "physicalElement";
public static final String GID = "coverage.gid";
private SatelliteCoverageCache coverages;
private Level level;
@Override
public List<DataTime> timeAgnosticQuery(Map<String, RequestConstraint> query) {
/* Returning null means no data will be time agnostic. */
return null;
}
@Override
public synchronized void initTree(Map<String, DerivParamDesc> derParLibrary)
throws DataCubeException {
try {
level = LevelFactory.getInstance().getLevel("EA", 0.0);
} catch (CommunicationException e) {
throw new DataCubeException(e);
}
coverages = new SatelliteCoverageCache();
super.initTree(derParLibrary);
}
@Override
protected DataTree createBaseTree() {
DbQueryRequest request = new DbQueryRequest();
request.setEntityClass(SatelliteRecord.class);
request.setDistinct(true);
request.addRequestField(SECTOR_ID);
request.addRequestField(PHYSICALELEMENT);
DbQueryResponse response;
try {
response = (DbQueryResponse) RequestRouter.route(request);
} catch (Exception e) {
// TODO Auto-generated catch block. Please revise as appropriate.
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
return null;
}
String levelId = Long.toString(level.getId());
DataTree tree = new DataTree();
for (Map<String, Object> result : response.getResults()) {
String sectorID = (String) result.get(SECTOR_ID);
String physicalElement = (String) result.get(PHYSICALELEMENT);
SourceNode sourceNode = tree.getSourceNode(sectorID);
if (sourceNode == null) {
sourceNode = new SourceNode();
sourceNode.setValue(sectorID);
tree.getSourceNodes().put(sectorID, sourceNode);
}
ParameterNode paramNode = sourceNode.getChildNode(physicalElement);
if (paramNode == null) {
paramNode = new ParameterNode();
paramNode.setValue(physicalElement);
paramNode.setParameterName(physicalElement);
sourceNode.addChildNode(paramNode);
}
LevelNode levelNode = paramNode.getChildNode(levelId);
if (levelNode == null) {
Map<String, RequestConstraint> requestConstraints = new HashMap<String, RequestConstraint>();
requestConstraints.put(SECTOR_ID, new RequestConstraint(
sectorID));
requestConstraints.put(PHYSICALELEMENT, new RequestConstraint(
physicalElement));
requestConstraints.put(PluginDataObject.PLUGIN_NAME_ID,
new RequestConstraint(SATELLITE));
levelNode = new SatelliteRequestableLevelNode(coverages,
requestConstraints);
levelNode.setValue(levelId);
paramNode.addChildNode(levelNode);
}
}
return tree;
}
@Override
protected LevelNode getCubeNode(SourceNode sNode, DerivParamField field,
Deque<StackEntry> stack, Set<StackEntry> nodata) {
/* Returning null means cubes is not supported. */
return null;
}
@Override
protected AbstractDerivedDataNode getImportNode(
AbstractRequestableData nodeToImport, SourceNode destSourceNode,
DerivParamDesc desc, DerivParamMethod method, Level level) {
/* Returning null means import is not supported. */
return null;
}
@Override
protected AbstractDerivedDataNode getImportNode(
AbstractRequestableNode nodeToImport,
String nodeToImportSourceName, SourceNode destSourceNode,
DerivParamDesc desc, DerivParamMethod method, Level level) {
/* Returning null means import is not supported. */
return null;
}
@Override
protected Object resolvePluginStaticData(SourceNode sNode,
DerivParamField field, Level level) {
/* Returning null means static data is not supported. */
return null;
}
protected List<AbstractRequestableNode> evaluateRequestConstraints(
Map<String, RequestConstraint> constraints) {
Collection<String> sources = getAllSources();
RequestConstraint sectorLimiter = constraints.get(SECTOR_ID);
if (sectorLimiter != null) {
Iterator<String> it = sources.iterator();
while (it.hasNext()) {
if (!sectorLimiter.evaluate(it.next())) {
it.remove();
}
}
}
Collection<String> parameters = getAllParameters();
RequestConstraint peLimiter = constraints.get(PHYSICALELEMENT);
if (peLimiter != null) {
Iterator<String> it = parameters.iterator();
while (it.hasNext()) {
if (!peLimiter.evaluate(it.next())) {
it.remove();
}
}
}
Collection<Level> levels = Collections.singleton(level);
try {
List<AbstractRequestableNode> result = walkTree(null, sources,
parameters, levels, true, true, null);
return result;
} catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
return Collections.emptyList();
}
}
}

View file

@ -0,0 +1,214 @@
/**
* 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.satellite.inventory;
import java.awt.Point;
import java.awt.Rectangle;
import java.util.Map;
import javax.measure.unit.Unit;
import org.geotools.coverage.grid.GridEnvelope2D;
import org.geotools.coverage.grid.GridGeometry2D;
import org.geotools.geometry.Envelope2D;
import org.opengis.coverage.grid.GridEnvelope;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.TransformException;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.geospatial.interpolation.GridDownscaler;
import com.raytheon.uf.common.geospatial.interpolation.GridReprojection;
import com.raytheon.uf.common.geospatial.interpolation.NearestNeighborInterpolation;
import com.raytheon.uf.common.geospatial.interpolation.PrecomputedGridReprojection;
import com.raytheon.uf.common.geospatial.util.SubGridGeometryCalculator;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.numeric.buffer.BufferWrapper;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.viz.datacube.CubeUtil;
import com.raytheon.viz.satellite.tileset.SatDataRetriever;
/**
* Object capable of requesting Satellite data for base or derived displays. Can
* also reproject into different coverages
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 09, 2014 2947 bsteffen Initial creation
*
* </pre>
*
* @author mschenke
* @version 1.0
*/
public class SatelliteRequestableData extends AbstractRequestableData {
private final SatelliteRecord record;
public SatelliteRequestableData(SatelliteRecord record, Level level) {
this.record = record;
this.dataTime = record.getDataTime();
this.level = level;
this.parameter = record.getPhysicalElement();
this.parameterName = record.getPhysicalElement();
this.source = record.getSectorID();
this.space = new ComparableSatMapCoverage(record.getCoverage());
}
public SatelliteRecord getRecord() {
return record;
}
@Override
public Object getDataValue(Object arg) throws DataCubeException {
if (arg instanceof GridGeometry2D) {
GridGeometry2D requestGeom = (GridGeometry2D) arg;
GridGeometry2D recordGeom = record.getGridGeometry();
validateCRSMatch(requestGeom, recordGeom);
/* Figure out what level is needed */
Envelope2D requestEnv = requestGeom.getEnvelope2D();
GridEnvelope2D requestRange = requestGeom.getGridRange2D();
double requestDx = requestEnv.width / requestRange.width;
double requestDy = requestEnv.height / requestRange.height;
Envelope2D recordEnv = recordGeom.getEnvelope2D();
Rectangle[] levels = GridDownscaler.getDownscaleSizes(recordGeom);
int bestLevel = 0;
for (int level = levels.length - 1; level >= 0; level -= 1) {
double levelDx = recordEnv.width / levels[level].width;
double levelDy = recordEnv.height / levels[level].height;
if (levelDx <= requestDx || levelDy <= requestDy) {
bestLevel = Math.max(0, level);
break;
}
}
/* figure out what area of the level is needed. */
GridGeometry2D levelGeom = new GridGeometry2D(
(GridEnvelope) new GridEnvelope2D(levels[bestLevel]),
recordEnv);
Request request;
SubGridGeometryCalculator subGrid;
try {
subGrid = new SubGridGeometryCalculator(requestEnv, levelGeom);
} catch (TransformException e) {
throw new DataCubeException(e);
}
if (subGrid.isEmpty()) {
/* The SpaceTimeMatcher should prevent this from ever happening */
throw new DataCubeException(
"Request Area does not intersect data area.");
} else if (subGrid.isFull()) {
request = Request.ALL;
} else {
request = Request.buildSlab(subGrid.getGridRangeLow(true),
subGrid.getGridRangeHigh(false));
}
String dataset = DataStoreFactory.createDataSetName(null,
SatelliteRecord.SAT_DATASET_NAME, bestLevel);
IDataRecord dataRecord = CubeUtil.retrieveData(record,
record.getPluginName(), request, dataset);
unit = SatDataRetriever.getDataUnit(
SatDataRetriever.getRecordUnit(record), dataRecord);
/* Reproject the data to match the request. */
GridGeometry2D subGeom = subGrid.getSubGridGeometry2D();
BufferWrapper source = BufferWrapper.wrapArray(
dataRecord.getDataObject(), subGeom.getGridRange2D().width,
subGeom.getGridRange2D().height);
BufferWrapper dest = BufferWrapper.create(
source.getPrimitiveType(), requestRange.width,
requestRange.height);
try {
GridReprojection reproj = PrecomputedGridReprojection
.getReprojection(subGeom, requestGeom);
reproj.reprojectedGrid(new NearestNeighborInterpolation(),
source, dest);
} catch (TransformException e) {
throw new DataCubeException(e);
} catch (FactoryException e) {
throw new DataCubeException(e);
}
Map<String, Object> attrs = dataRecord.getDataAttributes();
dataRecord = DataStoreFactory.createStorageRecord(
dataRecord.getName(), dataRecord.getGroup(),
dest.getArray(), 2, new long[] { requestRange.width,
requestRange.height });
dataRecord.setFillValue(0);
if (attrs != null) {
Number fill = (Number) attrs
.get(SatelliteRecord.SAT_FILL_VALUE);
if (fill != null) {
dataRecord.setFillValue(fill);
}
}
return dataRecord;
} else {
return CubeUtil.retrieveData(record, record.getPluginName(),
Request.ALL, SatelliteRecord.SAT_DATASET_NAME);
}
}
private static void validateCRSMatch(GridGeometry2D requestGeom,
GridGeometry2D recordGeom) throws DataCubeException {
CoordinateReferenceSystem requestCRS = requestGeom
.getCoordinateReferenceSystem();
CoordinateReferenceSystem recordCRS = recordGeom
.getCoordinateReferenceSystem();
if (!requestCRS.equals(recordCRS)) {
/* The SpaceTimeMatcher should prevent this from ever happening */
throw new DataCubeException("Incompatible CRSs\n"
+ requestCRS.toWKT() + "\n" + recordCRS.toWKT());
}
}
@Override
public Unit<?> getUnit() {
if (this.unit == null) {
/*
* Normally a data request occurs before anything needs the unit so
* this should never happen.
*/
try {
IDataRecord dataRecord = CubeUtil.retrieveData(record,
record.getPluginName(),
Request.buildPointRequest(new Point(0, 0)),
SatelliteRecord.SAT_DATASET_NAME);
unit = SatDataRetriever.getDataUnit(
SatDataRetriever.getRecordUnit(record), dataRecord);
} catch (DataCubeException e) {
UFStatus.getHandler(getClass()).error("Cannot find data unit.",
e);
}
}
return super.getUnit();
}
}

View file

@ -0,0 +1,173 @@
/**
* 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.satellite.inventory;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.satellite.SatMapCoverage;
import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.derivparam.tree.AbstractBaseDataNode;
import com.raytheon.uf.common.inventory.TimeAndSpace;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.time.DataTime;
/**
*
* Satellite Requestable level node
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 09, 2014 2947 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class SatelliteRequestableLevelNode extends AbstractBaseDataNode {
private final SatelliteCoverageCache coverages;
private final Map<String, RequestConstraint> requestConstraints;
public SatelliteRequestableLevelNode(SatelliteCoverageCache coverages,
Map<String, RequestConstraint> requestConstraints) {
this.coverages = coverages;
this.requestConstraints = requestConstraints;
}
public Map<String, RequestConstraint> getRequestConstraintMap() {
return requestConstraints;
}
protected DbQueryRequest getBaseRequest(
Map<String, RequestConstraint> originalConstraints) {
Map<String, RequestConstraint> constraints = new HashMap<String, RequestConstraint>(
originalConstraints);
constraints.putAll(requestConstraints);
constraints.remove(SatelliteDataCubeAdapter.DERIVED);
DbQueryRequest request = new DbQueryRequest();
request.setEntityClass(SatelliteRecord.class);
request.setDistinct(true);
request.setConstraints(constraints);
return request;
}
@Override
public DbQueryRequest getAvailabilityRequest(
Map<String, RequestConstraint> originalConstraints) {
DbQueryRequest request = getBaseRequest(originalConstraints);
request.addRequestField(PluginDataObject.DATATIME_ID);
request.addRequestField(SatelliteInventory.GID);
return request;
}
@Override
public DbQueryRequest getDataRequest(
Map<String, RequestConstraint> originalConstraints,
Set<TimeAndSpace> availability) {
DbQueryRequest request = getBaseRequest(originalConstraints);
RequestConstraint timeRc = new RequestConstraint();
timeRc.setConstraintType(ConstraintType.IN);
for (TimeAndSpace time : availability) {
timeRc.addToConstraintValueList(time.getTime().toString());
}
request.addConstraint(PluginDataObject.DATATIME_ID, timeRc);
return request;
}
@Override
public Set<TimeAndSpace> getAvailability(
Map<String, RequestConstraint> originalConstraints, Object response)
throws DataCubeException {
Set<TimeAndSpace> result = new HashSet<TimeAndSpace>();
DbQueryResponse dbresponse = (DbQueryResponse) response;
for (Map<String, Object> map : dbresponse.getResults()) {
DataTime time = (DataTime) map.get(PluginDataObject.DATATIME_ID);
int gid = ((Number) map.get(SatelliteInventory.GID)).intValue();
SatMapCoverage coverage = coverages.get(gid);
result.add(new TimeAndSpace(time, new ComparableSatMapCoverage(
coverage)));
}
return result;
}
@Override
public Set<AbstractRequestableData> getData(
Map<String, RequestConstraint> orignalConstraints,
Set<TimeAndSpace> availability, Object response)
throws DataCubeException {
DbQueryResponse queryResponse = (DbQueryResponse) response;
List<Map<String, Object>> results = queryResponse.getResults();
Set<AbstractRequestableData> data = new HashSet<AbstractRequestableData>(
results.size());
SatelliteRecord[] records = queryResponse
.getEntityObjects(SatelliteRecord.class);
for (SatelliteRecord record : records) {
data.add(new SatelliteRequestableData(record, getLevel()));
}
return data;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((requestConstraints == null) ? 0 : requestConstraints
.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
SatelliteRequestableLevelNode other = (SatelliteRequestableLevelNode) obj;
if (requestConstraints == null) {
if (other.requestConstraints != null)
return false;
} else if (!requestConstraints.equals(other.requestConstraints))
return false;
return true;
}
}

View file

@ -0,0 +1,49 @@
/**
* 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.satellite.inventory;
import com.raytheon.uf.common.dataplugin.satellite.units.SatelliteUnits;
import com.raytheon.viz.core.units.IUnitRegistrar;
/**
* Register the units used by satellite as part of cave startup.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 15, 2014 2947 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class SatelliteUnitRegistrar implements IUnitRegistrar {
@Override
public void register() {
SatelliteUnits.register();
}
}

View file

@ -49,7 +49,7 @@ import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
import com.raytheon.uf.viz.core.rsc.LoadProperties;
import com.raytheon.uf.viz.core.rsc.ProgressiveDisclosureProperties;
import com.raytheon.uf.viz.core.rsc.ResourceList;
import com.raytheon.viz.satellite.SatelliteDataCubeAdapter;
import com.raytheon.viz.satellite.inventory.SatelliteDataCubeAdapter;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;

View file

@ -66,8 +66,8 @@ import com.raytheon.uf.viz.core.rsc.AbstractPluginDataObjectResource;
import com.raytheon.uf.viz.core.rsc.LoadProperties;
import com.raytheon.uf.viz.core.rsc.capabilities.AbstractCapability;
import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability;
import com.raytheon.uf.common.derivparam.library.DerivedParameterRequest;
import com.raytheon.viz.satellite.SatelliteConstants;
import com.raytheon.viz.satellite.inventory.DerivedSatelliteRecord;
import com.raytheon.viz.satellite.tileset.SatDataRetriever;
import com.raytheon.viz.satellite.tileset.SatTileSetRenderable;
import com.vividsolutions.jts.geom.Coordinate;
@ -97,6 +97,8 @@ import com.vividsolutions.jts.geom.Coordinate;
* interrogation
* Nov 20, 2013 2492 bsteffen Always get min/max values from style
* rules.
* Apr 09, 2014 2947 bsteffen Improve flexibility of sat derived
* parameters.
*
* </pre>
*
@ -283,14 +285,7 @@ public class SatResource extends
}
SingleLevel level = new SingleLevel(Level.LevelType.SURFACE);
String physicalElement = null;
DerivedParameterRequest request = (DerivedParameterRequest) record
.getMessageData();
if (request == null) {
physicalElement = record.getPhysicalElement();
} else {
physicalElement = request.getParameterAbbreviation();
}
String physicalElement = record.getPhysicalElement();
// Grab the sampleRange from the preferences
ParamLevelMatchCriteria match = new ParamLevelMatchCriteria();
@ -459,17 +454,13 @@ public class SatResource extends
return String.format("%.1f%s", measuredValue, unitString);
}
private String getLegend(PluginDataObject record) {
String productName = null;
DerivedParameterRequest request = (DerivedParameterRequest) record
.getMessageData();
if (request == null) {
productName = ((SatelliteRecord) record).getPhysicalElement();
} else {
productName = request.getParameterAbbreviation();
private String getLegend(SatelliteRecord record) {
String productName = record.getPhysicalElement();
if (record instanceof DerivedSatelliteRecord) {
productName = ((DerivedSatelliteRecord) record).getName();
}
return SatelliteConstants.getLegend(productName,
((SatelliteRecord) record).getCreatingEntity());
record.getCreatingEntity());
}
public List<DrawableImage> getImages(IGraphicsTarget target,

View file

@ -22,6 +22,7 @@ package com.raytheon.viz.satellite.tileset;
import java.awt.Rectangle;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.nio.ShortBuffer;
import java.text.ParseException;
import java.text.ParsePosition;
@ -32,23 +33,22 @@ import javax.measure.unit.UnitFormat;
import com.raytheon.uf.common.colormap.image.ColorMapData;
import com.raytheon.uf.common.colormap.image.ColorMapData.ColorMapDataType;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord;
import com.raytheon.uf.common.dataplugin.satellite.units.counts.DerivedWVPixel;
import com.raytheon.uf.common.dataplugin.satellite.units.generic.GenericPixel;
import com.raytheon.uf.common.dataplugin.satellite.units.goes.PolarPrecipWaterPixel;
import com.raytheon.uf.common.dataplugin.satellite.units.water.BlendedTPWPixel;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.Request;
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.ShortDataRecord;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
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.viz.core.data.IColorMapDataRetrievalCallback;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.common.derivparam.library.DerivedParameterRequest;
import com.raytheon.viz.satellite.SatelliteConstants;
/**
@ -59,11 +59,13 @@ import com.raytheon.viz.satellite.SatelliteConstants;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 20, 2013 2122 mschenke Initial creation
* Nov 13, 2013 2492 mschenke Added extraction of scale/offset from
* data record attributes for unit
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Jun 20, 2013 2122 mschenke Initial creation
* Nov 13, 2013 2492 mschenke Added extraction of scale/offset from
* data record attributes for unit
* Apr 09, 2014 2947 bsteffen Improve flexibility of sat derived
* parameters.
*
* </pre>
*
@ -112,6 +114,8 @@ public class SatDataRetriever implements IColorMapDataRetrievalCallback {
data = ByteBuffer.wrap((byte[]) record.getDataObject());
} else if (record instanceof ShortDataRecord) {
data = ShortBuffer.wrap((short[]) record.getDataObject());
} else if (record instanceof FloatDataRecord) {
data = FloatBuffer.wrap((float[]) record.getDataObject());
}
Unit<?> recordUnit = getRecordUnit(this.record);
signed = recordUnit instanceof GenericPixel;
@ -148,14 +152,8 @@ public class SatDataRetriever implements IColorMapDataRetrievalCallback {
public static Unit<?> getRecordUnit(SatelliteRecord record) {
Unit<?> recordUnit = null;
String physicalElement = record.getPhysicalElement();
DerivedParameterRequest request = (DerivedParameterRequest) record
.getMessageData();
if (request != null) {
physicalElement = request.getParameterAbbreviation();
}
if (record.getUnits() != null && record.getUnits().isEmpty() == false
&& request == null) {
if (record.getUnits() != null && record.getUnits().isEmpty() == false) {
try {
recordUnit = UnitFormat.getUCUMInstance().parseProductUnit(
record.getUnits(), new ParsePosition(0));
@ -165,12 +163,6 @@ public class SatDataRetriever implements IColorMapDataRetrievalCallback {
"Unable to parse satellite units: "
+ record.getUnits(), e);
}
} else if (request != null) {
if (physicalElement.equals("satDivWVIR")) {
recordUnit = new DerivedWVPixel();
} else {
recordUnit = new GenericPixel();
}
}
if (physicalElement.equals(SatelliteConstants.PRECIP)) {
@ -193,7 +185,7 @@ public class SatDataRetriever implements IColorMapDataRetrievalCallback {
* @param dataRecord
* @return
*/
private static Unit<?> getDataUnit(Unit<?> recordUnit,
public static Unit<?> getDataUnit(Unit<?> recordUnit,
IDataRecord dataRecord) {
Unit<?> units = recordUnit != null ? recordUnit : Unit.ONE;
Map<String, Object> attrs = dataRecord.getDataAttributes();

View file

@ -28,6 +28,7 @@ import javax.measure.unit.SI;
import javax.measure.unit.Unit;
import javax.measure.unit.UnitFormat;
import com.raytheon.uf.common.dataplugin.satellite.units.counts.DerivedWVPixel;
import com.raytheon.uf.common.dataplugin.satellite.units.generic.GenericPixel;
import com.raytheon.uf.common.dataplugin.satellite.units.goes.PercentOfNormalTPWPixel;
import com.raytheon.uf.common.dataplugin.satellite.units.goes.PolarPrecipWaterPixel;
@ -45,12 +46,14 @@ import com.raytheon.uf.common.dataplugin.satellite.units.water.RainfallRatePixel
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 4, 2007 njensen Initial creation
* Mar 23, 2009 2086 jsanchez Updated RainfallRatePixel to be velocity.
* Added PolarPrecipWaterPixel.
* Jun 20, 2013 2122 mschenke Added alias for degrees celsius to "C"
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Sep 04, 2007 njensen Initial creation
* Mar 23, 2009 2086 jsanchez Updated RainfallRatePixel to be velocity.
* Added PolarPrecipWaterPixel.
* Jun 20, 2013 2122 mschenke Added alias for degrees celsius to "C"
* Apr 15, 2014 2947 bsteffen Register units with both formats.
*
*
* </pre>
*
@ -84,35 +87,35 @@ public class SatelliteUnits {
public static final Unit<Dimensionless> GENERIC_PIXEL = new GenericPixel();
public static final Unit<Temperature> DERIVED_WV = new DerivedWVPixel();
public static void register() {
UnitFormat.getUCUMInstance().alias(SI.KELVIN, "kelvin");
UnitFormat.getUCUMInstance().alias(SI.CELSIUS, "C");
UnitFormat.getUCUMInstance().label(SatelliteUnits.IR_PIXEL, "IRPixel");
UnitFormat.getUCUMInstance().label(SatelliteUnits.PRECIP_PIXEL,
"PrecipPixel");
UnitFormat.getUCUMInstance().label(SatelliteUnits.RAINFALL_RATE_PIXEL,
"RainfallRatePixel");
UnitFormat.getUCUMInstance().label(
SatelliteUnits.SOUNDER_CLOUD_AMOUNT_PIXEL,
register(UnitFormat.getUCUMInstance());
register(UnitFormat.getInstance());
}
public static void register(UnitFormat format) {
format.alias(SI.KELVIN, "kelvin");
format.alias(SI.CELSIUS, "C");
format.label(SatelliteUnits.IR_PIXEL, "IRPixel");
format.label(SatelliteUnits.PRECIP_PIXEL, "PrecipPixel");
format.label(SatelliteUnits.RAINFALL_RATE_PIXEL, "RainfallRatePixel");
format.label(SatelliteUnits.SOUNDER_CLOUD_AMOUNT_PIXEL,
"SounderCloudAmountPixel");
UnitFormat.getUCUMInstance().label(
SatelliteUnits.SOUNDER_CLOUD_HEIGHT_PIXEL,
format.label(SatelliteUnits.SOUNDER_CLOUD_HEIGHT_PIXEL,
"SounderCloudTopHeightPixel");
UnitFormat.getUCUMInstance().label(
SatelliteUnits.SOUNDER_LIFTED_INDEX_PIXEL,
format.label(SatelliteUnits.SOUNDER_LIFTED_INDEX_PIXEL,
"SounderLiftedIndexPixel");
UnitFormat.getUCUMInstance().label(
SatelliteUnits.SOUNDER_PRECIP_WATER_PIXEL,
format.label(SatelliteUnits.SOUNDER_PRECIP_WATER_PIXEL,
"SounderPrecipWaterPixel");
UnitFormat.getUCUMInstance().label(
SatelliteUnits.POLAR_PRECIP_WATER_PIXEL,
format.label(SatelliteUnits.POLAR_PRECIP_WATER_PIXEL,
"PolarPrecipWaterPixel");
UnitFormat.getUCUMInstance().label(
SatelliteUnits.SOUNDER_SKIN_TEMP_PIXEL, "SounderSkinTempPixel");
UnitFormat.getUCUMInstance().label(SatelliteUnits.GENERIC_PIXEL,
"GenericPixel");
UnitFormat.getUCUMInstance().label(SatelliteUnits.PERCENT_PIXEL,
"PercentOfNormalTPWPixel");
format.label(SatelliteUnits.SOUNDER_SKIN_TEMP_PIXEL,
"SounderSkinTempPixel");
format.label(SatelliteUnits.GENERIC_PIXEL, "GenericPixel");
format.label(SatelliteUnits.PERCENT_PIXEL, "PercentOfNormalTPWPixel");
format.label(SatelliteUnits.DERIVED_WV, "DerivedWV");
}
}

View file

@ -25,19 +25,19 @@ import javax.measure.unit.Unit;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.raytheon.uf.common.dataplugin.satellite.units.generic.GenericPixel;
import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.PixelToPercentConverter;
/**
* TODO Add Description
* A unit for the percent of normal total precipitable water pixels.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 12, 2010 jsanchez Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* May 12, 2010 jsanchez Initial creation
* Apr 15, 2014 2947 bsteffen Fix equals.
*
* </pre>
*
@ -50,7 +50,7 @@ public class PercentOfNormalTPWPixel extends Unit<Dimensionless> {
@Override
public boolean equals(Object anObject) {
return (anObject instanceof GenericPixel);
return (anObject instanceof PercentOfNormalTPWPixel);
}
@Override

View file

@ -18,9 +18,9 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter unit="℃" name="11u-3.7u" abbreviation="poesDif11u3_7uIR" xmlns:ns2="group">
<DerivedParameter unit="GenericPixel" name="POES 11u-3.7u Satellite" abbreviation="poesDif11u3_7uIR" xmlns:ns2="group">
<Method name="Difference">
<Field abbreviation="Polar_IR"/>
<Field abbreviation="Polar_3pp7u"/>
<Field abbreviation="Polar IR"/>
<Field abbreviation="Polar 3.7u"/>
</Method>
</DerivedParameter>

View file

@ -18,9 +18,9 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter unit="℃" name="11u-12u" abbreviation="satDif11u12uIR" xmlns:ns2="group">
<DerivedParameter unit="GenericPixel" name="11u-12u Satellite" abbreviation="satDif11u12uIR" xmlns:ns2="group">
<Method name="satDifference">
<Field abbreviation="Imager 11_micron IR"/>
<Field abbreviation="Imager 12 micron IR"/>
<Field abbreviation="Imager 11 micron IR" unit="IRPixel"/>
<Field abbreviation="Imager 12 micron IR" unit="IRPixel"/>
</Method>
</DerivedParameter>

View file

@ -18,9 +18,9 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter name="11u-13u" abbreviation="satDif11u13uIR" xmlns:ns2="group">
<DerivedParameter unit="GenericPixel" name="11u-13u Satellite" abbreviation="satDif11u13uIR" xmlns:ns2="group">
<Method name="satDifference">
<Field abbreviation="Imager 11 micron IR"/>
<Field abbreviation="Imager 13 micron (IR)"/>
<Field abbreviation="Imager 11 micron IR" unit="IRPixel"/>
<Field abbreviation="Imager 13 micron (IR)" unit="IRPixel"/>
</Method>
</DerivedParameter>

View file

@ -18,9 +18,9 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter unit="℃" name="11u-3.9u" abbreviation="satDif11u3_9uIR" xmlns:ns2="group">
<DerivedParameter unit="GenericPixel" name="11u-3.9u Satellite" abbreviation="satDif11u3_9uIR" xmlns:ns2="group">
<Method name="satDif11u3_9uIR">
<Field abbreviation="Imager_11_micron_IR"/>
<Field abbreviation="Imager_3pp9_micron_IR"/>
<Field abbreviation="Imager 11 micron IR" unit="IRPixel"/>
<Field abbreviation="Imager 3.9 micron IR" unit="IRPixel"/>
</Method>
</DerivedParameter>

View file

@ -18,9 +18,9 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter unit="℃" name="WV/IR" abbreviation="satDivWVIR" xmlns:ns2="group">
<DerivedParameter unit="DerivedWV" name="IR in WV Satellite" abbreviation="satDivWVIR" xmlns:ns2="group">
<Method name="satDivWVIR">
<Field abbreviation="Imager_6pp7hh6pp5_micron_IR_ooWVcc"/>
<Field abbreviation="Imager_11_micron_IR"/>
<Field abbreviation="Imager 6.7-6.5 micron IR (WV)"/>
<Field abbreviation="Imager 11 micron IR" unit="IRPixel"/>
</Method>
</DerivedParameter>

View file

@ -104,6 +104,8 @@ import com.raytheon.uf.common.time.DataTime;
* PluginDataObject.
* May 16, 2013 1869 bsteffen Rewrite dataURI property mappings.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Apr 15, 2014 1869 bsteffen Remove unused transient record field.
*
* </pre>
*
*/
@ -173,9 +175,6 @@ public abstract class PluginDataObject extends PersistableDataObject implements
@Transient
private transient int uriIndex = 2;
@Transient
private Object record = null;
/**
* Default Constructor
*/
@ -271,14 +270,6 @@ public abstract class PluginDataObject extends PersistableDataObject implements
}
}
public Object getRecord() {
return record;
}
public void setRecord(Object record) {
this.record = record;
}
/**
* TODO: Rework non-PointDataContainer plots and remove
*

View file

@ -30,7 +30,6 @@ import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.ResourceType;
import com.raytheon.viz.satellite.SatelliteDataCubeAdapter;
import com.vividsolutions.jts.geom.Polygon;
import gov.noaa.nws.ncep.common.dataplugin.mcidas.McidasMapCoverage;