Omaha #3410 changed lon/lat fields to floats in sfc and air obs location
Change-Id: I4c8d47b9f9e598e69309f1aa99bc30c022cae7af Former-commit-id: cdb0a72fcb2345564f2b944fdecd7869fd498767
This commit is contained in:
parent
04f52094f6
commit
74a6c3dd20
69 changed files with 426 additions and 354 deletions
|
@ -51,7 +51,6 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.raytheon.uf.viz.d2d.nsharp.SoundingLayerBuilder;
|
||||
import com.raytheon.uf.viz.d2d.nsharp.rsc.D2DNSharpResourceData;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
/**
|
||||
* Provides sounding data to nsharp from aircraft reports.
|
||||
|
@ -63,6 +62,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 15, 2013 bsteffen Initial creation
|
||||
* Jul 23, 2014 3410 bclement preparePointInfo() calls unpackResultLocation()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -94,9 +94,8 @@ public class AcarsSndNSharpResourceData extends D2DNSharpResourceData {
|
|||
|
||||
for (Map<String, Object> result : response.getResults()) {
|
||||
if (coordinate == null) {
|
||||
coordinate = new Coordinate();
|
||||
coordinate.x = (Double) result.get(LONGITUDE);
|
||||
coordinate.y = (Double) result.get(LATITUDE);
|
||||
coordinate = unpackResultLocation(result, LONGITUDE,
|
||||
LATITUDE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
|
|||
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,6 +46,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 26, 2011 bsteffen Initial creation
|
||||
* Jul 23, 2014 3410 bclement preparePointInfo() calls unpackResultLocation()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -81,9 +81,8 @@ public class BufruaNSharpResourceData extends D2DNSharpResourceData {
|
|||
pointName = (String) result.get(STATION_NAME);
|
||||
}
|
||||
if (coordinate == null) {
|
||||
coordinate = new Coordinate();
|
||||
coordinate.x = (Double) result.get(LONGITUDE);
|
||||
coordinate.y = (Double) result.get(LATITUDE);
|
||||
coordinate = unpackResultLocation(result, LONGITUDE,
|
||||
LATITUDE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import java.util.Arrays;
|
|||
import java.util.Calendar;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
|
@ -39,6 +40,7 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.common.time.DataTime.FLAG;
|
||||
import com.raytheon.uf.viz.core.alerts.DataCubeAlertMessageParser;
|
||||
|
@ -62,6 +64,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* May 31, 2013 1847 bsteffen D2D nsharp will now format Lat/Lons as
|
||||
* stationId like NC ncharp.
|
||||
* May 08, 2014 2060 njensen Constructor sets alert parser
|
||||
* Jul 23, 2014 3410 bclement added unpackResultLocation()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -148,6 +151,25 @@ public abstract class D2DNSharpResourceData extends
|
|||
|
||||
protected abstract void preparePointInfo() throws VizException;
|
||||
|
||||
/**
|
||||
* Creates a new coordinate from query result map
|
||||
*
|
||||
* @see DbQueryResponse#getResults()
|
||||
* @param result
|
||||
* @param lonKey
|
||||
* longitude field
|
||||
* @param latKey
|
||||
* latitude field
|
||||
* @return
|
||||
*/
|
||||
protected static Coordinate unpackResultLocation(
|
||||
Map<String, Object> result, String lonKey, String latKey) {
|
||||
Coordinate rval = new Coordinate();
|
||||
rval.x = ((Number) result.get(lonKey)).doubleValue();
|
||||
rval.y = ((Number) result.get(latKey)).doubleValue();
|
||||
return rval;
|
||||
}
|
||||
|
||||
protected abstract NcSoundingCube getSoundingCube(NsharpStationInfo stnInfo);
|
||||
|
||||
protected void populateDataObject(D2DNSharpDataObject dataObject) {
|
||||
|
|
|
@ -49,7 +49,6 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.raytheon.uf.viz.d2d.nsharp.SoundingLayerBuilder;
|
||||
import com.raytheon.viz.pointdata.PointDataRequest;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
/**
|
||||
* Provides sounding data to nsharp from goes sounding satellite data.
|
||||
|
@ -61,6 +60,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 14, 2013 2259 bsteffen Initial creation
|
||||
* Jul 23, 2014 3410 bclement preparePointInfo() calls unpackResultLocation()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -105,9 +105,8 @@ public class GoesSndNSharpResourceData extends D2DNSharpResourceData {
|
|||
|
||||
for (Map<String, Object> result : response.getResults()) {
|
||||
if (coordinate == null) {
|
||||
coordinate = new Coordinate();
|
||||
coordinate.x = (Double) result.get(LONGITUDE);
|
||||
coordinate.y = (Double) result.get(LATITUDE);
|
||||
coordinate = unpackResultLocation(result, LONGITUDE,
|
||||
LATITUDE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,22 +33,22 @@ import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
|
|||
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 26, 2011 bsteffen Initial creation
|
||||
*
|
||||
* Jul 23, 2014 3410 bclement preparePointInfo() calls unpackResultLocation()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -84,9 +84,8 @@ public class MdlSndNSharpResourceData extends D2DNSharpResourceData {
|
|||
pointName = (String) result.get(STATION_NAME);
|
||||
}
|
||||
if (coordinate == null) {
|
||||
coordinate = new Coordinate();
|
||||
coordinate.x = (Double) result.get(LONGITUDE);
|
||||
coordinate.y = (Double) result.get(LATITUDE);
|
||||
coordinate = unpackResultLocation(result, LONGITUDE,
|
||||
LATITUDE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.raytheon.uf.viz.d2d.nsharp.SoundingLayerBuilder;
|
||||
import com.raytheon.viz.pointdata.PointDataRequest;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
/**
|
||||
* Provides sounding data to nsharp from poes sounding satellite data.
|
||||
|
@ -61,6 +60,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 14, 2013 2260 bsteffen Initial creation
|
||||
* Jul 23, 2014 3410 bclement preparePointInfo() calls unpackResultLocation()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -104,9 +104,8 @@ public class PoesSndNSharpResourceData extends D2DNSharpResourceData {
|
|||
|
||||
for (Map<String, Object> result : response.getResults()) {
|
||||
if (coordinate == null) {
|
||||
coordinate = new Coordinate();
|
||||
coordinate.x = (Double) result.get(LONGITUDE);
|
||||
coordinate.y = (Double) result.get(LATITUDE);
|
||||
coordinate = unpackResultLocation(result, LONGITUDE,
|
||||
LATITUDE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ import com.vividsolutions.jts.index.strtree.STRtree;
|
|||
* Jul 25, 2013 2190 mschenke Initial creation
|
||||
* Aug 15, 2013 2260 bsteffen Switch poessounding to NSharp.
|
||||
* Aug 27, 2013 2190 mschenke Fixed point query request
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -114,8 +115,8 @@ public class NucapsSoundingProvider extends
|
|||
sounding.setStationId(NucapsRecord.PLUGIN_NAME);
|
||||
Coordinate location = getSoundingLocation();
|
||||
sounding.setName(GeoUtil.formatCoordinate(location));
|
||||
sounding.setLongitude(location.x);
|
||||
sounding.setLongitude(location.y);
|
||||
sounding.setLongitude((float) location.x);
|
||||
sounding.setLongitude((float) location.y);
|
||||
|
||||
// Get pressure values
|
||||
Number[] pressures = pdv
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.eclipse.core.runtime.IStatus;
|
|||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
|
||||
import com.raytheon.uf.common.inventory.exception.DataCubeException;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
|
||||
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
|
||||
|
@ -42,6 +41,7 @@ import com.raytheon.uf.common.datastorage.records.IDataRecord;
|
|||
import com.raytheon.uf.common.geospatial.ISpatialObject;
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.geospatial.PointUtil;
|
||||
import com.raytheon.uf.common.inventory.exception.DataCubeException;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.sounding.SoundingLayer;
|
||||
import com.raytheon.uf.common.sounding.VerticalSounding;
|
||||
|
@ -62,6 +62,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 22, 2013 2190 mschenke Initial creation
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -239,8 +240,8 @@ public class GridSoundingProvider extends
|
|||
vs = createSounding(index, records);
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation();
|
||||
loc.setStationId(vs.getStationId());
|
||||
loc.setLatitude(location.y);
|
||||
loc.setLongitude(location.x);
|
||||
loc.setLatitude((float) location.y);
|
||||
loc.setLongitude((float) location.x);
|
||||
vs.setSpatialInfo(loc);
|
||||
vs.setName(GeoUtil.formatCoordinate(location));
|
||||
sounding[index] = vs;
|
||||
|
|
|
@ -59,6 +59,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 19, 2013 2190 mschenke Initial creation
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -357,8 +358,8 @@ public class PopupSkewTResource extends
|
|||
}
|
||||
}
|
||||
}
|
||||
sounding.setLongitude(location.x);
|
||||
sounding.setLatitude(location.y);
|
||||
sounding.setLongitude((float) location.x);
|
||||
sounding.setLatitude((float) location.y);
|
||||
sounding.setDataTime(requestTime);
|
||||
this.sounding = sounding;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 15, 2009 mschenke Initial creation
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -51,8 +52,10 @@ public class PlotAlertParser extends AbstractAlertMessageParser {
|
|||
AbstractRequestableResourceData resourceData) throws VizException {
|
||||
String stationId = (String) message.decodedAlert
|
||||
.get("location.stationId");
|
||||
Double lat = (Double) message.decodedAlert.get("location.latitude");
|
||||
Double lon = (Double) message.decodedAlert.get("location.longitude");
|
||||
Double lat = ((Number) message.decodedAlert.get("location.latitude"))
|
||||
.doubleValue();
|
||||
Double lon = ((Number) message.decodedAlert.get("location.longitude"))
|
||||
.doubleValue();
|
||||
DataTime dataTime = (DataTime) message.decodedAlert.get("dataTime");
|
||||
return new PlotInfo(stationId, lat, lon, dataTime,
|
||||
message.dataURI);
|
||||
|
|
|
@ -50,6 +50,7 @@ import com.raytheon.viz.pointdata.rsc.PlotResourceData;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 09, 2009 bsteffen Initial creation
|
||||
* May 14, 2013 1869 bsteffen Get plots working without dataURI
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -87,8 +88,8 @@ public class PointDataPlotInfoRetriever extends AbstractDbPlotInfoRetriever {
|
|||
@Override
|
||||
protected PlotInfo getPlotInfo(Object[] data) {
|
||||
PlotInfo stationInfo = new PlotInfo();
|
||||
stationInfo.latitude = (Double) data[0];
|
||||
stationInfo.longitude = (Double) data[1];
|
||||
stationInfo.latitude = ((Number) data[0]).doubleValue();
|
||||
stationInfo.longitude = ((Number) data[1]).doubleValue();
|
||||
stationInfo.stationId = (String) data[2];
|
||||
if (stationInfo.stationId == null) {
|
||||
stationInfo.stationId = "" + stationInfo.latitude + "#"
|
||||
|
|
|
@ -53,6 +53,7 @@ import com.raytheon.viz.volumebrowser.xml.VbSourceList;
|
|||
* Sep 28, 2011 mschenke Initial creation
|
||||
* May 02, 2013 1949 bsteffen Force ModelSounding in Vb to play nicely
|
||||
* with others.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -249,8 +250,8 @@ public class ModelSoundingCatalog extends PointDataCatalog {
|
|||
for (Entry<String, SPIEntry> entry : spipv.getSpiList().entrySet()) {
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation();
|
||||
loc.setStationId(entry.getKey());
|
||||
loc.setLatitude(entry.getValue().latlon.y);
|
||||
loc.setLongitude(entry.getValue().latlon.x);
|
||||
loc.setLatitude((float) entry.getValue().latlon.y);
|
||||
loc.setLongitude((float) entry.getValue().latlon.x);
|
||||
locs.add(loc);
|
||||
}
|
||||
Collections.sort(locs, locComparator);
|
||||
|
|
|
@ -79,6 +79,7 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* Aug 15, 2013 2258 bsteffen Convert profiler sounding to var height
|
||||
* with hodo.
|
||||
* Aug 15, 2013 2260 bsteffen Switch poessounding to NSharp.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -168,8 +169,8 @@ public class PointDataCatalog extends AbstractInventoryDataCatalog {
|
|||
Object[] cols = (Object[]) row;
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation();
|
||||
loc.setStationId(cols[0].toString());
|
||||
loc.setLatitude((Double) cols[1]);
|
||||
loc.setLongitude((Double) cols[2]);
|
||||
loc.setLatitude(((Number) cols[1]).floatValue());
|
||||
loc.setLongitude(((Number) cols[2]).floatValue());
|
||||
locs[i++] = loc;
|
||||
}
|
||||
availableStations.put(sourceKey, locs);
|
||||
|
@ -195,8 +196,8 @@ public class PointDataCatalog extends AbstractInventoryDataCatalog {
|
|||
}
|
||||
|
||||
SurfaceObsLocation target = new SurfaceObsLocation();
|
||||
target.setLatitude(coordinate.y);
|
||||
target.setLongitude(coordinate.x);
|
||||
target.setLatitude((float) coordinate.y);
|
||||
target.setLongitude((float) coordinate.x);
|
||||
int index = Arrays.binarySearch(availableStations, target,
|
||||
locComparator);
|
||||
if (index < 1) {
|
||||
|
|
32
deltaScripts/14.4.1/DR3410/lonLatDoubleToReal.sh
Executable file
32
deltaScripts/14.4.1/DR3410/lonLatDoubleToReal.sh
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
# DR #3410 - this update script will change columns from Double to Real
|
||||
|
||||
# operate on tables that were built with classes that embed SurfaceObsLocation or AircraftObsLocation
|
||||
# only these tables contain the column 'locationdefined'
|
||||
TABLES=$(psql -U awips -d metadata -tc "select table_name from information_schema.columns where column_name = 'locationdefined'")
|
||||
COLUMNS=(latitude longitude)
|
||||
PSQL="/awips2/psql/bin/psql"
|
||||
|
||||
# takes two args: a table name and a column name
|
||||
# alters the column in the table to real
|
||||
function changeToReal {
|
||||
echo "INFO: Changing table $1 column $2 to real."
|
||||
${PSQL} -U awips -d metadata -c "ALTER TABLE $1 ALTER COLUMN $2 TYPE real;"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to change the column $2 for table $1"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
msg="INFO: All columns changed successfully"
|
||||
|
||||
for table in ${TABLES[*]}
|
||||
do
|
||||
echo "INFO: Altering table $table."
|
||||
for column in ${COLUMNS[*]}
|
||||
do
|
||||
changeToReal $table $column || msg="INFO: Operation completed, some columns could not be changed"
|
||||
done
|
||||
done
|
||||
|
||||
echo $msg
|
|
@ -31,7 +31,6 @@ import com.raytheon.edex.plugin.bufrua.dao.BufrUADao;
|
|||
import com.raytheon.edex.plugin.bufrua.decoder.AbstractBUFRUAAdapter;
|
||||
import com.raytheon.edex.plugin.bufrua.decoder.BUFRUAAdapterFactory;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.bufrua.UAObs;
|
||||
import com.raytheon.uf.common.pointdata.PointDataDescription;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
|
@ -79,6 +78,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
* Feb 27, 2013 1638 mschenke Moved ObStationDao to edex pointdata plugin
|
||||
* Mar 19, 2013 1785 bgonzale Added performance status handler and added status
|
||||
* to decodeData.
|
||||
* Jul 23, 2014 3410 bclement removed call to obs.getDataURI()
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -148,17 +148,10 @@ public class BufrUADecoder extends AbstractBUFRDecoder {
|
|||
obs.setCorIndicator(cor);
|
||||
obs.setTraceId(traceId);
|
||||
if ((obs = queryStationInfo(obs, traceId)) != null) {
|
||||
try {
|
||||
obs.constructDataURI();
|
||||
String uri = obs.getDataURI();
|
||||
|
||||
String uri = obs.getDataURI();
|
||||
|
||||
if (dataSet.add(uri)) {
|
||||
decodedData.add(obs);
|
||||
}
|
||||
} catch (PluginException e) {
|
||||
logger.error(traceId
|
||||
+ "- Unable to construct dataURI", e);
|
||||
if (dataSet.add(uri)) {
|
||||
decodedData.add(obs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
* May 09, 2013 1869 bsteffen Modified D2D time series of point data to
|
||||
* work without dataURI.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -188,7 +189,8 @@ public class GOESSoundingDataAdapter {
|
|||
SPIEntry s = SPI_DATA.nearest(lat, lon, MAX_DISTANCE);
|
||||
if (s != null) {
|
||||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
location.assignLocation(lat, lon);
|
||||
location.assignLocation(lat.floatValue(),
|
||||
lon.floatValue());
|
||||
location.setStationId(s.getId());
|
||||
obsData.setLocation(location);
|
||||
} else {
|
||||
|
|
|
@ -49,7 +49,6 @@ import com.raytheon.edex.plugin.IBinaryDecoder;
|
|||
import com.raytheon.edex.plugin.ldad.common.DecodedData;
|
||||
import com.raytheon.edex.plugin.ldad.common.LdadField;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.ldadhydro.HydroLdadRecord;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
|
@ -70,6 +69,7 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* 10/16/13 DR 16685 M.Porricelli Add error checking for date
|
||||
* format
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author vkorolev
|
||||
|
@ -169,12 +169,12 @@ public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
|
|||
}
|
||||
}
|
||||
if (nn.equals("_lat")) {
|
||||
double val = Double.parseDouble(vv);
|
||||
float val = Float.parseFloat(vv);
|
||||
location.setLatitude(val);
|
||||
continue;
|
||||
}
|
||||
if (nn.equals("_lon")) {
|
||||
double val = Double.parseDouble(vv);
|
||||
float val = Float.parseFloat(vv);
|
||||
location.setLongitude(val);
|
||||
continue;
|
||||
}
|
||||
|
@ -203,7 +203,6 @@ public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
|
|||
DataTime dt = new DataTime(ot);
|
||||
record.setDataTime(dt);
|
||||
record.setLocation(location);
|
||||
record.constructDataURI();
|
||||
retVal.add(record);
|
||||
}
|
||||
// logger.info("-------------------------------------------------------");
|
||||
|
@ -219,8 +218,6 @@ public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
|
|||
logger.error(traceId + " - SecurityException:" + e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
logger.error(traceId + " - IllegalArgumentException:" + e);
|
||||
} catch (PluginException e) {
|
||||
logger.error(traceId + " - PluginException:" + e);
|
||||
}
|
||||
}
|
||||
return retVal.toArray(new PluginDataObject[retVal.size()]);
|
||||
|
@ -242,14 +239,13 @@ public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
|
|||
* @throws Throwable
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setProperty(String name, Object obj, String value, String vunit) {
|
||||
|
||||
String prop = Character.toUpperCase(name.charAt(0)) + name.substring(1);
|
||||
String mname = "set" + prop;
|
||||
Object val = null;
|
||||
try {
|
||||
Class cls = obj.getClass();
|
||||
Class<?> cls = obj.getClass();
|
||||
Field fld = cls.getDeclaredField(name);
|
||||
Class<?> clazz = fld.getType();
|
||||
// Type filter
|
||||
|
@ -319,11 +315,10 @@ public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
|
|||
}
|
||||
|
||||
// List of Fields in record
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void main(String args[]) {
|
||||
HydroLdadRecord record = new HydroLdadRecord();
|
||||
try {
|
||||
Class cls = record.getClass();
|
||||
Class<?> cls = record.getClass();
|
||||
|
||||
Field fieldlist[] = cls.getDeclaredFields();
|
||||
for (Field fld : fieldlist) {
|
||||
|
|
|
@ -48,7 +48,6 @@ import com.raytheon.edex.plugin.IBinaryDecoder;
|
|||
import com.raytheon.edex.plugin.ldad.common.DecodedData;
|
||||
import com.raytheon.edex.plugin.ldad.common.LdadField;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
|
@ -66,6 +65,7 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 30, 2009 vkorolev Initial creation
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author vkorolev
|
||||
|
@ -163,12 +163,12 @@ public class ManualDecoder<E> extends AbstractDecoder implements IBinaryDecoder
|
|||
}
|
||||
}
|
||||
if (nn.equals("_lat")) {
|
||||
double val = Double.parseDouble(vv);
|
||||
float val = Float.parseFloat(vv);
|
||||
location.setLatitude(val);
|
||||
continue;
|
||||
}
|
||||
if (nn.equals("_lon")) {
|
||||
double val = Double.parseDouble(vv);
|
||||
float val = Float.parseFloat(vv);
|
||||
location.setLongitude(val);
|
||||
continue;
|
||||
}
|
||||
|
@ -196,7 +196,6 @@ public class ManualDecoder<E> extends AbstractDecoder implements IBinaryDecoder
|
|||
DataTime dt = new DataTime(ot);
|
||||
record.setDataTime(dt);
|
||||
record.setLocation(location);
|
||||
record.constructDataURI();
|
||||
retVal.add(record);
|
||||
// logger.info("-------------------------------------------------------");
|
||||
}
|
||||
|
@ -211,8 +210,6 @@ public class ManualDecoder<E> extends AbstractDecoder implements IBinaryDecoder
|
|||
logger.error(traceId + " - SecurityException:" + e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
logger.error(traceId + " - IllegalArgumentException:" + e);
|
||||
} catch (PluginException e) {
|
||||
logger.error(traceId + " - PluginException:" + e);
|
||||
}
|
||||
}
|
||||
return retVal.toArray(new PluginDataObject[retVal.size()]);
|
||||
|
|
|
@ -62,6 +62,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* PluginDataObject.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jun 11, 2014 2061 bsteffen Remove IDecoderGettable
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -2102,7 +2103,7 @@ public class ManualLdadRecord extends PluginDataObject implements
|
|||
*
|
||||
* @return The geometry latitude.
|
||||
*/
|
||||
public Double getLatitude() {
|
||||
public Float getLatitude() {
|
||||
return location.getLatitude();
|
||||
}
|
||||
|
||||
|
@ -2111,7 +2112,7 @@ public class ManualLdadRecord extends PluginDataObject implements
|
|||
*
|
||||
* @return The geometry longitude.
|
||||
*/
|
||||
public Double getLongitude() {
|
||||
public Float getLongitude() {
|
||||
return location.getLongitude();
|
||||
}
|
||||
|
||||
|
|
|
@ -83,6 +83,8 @@ import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;
|
|||
* Sep 17, 2013 2378 njensen Improve 3/6 hr precip decoding
|
||||
* May 12, 2014 DR 17151 D. Friedman Fix 6hr min/max temp decoding.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
|
@ -288,8 +290,8 @@ public class MetarDecoder extends AbstractDecoder {
|
|||
ObStation station = getStationInfo(icao);
|
||||
if (station != null) {
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation(icao);
|
||||
Double lat = station.getGeometry().getY();
|
||||
Double lon = station.getGeometry().getX();
|
||||
float lat = (float) station.getGeometry().getY();
|
||||
float lon = (float) station.getGeometry().getX();
|
||||
loc.assignLocation(lat, lon);
|
||||
loc.setElevation(station.getElevation());
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ import com.raytheon.uf.edex.decodertools.core.DecoderTools;
|
|||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Dec 16, 2013 DR 16920 D. Friemdan Fix type of tempFromTenths access.
|
||||
* May 14, 2014 2536 bclement removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -389,8 +390,8 @@ public class MetarPointDataTransform {
|
|||
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation(
|
||||
pdv.getString(STATION_NAME));
|
||||
Double lat = pdv.getNumber(LATITUDE).doubleValue();
|
||||
Double lon = pdv.getNumber(LONGITUDE).doubleValue();
|
||||
float lat = pdv.getNumber(LATITUDE).floatValue();
|
||||
float lon = pdv.getNumber(LONGITUDE).floatValue();
|
||||
loc.assignLocation(lat, lon);
|
||||
loc.setElevation(pdv.getNumber(ELEVATION).intValue());
|
||||
mr.setLocation(loc);
|
||||
|
|
|
@ -60,6 +60,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
* Jul 17, 2013 2112 bsteffen Split poes data so it gets stored in
|
||||
* correct file.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -168,7 +169,8 @@ public class POESSoundingDataAdapter {
|
|||
SPIEntry s = SPI_DATA.nearest(lat, lon, MAX_DISTANCE);
|
||||
if (s != null) {
|
||||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
location.assignLocation(lat, lon);
|
||||
location.assignLocation(lat.floatValue(),
|
||||
lon.floatValue());
|
||||
location.setStationId(s.getId());
|
||||
obsData.setLocation(location);
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* added breaks/default to switch
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -212,7 +213,7 @@ public class ProfilerDataAdapter {
|
|||
ProfilerSite site = profilers.get(wmoBSN);
|
||||
if (site != null) {
|
||||
location.setStationId(site.getStationId());
|
||||
location.assignLocation(lat, lon);
|
||||
location.assignLocation(lat.floatValue(), lon.floatValue());
|
||||
location.setLocationDefined(false);
|
||||
if (stationHeight != IDecoderConstants.VAL_MISSING) {
|
||||
location.setElevation(stationHeight);
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 20070928 391 jkorman Initial Coding.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -47,9 +48,9 @@ public class DRIBUSynopticDecoder extends AbstractSynopticDecoder {
|
|||
// private Integer dateMM = null; // Month
|
||||
// private Integer dateJ = null; // Units digit of year
|
||||
// private Integer dategg = null; // Minutes
|
||||
private Double buoyLatitude = null;
|
||||
private Float buoyLatitude = null;
|
||||
|
||||
private Double buoyLongitude = null;
|
||||
private Float buoyLongitude = null;
|
||||
|
||||
private Integer buoyQuadrant = null;
|
||||
|
||||
|
@ -183,21 +184,21 @@ public class DRIBUSynopticDecoder extends AbstractSynopticDecoder {
|
|||
reportParser.next();
|
||||
String element = reportParser.getElement();
|
||||
Integer lat = null;
|
||||
double divisor = 1000.0;
|
||||
float divisor = 1000.0f;
|
||||
if (matchElement(element, "[1357]\\d{5}")) {
|
||||
buoyQuadrant = getInt(element, 0, 1);
|
||||
lat = getInt(element, 1, 6);
|
||||
} else if (matchElement(element, "[1357]\\d{4}/")) {
|
||||
buoyQuadrant = getInt(element, 0, 1);
|
||||
lat = getInt(element, 1, 5);
|
||||
divisor = 100.0;
|
||||
divisor = 100.0f;
|
||||
} else if (matchElement(element, "[1357]\\d{3}//")) {
|
||||
buoyQuadrant = getInt(element, 0, 1);
|
||||
lat = getInt(element, 1, 4);
|
||||
divisor = 10.0;
|
||||
divisor = 10.0f;
|
||||
}
|
||||
if ((lat != null) && (lat >= 0)) {
|
||||
buoyLatitude = lat.doubleValue() / divisor;
|
||||
buoyLatitude = lat.floatValue() / divisor;
|
||||
} else {
|
||||
buoyLatitude = null;
|
||||
}
|
||||
|
@ -216,18 +217,18 @@ public class DRIBUSynopticDecoder extends AbstractSynopticDecoder {
|
|||
reportParser.next();
|
||||
String element = reportParser.getElement();
|
||||
Integer lon = null;
|
||||
double divisor = 1000.0;
|
||||
float divisor = 1000.0f;
|
||||
if (matchElement(element, "\\d{6}")) {
|
||||
lon = getInt(element, 0, 6);
|
||||
} else if (matchElement(element, "\\d{5}/")) {
|
||||
lon = getInt(element, 0, 5);
|
||||
divisor = 100.0;
|
||||
divisor = 100.0f;
|
||||
} else if (matchElement(element, "\\d{4}//")) {
|
||||
lon = getInt(element, 0, 4);
|
||||
divisor = 10.0;
|
||||
divisor = 10.0f;
|
||||
}
|
||||
if ((lon != null) && (lon >= 0)) {
|
||||
buoyLongitude = lon.doubleValue() / divisor;
|
||||
buoyLongitude = lon.floatValue() / divisor;
|
||||
} else {
|
||||
buoyLongitude = null;
|
||||
}
|
||||
|
@ -242,8 +243,8 @@ public class DRIBUSynopticDecoder extends AbstractSynopticDecoder {
|
|||
if ((buoyLatitude != null) && (buoyLongitude != null)
|
||||
&& (buoyQuadrant != null)) {
|
||||
if ((buoyLatitude >= 0) && (buoyLongitude >= 0)) {
|
||||
double lat = 0;
|
||||
double lon = 0;
|
||||
float lat = 0;
|
||||
float lon = 0;
|
||||
switch (buoyQuadrant) {
|
||||
case 1: {
|
||||
lat = 1;
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 20070928 391 jkorman Initial Coding.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -49,9 +50,9 @@ public class MobileSynopticDecoder extends AbstractSynopticDecoder {
|
|||
// The logger
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private Double mobileLatitude = null;
|
||||
private Float mobileLatitude = null;
|
||||
|
||||
private Double mobileLongitude = null;
|
||||
private Float mobileLongitude = null;
|
||||
|
||||
private Integer mobileQuadrant = null;
|
||||
|
||||
|
@ -173,7 +174,7 @@ public class MobileSynopticDecoder extends AbstractSynopticDecoder {
|
|||
if (matchElement(element, "99\\d{3}")) {
|
||||
Integer lat = getInt(element, 2, 5);
|
||||
if (lat != null) {
|
||||
mobileLatitude = lat.doubleValue() / 10.0;
|
||||
mobileLatitude = lat.floatValue() / 10.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +193,7 @@ public class MobileSynopticDecoder extends AbstractSynopticDecoder {
|
|||
if (matchElement(element, "[1357]((0\\d{3})|(1(([0-7]\\d{2})|(800))))")) {
|
||||
Integer lon = getInt(element, 2, 5);
|
||||
if (lon != null) {
|
||||
mobileLongitude = lon.doubleValue() / 10.0;
|
||||
mobileLongitude = lon.floatValue() / 10.0f;
|
||||
}
|
||||
mobileQuadrant = getInt(element, 0, 1);
|
||||
}
|
||||
|
@ -207,8 +208,8 @@ public class MobileSynopticDecoder extends AbstractSynopticDecoder {
|
|||
if ((mobileLatitude != null) && (mobileLongitude != null)
|
||||
&& (mobileQuadrant != null)) {
|
||||
if ((mobileLatitude >= 0) && (mobileLongitude >= 0)) {
|
||||
double lat = 0;
|
||||
double lon = 0;
|
||||
float lat = 0;
|
||||
float lon = 0;
|
||||
switch (mobileQuadrant) {
|
||||
case 1: {
|
||||
lat = 1;
|
||||
|
|
|
@ -49,6 +49,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
* 20080108 721 jkorman Added buoy id query.
|
||||
* 20120619 DR 14015 mporricelli Added elevation for fixed buoys
|
||||
* Feb 27, 2013 1638 mschenke Moved ObStationDao to edex pointdata plugin
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -58,9 +59,9 @@ public class SHIPSynopticDecoder extends AbstractSynopticDecoder {
|
|||
// The logger
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
protected Double shipLatitude = null;
|
||||
protected Float shipLatitude = null;
|
||||
|
||||
protected Double shipLongitude = null;
|
||||
protected Float shipLongitude = null;
|
||||
|
||||
protected Integer shipElev = null;
|
||||
|
||||
|
@ -161,8 +162,8 @@ public class SHIPSynopticDecoder extends AbstractSynopticDecoder {
|
|||
// with the spi files
|
||||
|
||||
|
||||
shipLatitude = buoyLat;
|
||||
shipLongitude = buoyLon;
|
||||
shipLatitude = buoyLat != null ? buoyLat.floatValue() : null;
|
||||
shipLongitude = buoyLon != null ? buoyLon.floatValue() : null;
|
||||
shipElev = buoyElev;
|
||||
if ((shipLatitude == null) || (shipLongitude == null)) {
|
||||
clearSectionDecoders();
|
||||
|
@ -222,7 +223,7 @@ public class SHIPSynopticDecoder extends AbstractSynopticDecoder {
|
|||
if (matchElement(element, "99\\d{3}")) {
|
||||
Integer lat = getInt(element, 2, 5);
|
||||
if ((lat != null) && (lat >= 0)) {
|
||||
shipLatitude = lat.doubleValue() / 10.0;
|
||||
shipLatitude = lat.floatValue() / 10.0f;
|
||||
} else {
|
||||
shipLatitude = null;
|
||||
}
|
||||
|
@ -240,7 +241,7 @@ public class SHIPSynopticDecoder extends AbstractSynopticDecoder {
|
|||
if (matchElement(element, "[1357]((0\\d{3})|(1(([0-7]\\d{2})|(800))))")) {
|
||||
Integer lon = getInt(element, 1, 5);
|
||||
if ((lon != null) && (lon >= 0)) {
|
||||
shipLongitude = lon.doubleValue() / 10.0;
|
||||
shipLongitude = lon.floatValue() / 10.0f;
|
||||
} else {
|
||||
shipLongitude = null;
|
||||
}
|
||||
|
@ -257,8 +258,8 @@ public class SHIPSynopticDecoder extends AbstractSynopticDecoder {
|
|||
if ((shipLatitude != null) && (shipLongitude != null)
|
||||
&& (shipQuadrant != null)) {
|
||||
if ((shipLatitude >= 0) && (shipLongitude >= 0)) {
|
||||
double lat = 0;
|
||||
double lon = 0;
|
||||
float lat = 0;
|
||||
float lon = 0;
|
||||
switch (shipQuadrant) {
|
||||
case 1: {
|
||||
lat = 1;
|
||||
|
|
|
@ -32,6 +32,7 @@ import javax.xml.bind.annotation.XmlElement;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 16, 2009 jkorman Initial creation
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -46,10 +47,10 @@ public class Airport {
|
|||
private String id;
|
||||
|
||||
@XmlElement
|
||||
private Double latitude;
|
||||
private Float latitude;
|
||||
|
||||
@XmlElement
|
||||
private Double longitude;
|
||||
private Float longitude;
|
||||
|
||||
@XmlElement
|
||||
private Double elevation;
|
||||
|
@ -98,7 +99,7 @@ public class Airport {
|
|||
/**
|
||||
* @return the latitude
|
||||
*/
|
||||
public Double getLatitude() {
|
||||
public Float getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
|
@ -106,14 +107,14 @@ public class Airport {
|
|||
* @param latitude
|
||||
* the latitude to set
|
||||
*/
|
||||
public void setLatitude(Double latitude) {
|
||||
public void setLatitude(Float latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the longitude
|
||||
*/
|
||||
public Double getLongitude() {
|
||||
public Float getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
|
@ -121,7 +122,7 @@ public class Airport {
|
|||
* @param longitude
|
||||
* the longitude to set
|
||||
*/
|
||||
public void setLongitude(Double longitude) {
|
||||
public void setLongitude(Float longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ package com.raytheon.uf.common.dataplugin.bufrua.dao;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -33,7 +34,7 @@ import com.raytheon.uf.common.pointdata.PointDataContainer;
|
|||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
|
||||
/**
|
||||
* Converts a PointDataContainer into a UAObs record.
|
||||
|
@ -48,6 +49,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
* Jul 19, 2013 1992 bsteffen Remove redundant time columns from
|
||||
* bufrua.
|
||||
* Sep 9, 2013 2277 mschenke Got rid of ScriptCreator references
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -109,14 +111,14 @@ public class BufrUAPointDataTransform {
|
|||
|
||||
long vt = pdv.getNumber("validTime").longValue();
|
||||
|
||||
obs.setDataTime(new DataTime(TimeTools.newCalendar(vt)));
|
||||
obs.setDataTime(new DataTime(TimeUtil.newGmtCalendar(new Date(vt))));
|
||||
|
||||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
|
||||
int elev = pdv.getNumber("staElev").intValue();
|
||||
location.setElevation(elev);
|
||||
double lat = pdv.getNumber("latitude").doubleValue();
|
||||
double lon = pdv.getNumber("longitude").doubleValue();
|
||||
float lat = pdv.getNumber("latitude").floatValue();
|
||||
float lon = pdv.getNumber("longitude").floatValue();
|
||||
location.assignLocation(lat, lon);
|
||||
Number sta = pdv.getNumber("wmoStaNum");
|
||||
location.setStationId(sta.toString());
|
||||
|
|
|
@ -20,12 +20,13 @@
|
|||
package com.raytheon.uf.common.dataplugin.fssobs;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
|
||||
/**
|
||||
* Provides a transform from PointDataContainer to FSSObsRecord.
|
||||
|
@ -37,6 +38,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 8, 2011 skorolev Initial creation
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -187,8 +189,8 @@ public class FSSObsRecordTransform {
|
|||
obs.setDataURI(pdv.getString(DATA_URI));
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation(
|
||||
pdv.getString(PLATFORM_ID));
|
||||
Double lat = pdv.getNumber(LATITUDE).doubleValue();
|
||||
Double lon = pdv.getNumber(LONGITUDE).doubleValue();
|
||||
float lat = pdv.getNumber(LATITUDE).floatValue();
|
||||
float lon = pdv.getNumber(LONGITUDE).floatValue();
|
||||
loc.assignLocation(lat, lon);
|
||||
loc.setElevation(pdv.getNumber(ELEVATION).intValue());
|
||||
obs.setLocation(loc);
|
||||
|
@ -228,9 +230,9 @@ public class FSSObsRecordTransform {
|
|||
obs.setStnName(pdv.getString(STATION_NAME));
|
||||
obs.setTemperature(pdv.getFloat(TEMPERATURE));
|
||||
long to = pdv.getLong(TIME_OBS);
|
||||
obs.setTimeObs(TimeTools.newCalendar(to));
|
||||
obs.setTimeObs(TimeUtil.newGmtCalendar(new Date(to)));
|
||||
long rh = pdv.getLong(REF_HOUR);
|
||||
obs.setRefHour(TimeTools.newCalendar(rh));
|
||||
obs.setRefHour(TimeUtil.newGmtCalendar(new Date(rh)));
|
||||
obs.setTotCloudAmount(pdv.getNumber(CLOUD_AMOUNT_TOT).intValue());
|
||||
obs.setVisibility(pdv.getNumber(VISIBILITY).floatValue());
|
||||
obs.setHighResWaveHeight(pdv.getFloat(WAVE_HEIGHT));
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 09, 2009 DR2814 vkorolev Initial creation
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -477,8 +478,8 @@ public class LdadmesonetPointDataTransform {
|
|||
mr.setDewpoint(pdv.getNumber(DEWPOINT).floatValue());
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation(
|
||||
pdv.getString(STATION_ID));
|
||||
Double lat = pdv.getNumber(LATITUDE).doubleValue();
|
||||
Double lon = pdv.getNumber(LONGITUDE).doubleValue();
|
||||
float lat = pdv.getNumber(LATITUDE).floatValue();
|
||||
float lon = pdv.getNumber(LONGITUDE).floatValue();
|
||||
loc.assignLocation(lat, lon);
|
||||
loc.setElevation(pdv.getNumber(ELEVATION).intValue());
|
||||
mr.setLocation(loc);
|
||||
|
|
|
@ -62,6 +62,7 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
* ------------- -------- ----------- --------------------------
|
||||
* Apr 06, 2011 bsteffen Initial creation
|
||||
* Dec 02, 2013 2537 bsteffen Move to common
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -156,11 +157,11 @@ public class ModelSoundingPointDataTransform {
|
|||
// All of these things would have been in dataURI
|
||||
if (parameters.contains(LATITUDE)) {
|
||||
site.getLocation().setLatitude(
|
||||
pdv.getNumber(LATITUDE).doubleValue());
|
||||
pdv.getNumber(LATITUDE).floatValue());
|
||||
}
|
||||
if (parameters.contains(LONGITUDE)) {
|
||||
site.getLocation().setLongitude(
|
||||
pdv.getNumber(LONGITUDE).doubleValue());
|
||||
pdv.getNumber(LONGITUDE).floatValue());
|
||||
}
|
||||
if (parameters.contains(STATION_ID)) {
|
||||
site.getLocation().setStationId(pdv.getString(STATION_ID));
|
||||
|
|
|
@ -87,6 +87,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
|||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Feb 11, 2014 2784 rferrel Remove override of setIdentifier.
|
||||
* Jun 11, 2014 2061 bsteffen Remove IDecoderGettable
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1214,7 +1215,7 @@ public class MetarRecord extends PersistablePluginDataObject implements
|
|||
return false;
|
||||
}
|
||||
|
||||
Double lat = location.getLatitude();
|
||||
Float lat = location.getLatitude();
|
||||
if (lat == null) {
|
||||
if (other.location.getLatitude() != null) {
|
||||
return false;
|
||||
|
@ -1224,7 +1225,7 @@ public class MetarRecord extends PersistablePluginDataObject implements
|
|||
return false;
|
||||
}
|
||||
}
|
||||
Double lon = location.getLongitude();
|
||||
Float lon = location.getLongitude();
|
||||
if (lon == null) {
|
||||
if (other.location.getLongitude() != null) {
|
||||
return false;
|
||||
|
|
|
@ -45,6 +45,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
|||
* ------------- -------- ----------- --------------------------
|
||||
* Oct 28, 2009 jkorman Initial creation
|
||||
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -112,8 +113,8 @@ public class ProfilerDataTransform {
|
|||
|
||||
int elev = pdv.getNumber("elevation").intValue();
|
||||
location.setElevation(elev);
|
||||
double lat = pdv.getNumber("latitude").doubleValue();
|
||||
double lon = pdv.getNumber("longitude").doubleValue();
|
||||
float lat = pdv.getNumber("latitude").floatValue();
|
||||
float lon = pdv.getNumber("longitude").floatValue();
|
||||
location.assignLocation(lat, lon);
|
||||
location.setStationId(pdv.getString("stationId"));
|
||||
obs.setLocation(location);
|
||||
|
|
|
@ -61,6 +61,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* PluginDataObject.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Oct 22, 2013 2361 njensen Remove XML annotations
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -146,8 +147,8 @@ public class TropicalCycloneSummary extends PersistablePluginDataObject
|
|||
displayTime = "";
|
||||
}
|
||||
|
||||
public TropicalCycloneSummary(String name, int pressure, double longitude,
|
||||
double latitude, String displayTime, int wind, boolean tropical) {
|
||||
public TropicalCycloneSummary(String name, int pressure, float longitude,
|
||||
float latitude, String displayTime, int wind, boolean tropical) {
|
||||
this.name = name;
|
||||
this.pressure = pressure;
|
||||
location = new SurfaceObsLocation(name);
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 30, 2010 jsanchez Initial creation
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -60,7 +61,7 @@ public class Util implements TCSConstants {
|
|||
DataTime dataTime) {
|
||||
TropicalCycloneSummary tcs = null;
|
||||
|
||||
double t1 = 0.0, t2 = 0.0, tf = 0.0, dt = 0.0, tc = 0.0;
|
||||
float t1 = 0.0f, t2 = 0.0f, tf = 0.0f, dt = 0.0f, tc = 0.0f;
|
||||
|
||||
Calendar calendar = dataTime.getRefTimeAsCalendar();
|
||||
int day = dataTime.getValidTime().get(Calendar.DAY_OF_MONTH);
|
||||
|
@ -68,8 +69,8 @@ public class Util implements TCSConstants {
|
|||
|
||||
boolean tropical = true;
|
||||
int wind = 0;
|
||||
double lat = 29.0; // This came from TCMplotter.C
|
||||
double lon = -89.6; // This came from TCMplotter.C
|
||||
float lat = 29.0f; // This came from TCMplotter.C
|
||||
float lon = -89.6f; // This came from TCMplotter.C
|
||||
String dTime = "Dissipated";
|
||||
|
||||
int size = pdv.getInt(SIZE);
|
||||
|
@ -83,8 +84,8 @@ public class Util implements TCSConstants {
|
|||
if (size < 2) {
|
||||
if (size > 0) {
|
||||
// set location at last one
|
||||
lat = latitude[size - 1].doubleValue();
|
||||
lon = longitude[size - 1].doubleValue();
|
||||
lat = latitude[size - 1].floatValue();
|
||||
lon = longitude[size - 1].floatValue();
|
||||
}
|
||||
return new TropicalCycloneSummary(name, 0, lon, lat, dTime,
|
||||
windSpeed[size - 1].intValue(),
|
||||
|
@ -105,7 +106,7 @@ public class Util implements TCSConstants {
|
|||
if (dataTime.getValidTime().getTimeInMillis() == dataTime.getRefTime()
|
||||
.getTime()) {
|
||||
tcs = new TropicalCycloneSummary(name, pressure,
|
||||
longitude[0].doubleValue(), latitude[0].doubleValue(),
|
||||
longitude[0].floatValue(), latitude[0].floatValue(),
|
||||
displayTime[0], windSpeed[0].intValue(),
|
||||
isTropical[0].intValue() == 1 ? true : false);
|
||||
tcs.setRadiusList(loadRadiusList(pdv, 0));
|
||||
|
@ -129,7 +130,7 @@ public class Util implements TCSConstants {
|
|||
|
||||
if (tc < 0.01) {
|
||||
tcs = new TropicalCycloneSummary(name, 0,
|
||||
longitude[i].doubleValue(), latitude[i].doubleValue(),
|
||||
longitude[i].floatValue(), latitude[i].floatValue(),
|
||||
displayTime[i], windSpeed[i].intValue(),
|
||||
isTropical[i].intValue() == 1 ? true : false);
|
||||
tcs.setRadiusList(loadRadiusList(pdv, i));
|
||||
|
@ -146,8 +147,8 @@ public class Util implements TCSConstants {
|
|||
if (i >= size) {
|
||||
if (size > 0) {
|
||||
// set location at last one
|
||||
lat = latitude[size - 1].doubleValue();
|
||||
lon = longitude[size - 1].doubleValue();
|
||||
lat = latitude[size - 1].floatValue();
|
||||
lon = longitude[size - 1].floatValue();
|
||||
}
|
||||
return new TropicalCycloneSummary(name, 0, lon, lat, dTime,
|
||||
windSpeed[size - 1].intValue(),
|
||||
|
|
|
@ -48,6 +48,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* 15Jan2008 682 ebabin Updated to remove non calculated parameters.
|
||||
* 16Jan2008 682 ebabin Updates for grib model traps on multiple loads.
|
||||
* 04Oct2008 dhladky Many changes.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -598,7 +599,7 @@ public class VerticalSounding implements Iterable<SoundingLayer>, Cloneable {
|
|||
* Set the geometry latitude.
|
||||
*
|
||||
*/
|
||||
public void setLatitude(double latitude) {
|
||||
public void setLatitude(float latitude) {
|
||||
spatialInfo.setLatitude(latitude);
|
||||
}
|
||||
|
||||
|
@ -606,7 +607,7 @@ public class VerticalSounding implements Iterable<SoundingLayer>, Cloneable {
|
|||
* Set the geometry longitude.
|
||||
*
|
||||
*/
|
||||
public void setLongitude(double longitude) {
|
||||
public void setLongitude(float longitude) {
|
||||
spatialInfo.setLongitude(longitude);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
* Jul 16, 2009 jkorman Initial creation
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jun 11, 2014 2061 bsteffen Remove IDecoderGettable
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -255,13 +256,13 @@ public class PluginDataObjectFilter extends AbstractObsFilter {
|
|||
|
||||
TestObject p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("1.1");
|
||||
p.location.assignLocation(.8, .8);
|
||||
p.location.assignLocation(.8f, .8f);
|
||||
p = (TestObject) element.filter(p);
|
||||
System.out.println((p == null) ? "passed" : "failed");
|
||||
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("1.2");
|
||||
p.location.assignLocation(.7, .7);
|
||||
p.location.assignLocation(.7f, .7f);
|
||||
p = (TestObject) element.filter(p);
|
||||
System.out.println((p == null) ? "failed" : p);
|
||||
|
||||
|
@ -271,13 +272,13 @@ public class PluginDataObjectFilter extends AbstractObsFilter {
|
|||
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("2.1");
|
||||
p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W
|
||||
p.location.assignLocation(38.78f, -97.65f); // KSLN 38 47N 097 39W
|
||||
p = (TestObject) element.filter(p);
|
||||
System.out.println((p == null) ? p : "failed");
|
||||
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("2.2");
|
||||
p.location.assignLocation(39.13, -96.68); // KMHK 39 08N 096 41W
|
||||
p.location.assignLocation(39.13f, -96.68f); // KMHK 39 08N 096 41W
|
||||
p = (TestObject) element.filter(p);
|
||||
System.out.println((p != null) ? p : "failed");
|
||||
|
||||
|
@ -299,17 +300,17 @@ public class PluginDataObjectFilter extends AbstractObsFilter {
|
|||
PluginDataObject[] pp = new PluginDataObject[3];
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("KSLN");
|
||||
p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W
|
||||
p.location.assignLocation(38.78f, -97.65f); // KSLN 38 47N 097 39W
|
||||
pp[0] = p;
|
||||
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("KMHK");
|
||||
p.location.assignLocation(39.13, -96.68); // KMHK 39 08N 096 41W
|
||||
p.location.assignLocation(39.13f, -96.68f); // KMHK 39 08N 096 41W
|
||||
pp[1] = p;
|
||||
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("KSTJ");
|
||||
p.location.assignLocation(41, -96.00);
|
||||
p.location.assignLocation(41f, -96.00f);
|
||||
pp[2] = p;
|
||||
|
||||
pp = filter.filter(pp);
|
||||
|
@ -326,22 +327,22 @@ public class PluginDataObjectFilter extends AbstractObsFilter {
|
|||
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("KORD");
|
||||
p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W
|
||||
p.location.assignLocation(38.78f, -97.65f); // KSLN 38 47N 097 39W
|
||||
pp[0] = p;
|
||||
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("KSLN");
|
||||
p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W
|
||||
p.location.assignLocation(38.78f, -97.65f); // KSLN 38 47N 097 39W
|
||||
pp[1] = p;
|
||||
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("KMHK");
|
||||
p.location.assignLocation(39.13, -96.68); // KMHK 39 08N 096 41W
|
||||
p.location.assignLocation(39.13f, -96.68f); // KMHK 39 08N 096 41W
|
||||
pp[2] = p;
|
||||
|
||||
p = new TestObject();
|
||||
p.location = new SurfaceObsLocation("KSTJ");
|
||||
p.location.assignLocation(41, -96.00);
|
||||
p.location.assignLocation(41f, -96.00f);
|
||||
pp[3] = p;
|
||||
|
||||
filter = new PluginDataObjectFilter();
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 24, 2013 1746 dhladky Initial creation
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -74,8 +75,8 @@ public class ObsLocation {
|
|||
|
||||
this.setStationId(sol.getStationId());
|
||||
this.setElevation(sol.getElevation());
|
||||
Double lat = sol.getLatitude();
|
||||
Double lon = sol.getLongitude();
|
||||
Double lat = sol.getLatitude().doubleValue();
|
||||
Double lon = sol.getLongitude().doubleValue();
|
||||
PointType point = new PointType();
|
||||
DirectPositionType pos = new DirectPositionType();
|
||||
pos.setValue(Arrays.asList(lon, lat));
|
||||
|
|
|
@ -46,9 +46,9 @@ import com.raytheon.uf.edex.decodertools.bufr.packets.IBUFRDataPacket;
|
|||
|
||||
/**
|
||||
* Adapter used to decode ACARS data in BUFR format.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
|
@ -59,9 +59,10 @@ import com.raytheon.uf.edex.decodertools.bufr.packets.IBUFRDataPacket;
|
|||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jun 12, 2014 2061 bsteffen Generate unique stationid
|
||||
* Jul 22, 2014 3392 nabowle ACARSRecord has Float fields instead of Double
|
||||
*
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author jkorman
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -485,8 +486,8 @@ public class ACARSDataAdapter {
|
|||
|
||||
if ((lat != null) && (lon != null)) {
|
||||
loc = new AircraftObsLocation();
|
||||
loc.setLatitude(lat);
|
||||
loc.setLongitude(lon);
|
||||
loc.setLatitude(lat.floatValue());
|
||||
loc.setLongitude(lon.floatValue());
|
||||
loc.setLocation(lat, lon);
|
||||
|
||||
// We can pick up the height here for some data. Have to look
|
||||
|
@ -538,8 +539,8 @@ public class ACARSDataAdapter {
|
|||
|
||||
if ((lat != null) && (lon != null)) {
|
||||
loc = new AircraftObsLocation();
|
||||
loc.setLatitude(lat);
|
||||
loc.setLongitude(lon);
|
||||
loc.setLatitude(lat.floatValue());
|
||||
loc.setLongitude(lon.floatValue());
|
||||
loc.setLocation(lat, lon);
|
||||
generateStationId(loc);
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
|
|||
* types.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -137,7 +138,7 @@ public class AScatDataAdapter extends BUFRPointDataAdapter<AScatObs> {
|
|||
IDecoderConstants.VAL_MISSING);
|
||||
|
||||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
location.assignLocation(lat, lon);
|
||||
location.assignLocation((float) lat, (float) lon);
|
||||
location.generateCoordinateStationId();
|
||||
obsData.setLocation(location);
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
|
|||
* types.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -220,8 +221,8 @@ public class HDWDataAdapter extends BUFRPointDataAdapter<BufrHDWObs> {
|
|||
IDecoderConstants.VAL_MISSING);
|
||||
|
||||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
location.setLatitude(lat);
|
||||
location.setLongitude(lon);
|
||||
location.setLatitude((float) lat);
|
||||
location.setLongitude((float) lon);
|
||||
location.generateCoordinateStationId();
|
||||
pointData.setLocation(location);
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
|
|||
* types.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -225,8 +226,8 @@ public class MTHDWDataAdapter extends BUFRPointDataAdapter<BufrMTHDWObs> {
|
|||
IDecoderConstants.VAL_MISSING);
|
||||
|
||||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
location.setLatitude(lat);
|
||||
location.setLongitude(lon);
|
||||
location.setLatitude((float) lat);
|
||||
location.setLongitude((float) lon);
|
||||
location.generateCoordinateStationId();
|
||||
pointData.setLocation(location);
|
||||
// ****************************************
|
||||
|
|
|
@ -58,6 +58,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Aug 17, 2009 jkorman Initial creation
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -82,21 +83,21 @@ public class BUFRncwfDataAdapter extends BUFRPointDataAdapter<BUFRncwf> {
|
|||
|
||||
private static final int FEATURES_POS = 6;
|
||||
|
||||
private static final int FEATURE_TIMSIG_POS = 0;
|
||||
// private static final int FEATURE_TIMSIG_POS = 0;
|
||||
|
||||
private static final int FEATURE_TIMEPD_POS = 1;
|
||||
// private static final int FEATURE_TIMEPD_POS = 1;
|
||||
|
||||
private static final int FEATURE_ATTSIG_POS = 2;
|
||||
// private static final int FEATURE_ATTSIG_POS = 2;
|
||||
|
||||
private static final int FEATURE_DIMSIG_POS = 3;
|
||||
// private static final int FEATURE_DIMSIG_POS = 3;
|
||||
|
||||
private static final int FEATURE_LAT_POS = 4;
|
||||
|
||||
private static final int FEATURE_LON_POS = 5;
|
||||
|
||||
private static final int BOUNDARY_ATTSIG_POS = 6;
|
||||
// private static final int BOUNDARY_ATTSIG_POS = 6;
|
||||
|
||||
private static final int BOUNDARY_DIMSIG_POS = 7;
|
||||
// private static final int BOUNDARY_DIMSIG_POS = 7;
|
||||
|
||||
private static final int BOUNDARY_SUBLIST_POS = 8;
|
||||
|
||||
|
@ -253,9 +254,11 @@ public class BUFRncwfDataAdapter extends BUFRPointDataAdapter<BUFRncwf> {
|
|||
Coordinate centroid = ncwfReport.getDetection()
|
||||
.getCentroidLocation();
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation();
|
||||
loc.assignLocation(
|
||||
DecoderTools.getCoordinateLatitude(centroid),
|
||||
DecoderTools.getCoordinateLongitude(centroid));
|
||||
float lat = (float) DecoderTools
|
||||
.getCoordinateLatitude(centroid);
|
||||
float lon = (float) DecoderTools
|
||||
.getCoordinateLongitude(centroid);
|
||||
loc.assignLocation(lat, lon);
|
||||
ncwfReport.setLocation(loc);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,6 +91,7 @@ import com.raytheon.uf.edex.plugin.bufrobs.category.CategoryParser;
|
|||
* Apr 21, 2014 2906 bclement populated wmo header in record for consistency
|
||||
* Jun 12, 2014 3229 bclement default implementation for getTranslationFile() and createStationId()
|
||||
* moved processGeneralFields() and processPrecip() from synoptic land decoder
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -534,13 +535,13 @@ public abstract class AbstractBufrSfcObsDecoder {
|
|||
} else if (baseName.equalsIgnoreCase(SfcObsPointDataTransform.LATITUDE)) {
|
||||
Double lat = (Double) getFieldValue(parser, false);
|
||||
if (lat != null) {
|
||||
location.assignLatitude(lat);
|
||||
location.assignLatitude(lat.floatValue());
|
||||
}
|
||||
} else if (baseName
|
||||
.equalsIgnoreCase(SfcObsPointDataTransform.LONGITUDE)) {
|
||||
Double lon = (Double) getFieldValue(parser, false);
|
||||
if (lon != null) {
|
||||
location.assignLongitude(lon);
|
||||
location.assignLongitude(lon.floatValue());
|
||||
}
|
||||
} else if (baseName
|
||||
.equalsIgnoreCase(SfcObsPointDataTransform.ELEVATION)) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.edex.plugin.bufrobs.BufrObsDecodeException;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 11, 2014 3229 bclement Initial creation
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -171,7 +172,7 @@ public class BuoyBufrDecoder extends AbstractBufrSfcObsDecoder {
|
|||
throw new BufrObsDecodeException("BUFR file '"
|
||||
+ parser.getFile() + "' missing location information");
|
||||
}
|
||||
location.assignLocation(lat.doubleValue(), lon.doubleValue());
|
||||
location.assignLocation(lat.floatValue(), lon.floatValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
|
|||
* Mar 03, 2008 969 jkorman Initial implementation.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -137,7 +138,7 @@ public class QUIKScatDataAdapter extends BUFRPointDataAdapter<QUIKScatObs> {
|
|||
IDecoderConstants.VAL_MISSING);
|
||||
|
||||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
location.assignLocation(lat, lon);
|
||||
location.assignLocation((float) lat, (float) lon);
|
||||
obsData.setLocation(location);
|
||||
view.setFloat("latitude", (float) lat);
|
||||
view.setFloat("longitude", (float) lon);
|
||||
|
|
|
@ -56,6 +56,7 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
|
|||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Oct 21, 2013 2379 bsteffen Fix a null pointer exception.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -307,7 +308,7 @@ public class SSMIDataAdapter extends BUFRPointDataAdapter<SSMIScanData> {
|
|||
IDecoderConstants.VAL_MISSING);
|
||||
|
||||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
location.assignLocation(lat, lon);
|
||||
location.assignLocation((float) lat, (float) lon);
|
||||
location.generateCoordinateStationId();
|
||||
pointData.setLocation(location);
|
||||
setViewData("surfaceTag", view, locList.get(2));
|
||||
|
|
|
@ -23,9 +23,6 @@ import java.util.Date;
|
|||
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
|
||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
|
@ -33,6 +30,7 @@ import com.raytheon.uf.common.pointdata.PointDataDescription;
|
|||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
|
||||
/**
|
||||
|
@ -45,6 +43,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 3, 2010 skorolev Initial creation
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -54,8 +53,6 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
|
||||
public class FSSObsDataTransform {
|
||||
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private FSSObsDAO dao;
|
||||
|
||||
private static PointDataDescription fsspdd;
|
||||
|
@ -290,8 +287,8 @@ public class FSSObsDataTransform {
|
|||
fssr.setReportType(pdv.getString(REPORT_TYPE));
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation();
|
||||
loc.setStationId(pdv.getString(STATION_ID));
|
||||
Double lat = pdv.getNumber(LATITUDE).doubleValue();
|
||||
Double lon = pdv.getNumber(LONGITUDE).doubleValue();
|
||||
float lat = pdv.getNumber(LATITUDE).floatValue();
|
||||
float lon = pdv.getNumber(LONGITUDE).floatValue();
|
||||
loc.assignLocation(lat, lon);
|
||||
loc.setElevation(pdv.getNumber(ELEVATION).intValue());
|
||||
fssr.setLocation(loc);
|
||||
|
@ -302,7 +299,7 @@ public class FSSObsDataTransform {
|
|||
fssr.setDataTime(new DataTime(new Date(pdv.getNumber(TIME_OBS)
|
||||
.longValue())));
|
||||
long to = pdv.getLong(TIME_OBS);
|
||||
fssr.setTimeObs(TimeTools.newCalendar(to));
|
||||
fssr.setTimeObs(TimeUtil.newGmtCalendar(new Date(to)));
|
||||
// nominalTime
|
||||
fssr.setRefHour(TimeTools.roundToNearestHour(fssr.getTimeObs()));
|
||||
// in mbar
|
||||
|
@ -458,8 +455,8 @@ public class FSSObsDataTransform {
|
|||
FSSObsRecord fssr = new FSSObsRecord();
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation();
|
||||
loc.setStationId(pdv.getString(STATION_ID));
|
||||
Double lat = pdv.getNumber(LATITUDE).doubleValue();
|
||||
Double lon = pdv.getNumber(LONGITUDE).doubleValue();
|
||||
float lat = pdv.getNumber(LATITUDE).floatValue();
|
||||
float lon = pdv.getNumber(LONGITUDE).floatValue();
|
||||
loc.assignLocation(lat, lon);
|
||||
loc.setElevation(pdv.getNumber(ELEVATION).intValue());
|
||||
fssr.setLocation(loc);
|
||||
|
@ -471,7 +468,7 @@ public class FSSObsDataTransform {
|
|||
fssr.setDataTime(new DataTime(new Date(pdv.getNumber(TIME_OBS)
|
||||
.longValue())));
|
||||
long to = pdv.getLong(TIME_OBS);
|
||||
fssr.setTimeObs(TimeTools.newCalendar(to));
|
||||
fssr.setTimeObs(TimeUtil.newGmtCalendar(new Date(to)));
|
||||
// TODO: check nominalTime
|
||||
fssr.setRefHour(TimeTools.roundToNearestHour(fssr.getTimeObs()));
|
||||
|
||||
|
@ -555,8 +552,8 @@ public class FSSObsDataTransform {
|
|||
fssr.setReportType(pdv.getString(REPORT_TYPE));
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation();
|
||||
loc.setStationId(pdv.getString(STATION_ID));
|
||||
Double lat = pdv.getNumber(LATITUDE).doubleValue();
|
||||
Double lon = pdv.getNumber(LONGITUDE).doubleValue();
|
||||
float lat = pdv.getNumber(LATITUDE).floatValue();
|
||||
float lon = pdv.getNumber(LONGITUDE).floatValue();
|
||||
loc.assignLocation(lat, lon);
|
||||
loc.setElevation(pdv.getNumber(ELEVATION).intValue());
|
||||
fssr.setLocation(loc);
|
||||
|
@ -567,7 +564,7 @@ public class FSSObsDataTransform {
|
|||
fssr.setDataTime(new DataTime(new Date(pdv.getNumber(OBSERVATION_TIME)
|
||||
.longValue())));
|
||||
long to = pdv.getLong(OBSERVATION_TIME);
|
||||
fssr.setTimeObs(TimeTools.newCalendar(to));
|
||||
fssr.setTimeObs(TimeUtil.newGmtCalendar(new Date(to)));
|
||||
fssr.setRefHour(TimeTools.roundToNearestHour(fssr.getTimeObs()));
|
||||
// fssr.setCeiling(pdv.getNumber(CLOUD_BASE_HEIGHT).floatValue());
|
||||
if (pdv.getFloat(DEWPOINT) != MISSING) {
|
||||
|
@ -682,7 +679,7 @@ public class FSSObsDataTransform {
|
|||
* the pdc to set
|
||||
*/
|
||||
public void setPdc(PointDataContainer pdc) {
|
||||
this.pdc = pdc;
|
||||
FSSObsDataTransform.pdc = pdc;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -69,6 +69,7 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
* Sep 04, 2009 vkorolev Initial creation
|
||||
* May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author vkorolev
|
||||
|
@ -80,8 +81,6 @@ public class MesonetDecoder<E> extends AbstractDecoder implements
|
|||
|
||||
private static final String BAD_PROPERTY_FMT = "NumberFormatException setting property %s.%s(%s %s)";
|
||||
|
||||
private final String PLUGIN_NAME;
|
||||
|
||||
private String traceId = null;
|
||||
|
||||
private String currentFile = null;
|
||||
|
@ -93,7 +92,6 @@ public class MesonetDecoder<E> extends AbstractDecoder implements
|
|||
public Properties configFile = new Properties();
|
||||
|
||||
public MesonetDecoder(String pluginName) throws DecoderException {
|
||||
PLUGIN_NAME = pluginName;
|
||||
}
|
||||
|
||||
public void setTraceId(String id) {
|
||||
|
@ -211,12 +209,12 @@ public class MesonetDecoder<E> extends AbstractDecoder implements
|
|||
}
|
||||
}
|
||||
if ("_lat".equals(nn)) {
|
||||
double val = Double.parseDouble(vv);
|
||||
float val = Float.parseFloat(vv);
|
||||
location.setLatitude(val);
|
||||
continue;
|
||||
}
|
||||
if ("_lon".equals(nn)) {
|
||||
double val = Double.parseDouble(vv);
|
||||
float val = Float.parseFloat(vv);
|
||||
location.setLongitude(val);
|
||||
continue;
|
||||
}
|
||||
|
@ -427,7 +425,6 @@ public class MesonetDecoder<E> extends AbstractDecoder implements
|
|||
}
|
||||
|
||||
// List of Fields in record
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void main(String args[]) {
|
||||
MesonetLdadRecord record = new MesonetLdadRecord();
|
||||
try {
|
||||
|
|
|
@ -58,6 +58,7 @@ import com.raytheon.uf.edex.plugin.lsr.LocalStormReportDao;
|
|||
* Jan 07, 2013 2581 njensen Check to end of string for source, not a set length
|
||||
* Jan 13, 2013 2581 njensen Improved error handling and logging
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -450,13 +451,13 @@ public class LSRParser {
|
|||
Matcher m = LATLON_PTRN.matcher(latlon);
|
||||
if (m.find()) {
|
||||
String ss = m.group(2);
|
||||
Double lat = Double.parseDouble(ss.substring(0, ss.length() - 1));
|
||||
float lat = Float.parseFloat(ss.substring(0, ss.length() - 1));
|
||||
if (ss.endsWith("S")) {
|
||||
lat *= -1;
|
||||
}
|
||||
|
||||
ss = m.group(4);
|
||||
Double lon = Double.parseDouble(ss.substring(0, ss.length() - 1));
|
||||
float lon = Float.parseFloat(ss.substring(0, ss.length() - 1));
|
||||
if (ss.endsWith("W")) {
|
||||
lon *= -1;
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ import com.raytheon.uf.edex.plugin.modelsounding.common.SoundingModels;
|
|||
* Jul 03, 2013 2161 bkowal Relocated the logic used to retrieve
|
||||
* temporal information into its own function.
|
||||
* Dec 02, 2013 2537 bsteffen Use SoundingSite setters instead of view.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -269,7 +270,7 @@ public class ModelSoundingDataAdapter {
|
|||
if (d == BUFRDescriptor.createDescriptor(0, 6, 2)) {
|
||||
lon = (Double) dp.getValue();
|
||||
}
|
||||
location.assignLocation(lat, lon);
|
||||
location.assignLocation(lat.floatValue(), lon.floatValue());
|
||||
dp = dataList.get(index);
|
||||
d = dp.getReferencingDescriptor().getDescriptor();
|
||||
if (d == BUFRDescriptor.createDescriptor(0, 10, 194)) {
|
||||
|
|
|
@ -60,6 +60,7 @@ import com.raytheon.uf.edex.plugin.qc.dao.QCDao;
|
|||
* May 16, 2013 1869 bsteffen Remove DataURI column from qc.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Feb 20, 2014 DR 17098 D. Friedman Filter out invalid lat/lon values.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -208,8 +209,8 @@ public class QCScanner {
|
|||
while (ri < records.length) {
|
||||
QCRecord r = new QCRecord();
|
||||
double obsTime = dObsTime.getDouble(ri);
|
||||
double lat = dLat.getDouble(ri);
|
||||
double lon = dLon.getDouble(ri);
|
||||
float lat = dLat.getFloat(ri);
|
||||
float lon = dLon.getFloat(ri);
|
||||
if ((obsTime != vObsTimeFillValue)
|
||||
&& ((vObsTimeMissingValue == null) || (vObsTimeMissingValue != obsTime))
|
||||
&& Math.abs(lon) <= 180 && Math.abs(lat) <= 90) {
|
||||
|
|
|
@ -44,11 +44,11 @@ import com.raytheon.uf.edex.plugin.svrwx.SvrWxRecordDao;
|
|||
|
||||
/**
|
||||
* SvrWx Parser
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
|
@ -57,9 +57,10 @@ import com.raytheon.uf.edex.plugin.svrwx.SvrWxRecordDao;
|
|||
* Apr 07, 2014 2971 skorolev Add condition to avoid malformed parts in the message.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed pluginName
|
||||
* Jun 25, 2014 3008 nabowle Refactor for EventReport type
|
||||
*
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author jsanchez
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -472,25 +473,25 @@ public class SvrWxParser {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the latitude as a double. Northern hemisphere is assumed.
|
||||
*
|
||||
* Get the latitude as a float. Northern hemisphere is assumed.
|
||||
*
|
||||
* @param latlon
|
||||
* The latitude/longitude String.
|
||||
* @return The latitude as a double.
|
||||
* @return The latitude as a float.
|
||||
*/
|
||||
private double getLat(String latlon) {
|
||||
return Float.parseFloat(parseLat(latlon)) / 100.0D;
|
||||
private float getLat(String latlon) {
|
||||
return Float.parseFloat(parseLat(latlon)) / 100.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the longitude as a double. Western hemisphere is assumed.
|
||||
*
|
||||
* Get the longitude as a float. Western hemisphere is assumed.
|
||||
*
|
||||
* @param latlon
|
||||
* The latitude/longitude String.
|
||||
* @return The longitude as a double.
|
||||
* @return The longitude as a float.
|
||||
*/
|
||||
private double getLon(String latlon) {
|
||||
return Float.parseFloat(parseLon(latlon)) / -100.0D;
|
||||
private float getLon(String latlon) {
|
||||
return Float.parseFloat(parseLon(latlon)) / -100.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,19 +39,20 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
/**
|
||||
* Parses a subset of Tropical Cyclone Guidance data that contain multiple storm
|
||||
* track predictions from various models such as BAM(S/M/D) and LBAR.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 26, 2009 jsanchez Initial creation
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jun 23, 2014 3235 nabowle Clear the coordinates map properly.
|
||||
*
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author jsanchez
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -95,8 +96,8 @@ public class HURData extends TCGDataAdapter {
|
|||
TropicalCycloneGuidance rpt = new TropicalCycloneGuidance();
|
||||
SurfaceObsLocation location = new SurfaceObsLocation(
|
||||
stationId);
|
||||
location.setLongitude(list.get(i).x);
|
||||
location.setLatitude(list.get(i).y);
|
||||
location.setLongitude((float) list.get(i).x);
|
||||
location.setLatitude((float) list.get(i).y);
|
||||
|
||||
rpt.setWmoHeader(wmoHeader.getWmoHeader());
|
||||
rpt.setTraceId(traceId);
|
||||
|
|
|
@ -45,6 +45,7 @@ import com.raytheon.uf.edex.plugin.tcg.TropicalCycloneGuidanceDao;
|
|||
* so times are set correctly when
|
||||
* processing archive data.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -56,11 +57,11 @@ public class QLMData extends TCGDataAdapter {
|
|||
private class ForecastPosition {
|
||||
public int hour;
|
||||
|
||||
public double latitude;
|
||||
public float latitude;
|
||||
|
||||
public double longitude;
|
||||
public float longitude;
|
||||
|
||||
public ForecastPosition(int hour, double lat, double lon) {
|
||||
public ForecastPosition(int hour, float lat, float lon) {
|
||||
this.hour = hour;
|
||||
this.latitude = lat;
|
||||
this.longitude = lon;
|
||||
|
@ -100,8 +101,8 @@ public class QLMData extends TCGDataAdapter {
|
|||
TropicalCycloneGuidance rpt = new TropicalCycloneGuidance();
|
||||
SurfaceObsLocation location = new SurfaceObsLocation(
|
||||
stationId);
|
||||
location.setLongitude(fp.longitude);
|
||||
location.setLatitude(fp.latitude);
|
||||
location.setLongitude((float) fp.longitude);
|
||||
location.setLatitude((float) fp.latitude);
|
||||
|
||||
rpt.setWmoHeader(wmoHeader.getWmoHeader());
|
||||
rpt.setTraceId(traceId);
|
||||
|
@ -155,8 +156,8 @@ public class QLMData extends TCGDataAdapter {
|
|||
String data[] = getParts(positionInfo, 3);
|
||||
|
||||
int hour = Integer.valueOf(data[0]);
|
||||
double lat = Double.valueOf(data[1]);
|
||||
double lon = Double.valueOf(data[2]) * -1;
|
||||
float lat = Float.valueOf(data[1]);
|
||||
float lon = Float.valueOf(data[2]) * -1;
|
||||
list.add(new ForecastPosition(hour, lat, lon));
|
||||
}
|
||||
|
||||
|
|
|
@ -35,20 +35,21 @@ import com.raytheon.uf.edex.plugin.tcg.TropicalCycloneGuidanceDao;
|
|||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 12, 2009 jsanchez Initial creation
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jun 24, 2014 3235 nabowle InternalReport patterns are now
|
||||
* precompiled.
|
||||
*
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author jsanchez
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -105,8 +106,8 @@ public class TCEData extends TCGDataAdapter {
|
|||
TropicalCycloneGuidance rpt = new TropicalCycloneGuidance();
|
||||
SurfaceObsLocation location = new SurfaceObsLocation(
|
||||
stationId);
|
||||
location.setLongitude((double) longitude);
|
||||
location.setLatitude((double) latitude);
|
||||
location.setLongitude(longitude);
|
||||
location.setLatitude(latitude);
|
||||
rpt.setWmoHeader(wmoHeader.getWmoHeader());
|
||||
rpt.setTraceId(traceId);
|
||||
rpt.setStormName(stormName);
|
||||
|
|
|
@ -54,6 +54,7 @@ import com.raytheon.uf.edex.plugin.tcs.TropicalCycloneSummaryDao;
|
|||
* calculate times.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -281,8 +282,8 @@ public class TCMData extends TCSDataAdapter {
|
|||
m = latlonPtrn.matcher(mask);
|
||||
if (m.find()) {
|
||||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
double latitude = Double.parseDouble(((m.group(1))));
|
||||
double longitude = Double.parseDouble((m.group(3)));
|
||||
float latitude = Float.parseFloat(((m.group(1))));
|
||||
float longitude = Float.parseFloat((m.group(3)));
|
||||
location.setLatitude(m.group(2).equals("S") ? -1 * latitude
|
||||
: latitude);
|
||||
location.setLongitude(m.group(4).equals("W") ? -1 * longitude
|
||||
|
|
|
@ -51,6 +51,7 @@ import com.raytheon.uf.common.wmo.WMOHeader;
|
|||
* Feb 11, 2014 2763 skorolev Made LFCR correction of input data.
|
||||
* Mar 10, 2014 2807 skorolev Added MalformedDataException for VAA decoding.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -59,11 +60,10 @@ import com.raytheon.uf.common.wmo.WMOHeader;
|
|||
*/
|
||||
public class VAAParser implements Iterable<VAARecord> {
|
||||
|
||||
// TODO should use JTS coordinate
|
||||
private static class LatLon {
|
||||
public Double lat;
|
||||
public float lat;
|
||||
|
||||
public Double lon;
|
||||
public float lon;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
@ -266,12 +266,12 @@ public class VAAParser implements Iterable<VAARecord> {
|
|||
Matcher m = InternalReport.LAT_LON_P.matcher(latLon);
|
||||
if (m.find()) {
|
||||
latlon = new LatLon();
|
||||
latlon.lat = Double.parseDouble(m.group(2));
|
||||
latlon.lat += (Double.parseDouble(m.group(3)) / 60.0);
|
||||
latlon.lat = Float.parseFloat(m.group(2));
|
||||
latlon.lat += (Float.parseFloat(m.group(3)) / 60.0f);
|
||||
latlon.lat *= ("S".equals(m.group(1))) ? -1 : 1;
|
||||
|
||||
latlon.lon = Double.parseDouble(m.group(5));
|
||||
latlon.lon += (Double.parseDouble(m.group(6)) / 60.0);
|
||||
latlon.lon = Float.parseFloat(m.group(5));
|
||||
latlon.lon += (Float.parseFloat(m.group(6)) / 60.0f);
|
||||
latlon.lon *= ("W".equals(m.group(4))) ? -1 : 1;
|
||||
}
|
||||
return latlon;
|
||||
|
|
|
@ -31,10 +31,9 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
|||
import com.raytheon.uf.common.time.DataTime;
|
||||
|
||||
/**
|
||||
* NcPafmBulletin is the highest level class for PAFM
|
||||
* (Point/Area Forecast Matrices) data. Each instance holds
|
||||
* all of the data parsed from one bulletin. Children
|
||||
* (NcPafmUgc) hold data from individual segments.
|
||||
* NcPafmBulletin is the highest level class for PAFM (Point/Area Forecast
|
||||
* Matrices) data. Each instance holds all of the data parsed from one bulletin.
|
||||
* Children (NcPafmUgc) hold data from individual segments.
|
||||
*
|
||||
* This code has been developed by the SIB for use in the AWIPS2 system.
|
||||
*
|
||||
|
@ -52,6 +51,7 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
* whole bulletin, but no longer the PDO.
|
||||
* Removed persistence annotations.
|
||||
* 12Oct2011 126 G. Hull use a surfaceObsLocation object for the lat/lon/stationId.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author F. J. Yen, SIB
|
||||
|
@ -60,8 +60,6 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
|
||||
public class NcPafmBulletin {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** Report type */
|
||||
private String reportType;
|
||||
|
||||
|
@ -150,8 +148,8 @@ public class NcPafmBulletin {
|
|||
// npr.setLat(fips.getLat());
|
||||
// npr.setLon(fips.getLon());
|
||||
|
||||
loc.setLatitude( fips.getLat().doubleValue() );
|
||||
loc.setLongitude( fips.getLon().doubleValue() );
|
||||
loc.setLatitude(fips.getLat().floatValue());
|
||||
loc.setLongitude(fips.getLon().floatValue());
|
||||
loc.setElevation( fips.getElev().intValue() );
|
||||
npr.setLocation( loc );
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import com.raytheon.uf.common.pointdata.PointDataDescription;
|
|||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
|
||||
/**
|
||||
* Provides a transform from NcScdRecords to PointDataContainer and vice versa.
|
||||
|
@ -33,6 +33,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
* Sep 08, 2011 294 G. Hull Use SurfaceObsLocation to set lat/lon
|
||||
* Sep 13, 2011 457 S. Gurung Renamed H5 to Nc and h5 to nc
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -209,15 +210,15 @@ public class NcScdPointDataTransform {
|
|||
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation(
|
||||
pdv.getString(STATION_NAME));
|
||||
Double lat = pdv.getNumber(LATITUDE).doubleValue();
|
||||
Double lon = pdv.getNumber(LONGITUDE).doubleValue();
|
||||
float lat = pdv.getNumber(LATITUDE).floatValue();
|
||||
float lon = pdv.getNumber(LONGITUDE).floatValue();
|
||||
loc.assignLocation(lat, lon);
|
||||
loc.setElevation(pdv.getNumber(ELEVATION).intValue());
|
||||
|
||||
long tmptime = pdv.getNumber(ISSUE_TIME).longValue();
|
||||
nar.setIssueTime(TimeTools.newCalendar(tmptime));
|
||||
nar.setIssueTime(TimeUtil.newGmtCalendar(new Date(tmptime)));
|
||||
tmptime = pdv.getNumber(OBS_TIME).longValue();
|
||||
nar.setObsTime(TimeTools.newCalendar(tmptime));
|
||||
nar.setObsTime(TimeUtil.newGmtCalendar(new Date(tmptime)));
|
||||
|
||||
nar.setTDXC(pdv.getNumber(TDXC).floatValue());
|
||||
nar.setTDNC(pdv.getNumber(TDNC).floatValue());
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* 10/26/2011 S. Gurung Added probable parameters (for TEMPO/PROB)
|
||||
* 11/03/2011 S. Gurung Added additional parameters and renamed some parameters
|
||||
* 11/07/2011 S. Gurung Added LOW_LEVEL_WIND_SHEAR
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -24,6 +25,13 @@
|
|||
|
||||
package gov.noaa.nws.ncep.common.dataplugin.nctaf.dao;
|
||||
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafIcingLayer;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafRecord;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafSkyCover;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafTemperatureForecast;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafTurbulenceLayer;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafWeatherCondition;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -35,14 +43,6 @@ import org.apache.commons.logging.LogFactory;
|
|||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafIcingLayer;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafRecord;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafSkyCover;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafTemperatureForecast;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafTurbulenceLayer;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.nctaf.NcTafWeatherCondition;
|
||||
|
||||
public class NcTafToRecord {
|
||||
|
||||
|
@ -181,8 +181,8 @@ public class NcTafToRecord {
|
|||
record.setStationId(pdv.getString("STID"));
|
||||
|
||||
SurfaceObsLocation loc = new SurfaceObsLocation(pdv.getString("STID"));
|
||||
Double lat = pdv.getNumber(LATITUDE).doubleValue();
|
||||
Double lon = pdv.getNumber(LONGITUDE).doubleValue();
|
||||
float lat = pdv.getNumber(LATITUDE).floatValue();
|
||||
float lon = pdv.getNumber(LONGITUDE).floatValue();
|
||||
loc.assignLocation(lat, lon);
|
||||
loc.setElevation(pdv.getNumber(ELEVATION).intValue());
|
||||
record.setLocation(loc);
|
||||
|
@ -234,18 +234,15 @@ public class NcTafToRecord {
|
|||
record.setSequenceId(pdv.getInt("SEQID"));
|
||||
|
||||
if (parameters.contains("END_DATE")) {
|
||||
long vt = pdv.getNumber("END_DATE").longValue();
|
||||
record.setEndDate(TimeTools.newCalendar(vt));
|
||||
record.setEndDate(pdv.getCalendar("END_DATE"));
|
||||
}
|
||||
|
||||
if (parameters.contains("START_DATE")) {
|
||||
long vt = pdv.getNumber("START_DATE").longValue();
|
||||
record.setStartDate(TimeTools.newCalendar(vt));
|
||||
record.setStartDate(pdv.getCalendar("START_DATE"));
|
||||
}
|
||||
|
||||
if (parameters.contains("TRANS_END_DATE")) {
|
||||
long vt = pdv.getNumber("TRANS_END_DATE").longValue();
|
||||
record.setTransitionEndDate(TimeTools.newCalendar(vt));
|
||||
record.setTransitionEndDate(pdv.getCalendar("TRANS_END_DATE"));
|
||||
}
|
||||
|
||||
if (parameters.contains("VISIBILITY"))
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* 09/2011 457 S. Gurung Renamed H5 to Nc and h5 to nc
|
||||
* 10/2011 S. Gurung Added changes related to getting stid/lat/lon/elev
|
||||
* from database instead of snstns.xml file
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -24,6 +25,12 @@
|
|||
|
||||
package gov.noaa.nws.ncep.common.dataplugin.ncuair.dao;
|
||||
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairLiftedIndex;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairMaxWind;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairObsLevels;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairRecord;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairTropopause;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -34,13 +41,6 @@ import org.apache.commons.logging.LogFactory;
|
|||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairLiftedIndex;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairMaxWind;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairObsLevels;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairTropopause;
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairRecord;
|
||||
|
||||
public class NcUairToRecord {
|
||||
|
||||
|
@ -176,16 +176,13 @@ public class NcUairToRecord {
|
|||
record.setUTC(pdv.getInt("UTC"));
|
||||
}
|
||||
if (parameters.contains("OBSTIME")) {
|
||||
long vt = pdv.getNumber("OBSTIME").longValue();
|
||||
record.setObsTime(TimeTools.newCalendar(vt));
|
||||
record.setObsTime(pdv.getCalendar("OBSTIME"));
|
||||
}
|
||||
if (parameters.contains("ISSUETIME")) {
|
||||
long vt = pdv.getNumber("ISSUETIME").longValue();
|
||||
record.setIssueTime(TimeTools.newCalendar(vt));
|
||||
record.setIssueTime(pdv.getCalendar("ISSUETIME"));
|
||||
}
|
||||
if (parameters.contains("SYNOPTIME")) {
|
||||
long vt = pdv.getNumber("SYNOPTIME").longValue();
|
||||
record.setSynopticTime(TimeTools.newCalendar(vt));
|
||||
record.setSynopticTime(pdv.getCalendar("SYNOPTIME"));
|
||||
}
|
||||
if (parameters.contains("WMOHEADER"))
|
||||
record.setWmoHeader(pdv.getString("WMOHEADER"));
|
||||
|
@ -201,8 +198,8 @@ public class NcUairToRecord {
|
|||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
int elev = pdv.getNumber("ELEVATION").intValue();
|
||||
location.setElevation(elev);
|
||||
double lat = pdv.getNumber("LATITUDE").doubleValue();
|
||||
double lon = pdv.getNumber("LONGITUDE").doubleValue();
|
||||
float lat = pdv.getNumber("LATITUDE").floatValue();
|
||||
float lon = pdv.getNumber("LONGITUDE").floatValue();
|
||||
location.assignLocation(lat, lon);
|
||||
String sta = pdv.getString("STATIONID");
|
||||
location.setStationId(sta);
|
||||
|
@ -210,6 +207,7 @@ public class NcUairToRecord {
|
|||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
private static NcUairRecord getTTAA(PointDataView pdv, NcUairRecord record) {
|
||||
NcUairObsLevels obslevels;
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Sep 05, 2013 2316 bsteffen Unify airep and ncairep.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed PLUGIN_NAME
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author F. J. Yen
|
||||
|
@ -143,8 +144,8 @@ public class AirepDecoder extends AbstractDecoder {
|
|||
record.setReportData(parser.getReportData());
|
||||
location.setStationId(parser.getAircraftId());
|
||||
record.setReportType(parser.getReportType());
|
||||
location.setLatitude(parser.getLatitude());
|
||||
location.setLongitude(parser.getLongitude());
|
||||
location.setLatitude(parser.getLatitude().floatValue());
|
||||
location.setLongitude(parser.getLongitude().floatValue());
|
||||
location.setFlightLevel(parser.getFlightLevel());
|
||||
location.setLocation(parser.getLatitude(),
|
||||
parser.getLongitude());
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
* Changed type of suspectTimeFlag from Boolean to
|
||||
* String since undefined in PointDataDescription.
|
||||
* 09/2011 457 S. Gurung Renamed H5 to Nc and h5 to nc
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author T. Lee
|
||||
|
@ -25,6 +26,10 @@
|
|||
*/
|
||||
package gov.noaa.nws.ncep.edex.plugin.ncscd.util;
|
||||
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncscd.NcScdRecord;
|
||||
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
|
||||
import gov.noaa.nws.ncep.edex.util.UtilN;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
@ -32,13 +37,9 @@ import java.util.regex.Pattern;
|
|||
import com.raytheon.uf.common.pointdata.spatial.ObStation;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
||||
|
||||
import gov.noaa.nws.ncep.common.dataplugin.ncscd.NcScdRecord;
|
||||
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
|
||||
import gov.noaa.nws.ncep.edex.util.UtilN;
|
||||
|
||||
public class NcScdParser {
|
||||
|
||||
/**
|
||||
|
@ -96,8 +97,8 @@ public class NcScdParser {
|
|||
|
||||
if (station != null) {
|
||||
SurfaceObsLocation obsLoc = new SurfaceObsLocation(icao);
|
||||
Double lat = station.getGeometry().getY();
|
||||
Double lon = station.getGeometry().getX();
|
||||
float lat = (float) station.getGeometry().getY();
|
||||
float lon = (float) station.getGeometry().getX();
|
||||
obsLoc.assignLocation(lat, lon);
|
||||
obsLoc.setElevation(station.getElevation());
|
||||
|
||||
|
@ -136,7 +137,7 @@ public class NcScdParser {
|
|||
* i.e., obs time = 240245.
|
||||
*/
|
||||
Calendar issue = record.getIssueTime();
|
||||
Calendar obs = TimeTools.copy(issue);
|
||||
Calendar obs = TimeUtil.newCalendar(issue);
|
||||
int indx;
|
||||
if ( !Character.isDigit(xxx[2].charAt(0)) ) {
|
||||
indx = 3;
|
||||
|
|
|
@ -39,7 +39,6 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.wmo.WMOHeader;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
||||
|
||||
/**
|
||||
|
@ -57,6 +56,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
* 10/19/2011 sgurung Modified parseHeader() to use REPORT_HEADER30
|
||||
* 10/26/2011 sgurung Set tafValidPeriod for each record
|
||||
* May 14, 2014 2536 bclement removed TimeTools usage
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -157,9 +157,9 @@ public class NcTafParser {
|
|||
int currGroup = 0;
|
||||
for (String grp : tafGroups) {
|
||||
|
||||
Calendar cStart = TimeTools.copy(validPeriod
|
||||
Calendar cStart = TimeUtil.newCalendar(validPeriod
|
||||
.getStartDate());
|
||||
Calendar cStop = TimeTools.copy(validPeriod
|
||||
Calendar cStop = TimeUtil.newCalendar(validPeriod
|
||||
.getEndDate());
|
||||
|
||||
NcTafPeriod tPeriod = new NcTafPeriod(cStart, cStop);
|
||||
|
@ -199,11 +199,11 @@ public class NcTafParser {
|
|||
period1 = group1.getTafChangePeriod();
|
||||
period2 = group2.getTafChangePeriod();
|
||||
|
||||
period1.setEndDate(TimeTools.copy(period2
|
||||
period1.setEndDate(TimeUtil.newCalendar(period2
|
||||
.getStartDate()));
|
||||
|
||||
}
|
||||
period2.setEndDate(TimeTools.copy(validPeriod
|
||||
period2.setEndDate(TimeUtil.newCalendar(validPeriod
|
||||
.getEndDate()));
|
||||
}
|
||||
record.setChangeGroups(groupSet);
|
||||
|
@ -233,8 +233,8 @@ public class NcTafParser {
|
|||
ObStation station = getStationInfo(record.getStationId());
|
||||
if (station != null) {
|
||||
SurfaceObsLocation obsLoc = new SurfaceObsLocation(record.getStationId());
|
||||
Double lat = station.getGeometry().getY();
|
||||
Double lon = station.getGeometry().getX();
|
||||
float lat = (float) station.getGeometry().getY();
|
||||
float lon = (float) station.getGeometry().getX();
|
||||
obsLoc.assignLocation(lat, lon);
|
||||
obsLoc.setElevation(station.getElevation());
|
||||
record.setLocation(obsLoc);
|
||||
|
|
|
@ -16,7 +16,6 @@ import com.raytheon.edex.esb.Headers;
|
|||
import com.raytheon.edex.exception.DecoderException;
|
||||
import com.raytheon.edex.plugin.AbstractDecoder;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.pointdata.spatial.ObStation;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
|
@ -48,6 +47,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
* 11/2011 Q. Zhou Handle multi-record for stationId, eliminate
|
||||
* number-id if there is a non-number-id.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* This code has been developed by the SIB for use in the AWIPS2 system.
|
||||
|
@ -120,7 +120,7 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
Boolean ship = false;
|
||||
Boolean drop = false;
|
||||
System.out.println("Nc uair decode entered, data size= " + data.length);
|
||||
long curTime = System.currentTimeMillis();
|
||||
// long curTime = System.currentTimeMillis();
|
||||
if (headers != null) {
|
||||
/*
|
||||
* traceId equals to the file name
|
||||
|
@ -196,8 +196,8 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
SurfaceObsLocation obsLoc = new SurfaceObsLocation(
|
||||
station.getStationId());
|
||||
if (station.getGeometry() != null) {
|
||||
Double lat = station.getGeometry().getY();
|
||||
Double lon = station.getGeometry().getX();
|
||||
float lat = (float) station.getGeometry().getY();
|
||||
float lon = (float) station.getGeometry().getX();
|
||||
obsLoc.assignLocation(lat, lon);
|
||||
Integer elev = station.getElevation();
|
||||
if (elev == null) {
|
||||
|
@ -206,8 +206,8 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
obsLoc.setElevation(elev);
|
||||
record.setLocation(obsLoc);
|
||||
} else if (station.getUpperAirGeometry() != null) {
|
||||
Double lat = station.getUpperAirGeometry().getY();
|
||||
Double lon = station.getUpperAirGeometry().getX();
|
||||
float lat = (float) station.getUpperAirGeometry().getY();
|
||||
float lon = (float) station.getUpperAirGeometry().getX();
|
||||
obsLoc.assignLocation(lat, lon);
|
||||
Integer elev = station.getUpperAirElevation();
|
||||
if (elev == null) {
|
||||
|
@ -316,15 +316,10 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
* Return the UairRecord record object.
|
||||
*/
|
||||
if (record != null) {
|
||||
try {
|
||||
if (headers != null) {
|
||||
traceId = (String) headers.get("traceId");
|
||||
}
|
||||
record.setTraceId(traceId);
|
||||
record.constructDataURI();
|
||||
} catch (PluginException e) {
|
||||
throw new DecoderException("Unable to construct dataURI", e);
|
||||
if (headers != null) {
|
||||
traceId = (String) headers.get("traceId");
|
||||
}
|
||||
record.setTraceId(traceId);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -333,8 +328,8 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
if (record == null) {
|
||||
return new PluginDataObject[0];
|
||||
}
|
||||
long enqueueTime = System.currentTimeMillis();
|
||||
double latency = (enqueueTime - curTime);
|
||||
// long enqueueTime = System.currentTimeMillis();
|
||||
// double latency = (enqueueTime - curTime);
|
||||
// System.out.println("Nc uair decode spend "+ latency);
|
||||
return new PluginDataObject[] { record };
|
||||
}
|
||||
|
@ -362,10 +357,8 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
*/
|
||||
NcUairSeparator sep = NcUairSeparator.separate(data, headers);
|
||||
|
||||
int i = 0;
|
||||
while (sep.hasNext()) {
|
||||
nil = false;
|
||||
i++;
|
||||
messageData = sep.next();
|
||||
// System.out.println("New message # "+ i);
|
||||
|
||||
|
@ -429,8 +422,8 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
SurfaceObsLocation obsLoc = new SurfaceObsLocation(
|
||||
station.getStationId());
|
||||
if (station.getGeometry() != null) {
|
||||
Double lat = station.getGeometry().getY();
|
||||
Double lon = station.getGeometry().getX();
|
||||
float lat = (float) station.getGeometry().getY();
|
||||
float lon = (float) station.getGeometry().getX();
|
||||
obsLoc.assignLocation(lat, lon);
|
||||
Integer elev = station.getElevation();
|
||||
if (elev == null) {
|
||||
|
@ -439,8 +432,10 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
obsLoc.setElevation(elev);
|
||||
record.setLocation(obsLoc);
|
||||
} else if (station.getUpperAirGeometry() != null) {
|
||||
Double lat = station.getUpperAirGeometry().getY();
|
||||
Double lon = station.getUpperAirGeometry().getX();
|
||||
float lat = (float) station.getUpperAirGeometry()
|
||||
.getY();
|
||||
float lon = (float) station.getUpperAirGeometry()
|
||||
.getX();
|
||||
obsLoc.assignLocation(lat, lon);
|
||||
Integer elev = station.getUpperAirElevation();
|
||||
if (elev == null) {
|
||||
|
@ -550,8 +545,8 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
// set dataTime
|
||||
if (record != null) {
|
||||
if (obsTime != null) {
|
||||
if (Math.abs(obsTime.getTime().getDate()
|
||||
- issueTime.getTime().getDate()) >= 2) {
|
||||
if (Math.abs(obsTime.get(Calendar.DAY_OF_MONTH)
|
||||
- issueTime.get(Calendar.DAY_OF_MONTH)) >= 2) {
|
||||
// Chin, not a good record, should just skip it
|
||||
System.out.println("Nc uair record bad issue time "
|
||||
+ issueTime.getTime().toString() + " obs Time "
|
||||
|
@ -571,16 +566,11 @@ public class NcUairDecoder extends AbstractDecoder {
|
|||
* Return the UairRecord record object.
|
||||
*/
|
||||
if (record != null) {
|
||||
try {
|
||||
if (headers != null) {
|
||||
traceId = (String) headers.get("traceId");
|
||||
}
|
||||
record.setTraceId(traceId);
|
||||
record.constructDataURI();
|
||||
recordList.add(record);
|
||||
} catch (PluginException e) {
|
||||
throw new DecoderException("Unable to construct dataURI", e);
|
||||
if (headers != null) {
|
||||
traceId = (String) headers.get("traceId");
|
||||
}
|
||||
record.setTraceId(traceId);
|
||||
recordList.add(record);
|
||||
}
|
||||
|
||||
}// end while loop
|
||||
|
|
|
@ -50,6 +50,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
* Sep 26, 2011 286 qzhou Changed reportType from int to string
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Sep 05, 2013 2316 bsteffen Unify pirep and ncpirep.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* </pre>
|
||||
*
|
||||
* @author F. J. Yen
|
||||
|
@ -164,8 +165,8 @@ public class PirepDecoder extends AbstractDecoder {
|
|||
record.setObsText(DecoderTools.normalizeObs(
|
||||
parser.getReportData(), wmoHeader.getWmoHeader()));
|
||||
|
||||
location.setLatitude(p.getLatitude());
|
||||
location.setLongitude(p.getLongitude());
|
||||
location.setLatitude((float) p.getLatitude());
|
||||
location.setLongitude((float) p.getLongitude());
|
||||
location.setLocation(p.getLatitude(), p.getLongitude());
|
||||
location.setStationId(parser.getReportingStationId());
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* 10/20/2011 472 qzhou Added WX_COND_WORDS. Removed SKY_SKC, SKY_CLR and other _COND_WORDS
|
||||
* 11/01/2011 286 Q.Zhou Added month and year to decodetime
|
||||
* Sep 05, 2013 2316 bsteffen Unify pirep and ncpirep.
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -183,7 +184,8 @@ public class PirepParser {
|
|||
|
||||
private static final String ICE_REGEX = ICE_TURB_PREFIX + "((?: )(RIME|MXD|CLR))" + ICE_TURB_SUFFIX;//?
|
||||
|
||||
private static final String TRB_REGEX = ICE_TURB_PREFIX + "((?: )(CHOP|CAT))?" + ICE_TURB_SUFFIX;
|
||||
private static final String TRB_REGEX = ICE_TURB_PREFIX
|
||||
+ "((?: )(CHOP|CAT))?" + ICE_TURB_SUFFIX;
|
||||
|
||||
|
||||
// 3901N 08446W
|
||||
|
@ -712,9 +714,9 @@ public class PirepParser {
|
|||
LatLonPoint point2 = point1.positionOf(-bearing, dist);
|
||||
interLocation = point2;
|
||||
|
||||
location = new BasePoint(point2
|
||||
.getLatitude(LatLonPoint.INDEGREES), point2
|
||||
.getLongitude(LatLonPoint.INDEGREES));
|
||||
location = new BasePoint(
|
||||
point2.getLatitude(LatLonPoint.INDEGREES),
|
||||
point2.getLongitude(LatLonPoint.INDEGREES));
|
||||
|
||||
decodeStatus = true;
|
||||
} else {
|
||||
|
@ -851,7 +853,7 @@ public class PirepParser {
|
|||
}
|
||||
}
|
||||
if(lat != null && lon != null) {
|
||||
point = new BasePoint(lat,lon);
|
||||
point = new BasePoint(lat, lon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import com.raytheon.viz.pointdata.rsc.retrieve.AbstractDbPlotInfoRetriever;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 11/03/2011 sgurung Initial creation
|
||||
* 11/16/2011 sgurung Order columns by issue_time and sequenceId desc for correct time matching
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -69,8 +70,8 @@ public class TafPlotInfoRetriever extends AbstractDbPlotInfoRetriever {
|
|||
protected PlotInfo getPlotInfo(Object[] data) {
|
||||
PlotInfo stationInfo = new PlotInfo();
|
||||
stationInfo.dataURI = (String) data[0];
|
||||
stationInfo.latitude = (Double) data[1];
|
||||
stationInfo.longitude = (Double) data[2];
|
||||
stationInfo.latitude = ((Number) data[1]).doubleValue();
|
||||
stationInfo.longitude = ((Number) data[2]).doubleValue();
|
||||
stationInfo.stationId = (String) data[3];
|
||||
if (stationInfo.stationId == null) {
|
||||
stationInfo.stationId = "" + data[1] + "#" + data[2];
|
||||
|
|
Loading…
Add table
Reference in a new issue