diff --git a/cave/com.raytheon.uf.viz.coopprecip/src/com/raytheon/uf/viz/coopprecip/CoopPrecipPlotInfoRetriever.java b/cave/com.raytheon.uf.viz.coopprecip/src/com/raytheon/uf/viz/coopprecip/CoopPrecipPlotInfoRetriever.java index a85c3a10ae..ecac0be2a6 100644 --- a/cave/com.raytheon.uf.viz.coopprecip/src/com/raytheon/uf/viz/coopprecip/CoopPrecipPlotInfoRetriever.java +++ b/cave/com.raytheon.uf.viz.coopprecip/src/com/raytheon/uf/viz/coopprecip/CoopPrecipPlotInfoRetriever.java @@ -27,8 +27,8 @@ import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import com.raytheon.uf.common.inventory.exception.DataCubeException; import com.raytheon.uf.common.dataquery.requests.RequestConstraint; +import com.raytheon.uf.common.inventory.exception.DataCubeException; import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.time.DataTime; @@ -50,6 +50,7 @@ import com.raytheon.viz.pointdata.rsc.retrieve.AbstractPlotInfoRetriever; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Oct 9, 2009 bsteffen Initial creation + * Aug 08, 2014 3477 bclement changed plot info locations to floats * * * @@ -75,9 +76,8 @@ public class CoopPrecipPlotInfoRetriever extends AbstractPlotInfoRetriever { for (int uriCounter = 0; uriCounter < pdc.getCurrentSz(); uriCounter++) { PointDataView pdv = pdc.readRandom(uriCounter); PlotInfo stationInfo = new PlotInfo(); - stationInfo.latitude = pdv.getNumber("latitude").doubleValue(); - stationInfo.longitude = pdv.getNumber("longitude") - .doubleValue(); + stationInfo.latitude = pdv.getNumber("latitude").floatValue(); + stationInfo.longitude = pdv.getNumber("longitude").floatValue(); stationInfo.dataTime = new DataTime(new Time( pdv.getLong("time"))); stationInfo.stationId = pdv.getString("stationId"); diff --git a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotAlertParser.java b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotAlertParser.java index adda90b106..5870c90f8b 100644 --- a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotAlertParser.java +++ b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotAlertParser.java @@ -38,6 +38,7 @@ import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData; * ------------ ---------- ----------- -------------------------- * Sep 15, 2009 mschenke Initial creation * Jul 23, 2014 3410 bclement location changed to floats + * Aug 08, 2014 3477 bclement changed plot info locations to floats * * * @@ -52,10 +53,10 @@ public class PlotAlertParser extends AbstractAlertMessageParser { AbstractRequestableResourceData resourceData) throws VizException { String stationId = (String) message.decodedAlert .get("location.stationId"); - Double lat = ((Number) message.decodedAlert.get("location.latitude")) - .doubleValue(); - Double lon = ((Number) message.decodedAlert.get("location.longitude")) - .doubleValue(); + Float lat = ((Number) message.decodedAlert.get("location.latitude")) + .floatValue(); + Float lon = ((Number) message.decodedAlert.get("location.longitude")) + .floatValue(); DataTime dataTime = (DataTime) message.decodedAlert.get("dataTime"); return new PlotInfo(stationId, lat, lon, dataTime, message.dataURI); diff --git a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotInfo.java b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotInfo.java index 196ec90e15..7c136fe311 100644 --- a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotInfo.java +++ b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotInfo.java @@ -30,6 +30,7 @@ import com.raytheon.uf.common.time.DataTime; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Sep 15, 2009 mschenke Initial creation + * Aug 08, 2014 3477 bclement changed plot info locations to floats * * * @@ -41,9 +42,9 @@ public class PlotInfo { public String stationId; - public Double latitude; + public Float latitude; - public Double longitude; + public Float longitude; public DataTime dataTime; @@ -66,8 +67,8 @@ public class PlotInfo { } - public PlotInfo(String stationId, Double latitude, - Double longitude, DataTime dataTime, String dataURI) { + public PlotInfo(String stationId, Float latitude, Float longitude, + DataTime dataTime, String dataURI) { this.stationId = stationId; this.latitude = latitude; this.longitude = longitude; diff --git a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/retrieve/FullDataPlotInfoRetriever.java b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/retrieve/FullDataPlotInfoRetriever.java index bec0ce0b51..2dc1cceaaa 100644 --- a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/retrieve/FullDataPlotInfoRetriever.java +++ b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/retrieve/FullDataPlotInfoRetriever.java @@ -15,8 +15,8 @@ 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.dataquery.requests.RequestConstraint; +import com.raytheon.uf.common.inventory.exception.DataCubeException; import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.status.IUFStatusHandler; @@ -40,6 +40,7 @@ import com.raytheon.viz.pointdata.PlotInfo; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jan 12, 2011 bsteffen Initial creation + * Aug 08, 2014 3477 bclement changed plot info locations to floats * * * @@ -121,8 +122,8 @@ public class FullDataPlotInfoRetriever extends AbstractPlotInfoRetriever { if (stationId != null) { info.stationId = pdv.getString(stationId); } - info.latitude = pdv.getNumber(latitude).doubleValue(); - info.longitude = pdv.getNumber(longitude).doubleValue(); + info.latitude = pdv.getNumber(latitude).floatValue(); + info.longitude = pdv.getNumber(longitude).floatValue(); info.dataURI = pdv.getString("dataURI"); Date vTime = new Date(pdv.getLong(validTime)); if (fcstTime != null) { diff --git a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/retrieve/PointDataPlotInfoRetriever.java b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/retrieve/PointDataPlotInfoRetriever.java index d9ddf4c8d5..7cd778357b 100644 --- a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/retrieve/PointDataPlotInfoRetriever.java +++ b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/retrieve/PointDataPlotInfoRetriever.java @@ -51,6 +51,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 + * Aug 08, 2014 3477 bclement changed plot info locations to floats * * * @@ -88,8 +89,8 @@ public class PointDataPlotInfoRetriever extends AbstractDbPlotInfoRetriever { @Override protected PlotInfo getPlotInfo(Object[] data) { PlotInfo stationInfo = new PlotInfo(); - stationInfo.latitude = ((Number) data[0]).doubleValue(); - stationInfo.longitude = ((Number) data[1]).doubleValue(); + stationInfo.latitude = ((Number) data[0]).floatValue(); + stationInfo.longitude = ((Number) data[1]).floatValue(); stationInfo.stationId = (String) data[2]; if (stationInfo.stationId == null) { stationInfo.stationId = "" + stationInfo.latitude + "#" diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/RadarPlotInfoRetriever.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/RadarPlotInfoRetriever.java index 69760501bb..4db296f92c 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/RadarPlotInfoRetriever.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/RadarPlotInfoRetriever.java @@ -37,6 +37,7 @@ import com.raytheon.viz.pointdata.rsc.retrieve.AbstractDbPlotInfoRetriever; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Oct 9, 2009 bsteffen Initial creation + * Aug 08, 2014 3477 bclement changed plot info locations to floats * * * @@ -58,8 +59,8 @@ public class RadarPlotInfoRetriever extends AbstractDbPlotInfoRetriever { @Override protected PlotInfo getPlotInfo(Object[] data) { PlotInfo stationInfo = new PlotInfo(); - stationInfo.latitude = ((Float) data[0]).doubleValue(); - stationInfo.longitude = ((Float) data[1]).doubleValue(); + stationInfo.latitude = ((Number) data[0]).floatValue(); + stationInfo.longitude = ((Number) data[1]).floatValue(); stationInfo.stationId = (String) data[2]; if (stationInfo.stationId == null) { stationInfo.stationId = "" + data[0] + "#" + data[1]; diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/plotModels/NcPlotImageCreator.java b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/plotModels/NcPlotImageCreator.java index 14e15a0f29..85f1740a92 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/plotModels/NcPlotImageCreator.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/plotModels/NcPlotImageCreator.java @@ -72,6 +72,7 @@ import com.vividsolutions.jts.geom.Coordinate; * ------------ ---------- ----------- -------------------------- * 05/20/2013 988 Archana.S Initial creation. * 02/26/2014 1061 B. Hebbard Relax tolerance for extent/zoom compare to avoid infinite loop. + * Aug 08, 2014 3477 bclement changed plot info locations to floats */ public class NcPlotImageCreator { @@ -892,7 +893,7 @@ public class NcPlotImageCreator { * @param lon * @return */ - private String createStationMapKey(Double lon, Double lat) { + private String createStationMapKey(Float lon, Float lat) { return new String("" + Math.round(lon * 1000.0) + "," + Math.round(lat * 1000.0)); diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/NcPlotResource2.java b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/NcPlotResource2.java index 2d44aaecc8..200dc17767 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/NcPlotResource2.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/NcPlotResource2.java @@ -130,6 +130,7 @@ import com.vividsolutions.jts.geom.Coordinate; * 05/20/2013 988 Archana.S Refactored this class for performance improvement * 11/07/2013 sgurung Added fix for "no data for every other frame" issue (earlier fix was added to 13.5.2 on 10/24/2013) * 03/18/2013 1064 B. Hebbard Added handling of matrixType request constraint, for PAFM + * Aug 08, 2014 3477 bclement changed plot info locations to floats * * * @author brockwoo @@ -264,8 +265,8 @@ public class NcPlotResource2 extends synchronized (stationList) { for (Station station : stationList) { String stnKey = getStationMapKey( - station.info.latitude.doubleValue(), - station.info.longitude.doubleValue()); + station.info.latitude, + station.info.longitude); if (trialKey == null) trialKey = new String(stnKey); @@ -519,10 +520,8 @@ public class NcPlotResource2 extends * stored in the database with missing/invalid lat/lon values */ - if (plotInfo.latitude.doubleValue() < -90 - || plotInfo.latitude.doubleValue() > 90 - || plotInfo.longitude.doubleValue() < -180 - || plotInfo.longitude.doubleValue() > 180) { + if (plotInfo.latitude < -90 || plotInfo.latitude > 90 + || plotInfo.longitude < -180 || plotInfo.longitude > 180) { return false; } @@ -547,8 +546,8 @@ public class NcPlotResource2 extends out.println("2 stations " + stn.info.stationId + " and " + plotInfo.stationId + " have the same location?" + "\nLat = " - + stn.info.latitude.doubleValue() + ",Lon = " - + stn.info.longitude.doubleValue() + + stn.info.latitude + ",Lon = " + + stn.info.longitude + " for the time: " + stn.info.dataTime); } // if these are the same time, should we check which one @@ -1612,8 +1611,8 @@ public class NcPlotResource2 extends fd.setOfStationsLastRendered.addAll(collectionOfStationsToBeRendered); for (Station stn : collectionOfStationsToBeRendered) { - String stnKey = getStationMapKey(stn.info.latitude.doubleValue(), - stn.info.longitude.doubleValue()); + String stnKey = getStationMapKey(stn.info.latitude, + stn.info.longitude); synchronized (fd.stationMap) { fd.stationMap.put(stnKey, stn); } @@ -1689,7 +1688,7 @@ public class NcPlotResource2 extends // generate a string used as the key for the StationMap - private String getStationMapKey(Double lat, Double lon) { + private String getStationMapKey(Float lat, Float lon) { return new String("" + Math.round(lat * 1000.0) + "," + Math.round(lon * 1000.0)); } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/PlotResource2.java b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/PlotResource2.java index fc4ce9e461..0e6bccf1f6 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/PlotResource2.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/PlotResource2.java @@ -20,11 +20,13 @@ package gov.noaa.nws.ncep.viz.rsc.plotdata.rsc; +import static java.lang.System.out; +import gov.noaa.nws.ncep.gempak.parameters.core.marshaller.garea.GraphicsAreaCoordinates; +import gov.noaa.nws.ncep.viz.common.preferences.GraphicsAreaPreferences; +import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsResource; import gov.noaa.nws.ncep.viz.resources.INatlCntrsResource; import gov.noaa.nws.ncep.viz.resources.manager.ResourceName; -import gov.noaa.nws.ncep.viz.common.preferences.GraphicsAreaPreferences; -import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; import gov.noaa.nws.ncep.viz.rsc.plotdata.plotModels.PlotModelGenerator2; import gov.noaa.nws.ncep.viz.rsc.plotdata.plotModels.StaticPlotInfoPV; import gov.noaa.nws.ncep.viz.rsc.plotdata.plotModels.StaticPlotInfoPV.SPIEntry; @@ -64,7 +66,6 @@ import com.raytheon.uf.viz.core.VizApp; import com.raytheon.uf.viz.core.drawables.IImage; import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.map.MapDescriptor; import com.raytheon.uf.viz.core.rsc.IResourceDataChanged; import com.raytheon.uf.viz.core.rsc.LoadProperties; import com.raytheon.viz.pointdata.IPlotModelGeneratorCaller; @@ -72,9 +73,7 @@ import com.raytheon.viz.pointdata.PlotAlertParser; import com.raytheon.viz.pointdata.PlotInfo; import com.raytheon.viz.pointdata.rsc.retrieve.PointDataPlotInfoRetriever; import com.vividsolutions.jts.geom.Coordinate; -import gov.noaa.nws.ncep.gempak.parameters.core.marshaller.garea.GraphicsAreaCoordinates; -import static java.lang.System.out; /** * Provides a resource that will display plot data for a given reference time. * @@ -118,6 +117,7 @@ import static java.lang.System.out; * (this fixes the issue of slow performance when zooming all the way in, when Data Area is set) * 11/04/2012 #944 ghull add query for Fcst Plot resources * Jun 25, 2013 1869 bsteffen Fix plot sampling. + * Aug 08, 2014 3477 bclement changed plot info locations to floats * * * @author brockwoo @@ -1090,7 +1090,7 @@ public class PlotResource2 extends AbstractNatlCntrsResource * @@ -70,8 +71,8 @@ public class TafPlotInfoRetriever extends AbstractDbPlotInfoRetriever { protected PlotInfo getPlotInfo(Object[] data) { PlotInfo stationInfo = new PlotInfo(); stationInfo.dataURI = (String) data[0]; - stationInfo.latitude = ((Number) data[1]).doubleValue(); - stationInfo.longitude = ((Number) data[2]).doubleValue(); + stationInfo.latitude = ((Number) data[1]).floatValue(); + stationInfo.longitude = ((Number) data[2]).floatValue(); stationInfo.stationId = (String) data[3]; if (stationInfo.stationId == null) { stationInfo.stationId = "" + data[1] + "#" + data[2];