Omaha #2913 remove some more unused uengine code.
Former-commit-id:45b8a26306
[formerly33c6867b52
] [formerlybe301d1dc3
] [formerly05e8d862c2
[formerlybe301d1dc3
[formerly 9b72d2a1ddd7db5e06abee5bd172f700ad4c1277]]] Former-commit-id:05e8d862c2
Former-commit-id: ac65ecca60a0d93c7d4a8963bec2ca2a7a2aa856 [formerlyba3867af55
] Former-commit-id:11fde3a688
This commit is contained in:
parent
6854b7230a
commit
f86fb86ee5
3 changed files with 15 additions and 216 deletions
|
@ -2,28 +2,24 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Radar Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.edex.plugin.radar
|
||||
Bundle-Version: 1.12.1174.qualifier
|
||||
Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Require-Bundle: com.raytheon.edex.common,
|
||||
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
|
||||
org.geotools,
|
||||
com.raytheon.uf.common.dataplugin.level,
|
||||
com.raytheon.uf.common.localization,
|
||||
com.raytheon.uf.common.serialization.comm,
|
||||
com.raytheon.uf.common.status;bundle-version="1.11.11",
|
||||
com.raytheon.uf.common.dataplugin.radar,
|
||||
com.raytheon.uf.edex.menus;bundle-version="1.0.0",
|
||||
org.itadaki.bzip2;bundle-version="0.9.1",
|
||||
com.raytheon.uf.edex.ndm;bundle-version="1.0.0"
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Require-Bundle: com.raytheon.edex.common;bundle-version="1.14.0",
|
||||
com.raytheon.uf.common.dataplugin.level;bundle-version="1.14.0",
|
||||
com.raytheon.uf.common.localization;bundle-version="1.14.0",
|
||||
com.raytheon.uf.common.serialization.comm,
|
||||
com.raytheon.uf.common.status,
|
||||
com.raytheon.uf.common.dataplugin.radar;bundle-version="1.14.0",
|
||||
com.raytheon.uf.edex.menus,
|
||||
org.itadaki.bzip2;bundle-version="0.9.1",
|
||||
com.raytheon.uf.edex.ndm;bundle-version="1.14.0",
|
||||
com.raytheon.uf.common.comm
|
||||
Export-Package: com.raytheon.edex.plugin.radar,
|
||||
com.raytheon.edex.plugin.radar.dao,
|
||||
com.raytheon.edex.plugin.radar.level2,
|
||||
com.raytheon.edex.uengine.tasks.radar
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Import-Package: com.raytheon.uf.common.comm,
|
||||
com.raytheon.uf.common.dataplugin.text.db,
|
||||
com.raytheon.edex.plugin.radar.level2
|
||||
Import-Package: com.raytheon.uf.common.dataplugin.text.db,
|
||||
com.raytheon.uf.common.inventory.tree,
|
||||
com.raytheon.uf.common.wmo,
|
||||
org.apache.commons.logging
|
||||
|
|
|
@ -1,117 +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.edex.uengine.tasks.radar;
|
||||
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
||||
import com.raytheon.uf.common.dataplugin.radar.util.RadarTiler;
|
||||
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.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
||||
/**
|
||||
* Derived from original uEngine DecodeRadarImage task.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date PR# Engineer Description
|
||||
* ----------- ---------- ------------ --------------------------
|
||||
* Apr 12, 2007 njensen Initial Creation
|
||||
* Apr 14, 2014 2984 njensen Deprecated and remove uengine dependency
|
||||
* </PRE>
|
||||
*
|
||||
*/
|
||||
@Deprecated
|
||||
public class DecodeRadarImage {
|
||||
|
||||
private static final IUFStatusHandler handler = UFStatus
|
||||
.getHandler(DecodeRadarImage.class);
|
||||
|
||||
private RadarRecord radarRecord;
|
||||
|
||||
private RadarTiler radarTiler;
|
||||
|
||||
private GridGeometry2D geometry;
|
||||
|
||||
public DecodeRadarImage(PluginDataObject aDataRecord, IDataRecord[] records) {
|
||||
radarRecord = (RadarRecord) aDataRecord;
|
||||
for (IDataRecord dataRecord : records) {
|
||||
if ("Data".equals(dataRecord.getName())) {
|
||||
radarRecord.setRawData(((ByteDataRecord) dataRecord)
|
||||
.getByteData());
|
||||
} else if ("Angles".equals(dataRecord.getName())) {
|
||||
radarRecord.setAngleData(((FloatDataRecord) dataRecord)
|
||||
.getFloatData());
|
||||
} else if ("Thresholds".equals(dataRecord.getName())) {
|
||||
radarRecord.setThresholds(((ShortDataRecord) dataRecord)
|
||||
.getShortData());
|
||||
}
|
||||
}
|
||||
radarTiler = new RadarTiler(radarRecord, 1, 920);
|
||||
geometry = radarTiler.constructGridGeometry();
|
||||
}
|
||||
|
||||
public byte[] execute() {
|
||||
byte[] bi = null;
|
||||
|
||||
// get the radar file
|
||||
bi = generateProduct();
|
||||
return bi;
|
||||
}
|
||||
|
||||
private byte[] generateProduct() {
|
||||
long t0 = System.currentTimeMillis();
|
||||
// DataBufferByte data = new
|
||||
// DataBufferByte(radarImage.createFullImage(),
|
||||
// radarImage.getHeight() * radarImage.getWidth());
|
||||
byte[] image = radarTiler.createFullImage();
|
||||
long t = System.currentTimeMillis() - t0;
|
||||
if (handler.isPriorityEnabled(Priority.INFO)) {
|
||||
handler.handle(Priority.INFO, "createFullImage: " + t + " ms");
|
||||
}
|
||||
|
||||
// int[] nBits = { 8 };
|
||||
// ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
|
||||
// ColorModel cm = new ComponentColorModel(cs, nBits, false, true,
|
||||
// Transparency.OPAQUE, DataBuffer.TYPE_BYTE);
|
||||
// SampleModel sm =
|
||||
// cm.createCompatibleSampleModel(radarImage.getWidth(),
|
||||
// radarImage.getHeight());
|
||||
// WritableRaster raster = WritableRaster.createWritableRaster(sm, data,
|
||||
// null);
|
||||
return image;
|
||||
}
|
||||
|
||||
public GridGeometry2D getGridGeometry() {
|
||||
return geometry;
|
||||
}
|
||||
|
||||
public CoordinateReferenceSystem getCrs() {
|
||||
return geometry.getEnvelope2D().getCoordinateReferenceSystem();
|
||||
}
|
||||
}
|
|
@ -1,80 +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.
|
||||
##
|
||||
|
||||
import math
|
||||
from com.raytheon.edex.plugin.grib.dao import GribDao
|
||||
from com.raytheon.edex.plugin.satellite.dao import SatelliteDao
|
||||
from com.raytheon.edex.plugin.radar.dao import RadarDao
|
||||
from com.raytheon.uf.common.dataplugin.gfe.grid import Grid2DFloat
|
||||
from com.raytheon.uf.common.dataplugin.gfe.grid import Grid2DByte
|
||||
from com.raytheon.uf.common.dataplugin.radar.util import RadarMapper
|
||||
from javax.measure.unit import Unit
|
||||
|
||||
###
|
||||
# Radar, Grib, and Satellite data accessor for use with the command line interface
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 07/08/10 3537 bphillip Initial Creation.
|
||||
#
|
||||
###
|
||||
class DataAccessor():
|
||||
|
||||
##
|
||||
# Initializes the DataAccessor. Creates the data access objects
|
||||
##
|
||||
def __init__(self):
|
||||
self.__gribDao = GribDao()
|
||||
self.__satDao = SatelliteDao("satellite")
|
||||
self.__radarDao = RadarDao("radar")
|
||||
|
||||
##
|
||||
# Gets the HDF5 grib data associated with the provided GribRecord
|
||||
# @param record: The GribRecord for which to retrieve the HDF5 data for
|
||||
# @return: The numpy float array of the the raw grib data
|
||||
##
|
||||
def getGribData(self, record):
|
||||
data = self.__gribDao.getHDF5Data(record, - 1)
|
||||
return Grid2DFloat(int(data[0].getSizes()[0]), int(data[0].getSizes()[1]), data[0].getFloatData()).__numpy__[0]
|
||||
|
||||
##
|
||||
# Gets the HDF5 satellite data associated with the provided SatelliteRecord
|
||||
# @param record: The SatelliteRecord for which to retrieved the HDF5 data for
|
||||
# @return: The numpy byte array of the raw satellite data
|
||||
##
|
||||
def getSatelliteData(self, record):
|
||||
data = self.__satDao.getHDF5Data(record, - 1)
|
||||
return Grid2DByte(int(data[0].getSizes()[0]), int(data[0].getSizes()[1]), data[0].getByteData()).__numpy__[0]
|
||||
|
||||
##
|
||||
# Gets the HDF5 radar data associated with the provided RadarRecord
|
||||
# @param record: The RadarRecord for which to retrieve the HDF5 data for
|
||||
# @return: The numpy byte array of the raw radar data
|
||||
##
|
||||
def getRadarData(self, record):
|
||||
from com.raytheon.edex.uengine.tasks.radar import DecodeRadarImage
|
||||
from com.raytheon.edex.uengine.tasks.decode import FileIn
|
||||
self.__radarDao.populateData(record)
|
||||
radarImage = DecodeRadarImage(record, FileIn("radar", record).retrieveGroup())
|
||||
theData = Grid2DByte(920, 920,radarImage.execute())
|
||||
return theData.__numpy__[0]
|
Loading…
Add table
Reference in a new issue