diff --git a/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/capabilityInterfaces/IRangeableResource.java b/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/capabilityInterfaces/IRangeableResource.java index b2e7369590..07065414d7 100644 --- a/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/capabilityInterfaces/IRangeableResource.java +++ b/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/capabilityInterfaces/IRangeableResource.java @@ -19,28 +19,34 @@ **/ package com.raytheon.viz.awipstools.capabilityInterfaces; -import com.raytheon.uf.common.dataplugin.IDecoderGettable.Amount; +import javax.measure.Measure; +import javax.measure.quantity.Length; + +import com.raytheon.uf.viz.core.rsc.AbstractVizResource; +import com.raytheon.viz.awipstools.ui.layer.RangeRingsOverlayLayer; import com.vividsolutions.jts.geom.Coordinate; /** - * TODO Add Description + * Interface for {@link AbstractVizResource}s that are able to provide + * information that can be used to draw range rings. * *
* * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Jun 11, 2014 2061 bsteffen Switch from Amount to Measure. * ** * @author bgonzale * @version 1.0 + * @see RangeRingsOverlayLayer */ public interface IRangeableResource { - public Amount getElevation(); + public Measure, Length> getElevation(); public Coordinate getCenter(); diff --git a/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/ui/layer/RangeRingsOverlayLayer.java b/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/ui/layer/RangeRingsOverlayLayer.java index 0c49f74659..43d4f967f4 100644 --- a/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/ui/layer/RangeRingsOverlayLayer.java +++ b/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/ui/layer/RangeRingsOverlayLayer.java @@ -54,12 +54,15 @@ import com.vividsolutions.jts.geom.Envelope; *
* * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 12-03-09 #3698 bgonzale Range rings overlay with labels - * for radius in km and miles and - * labels for elevation in ftMSL and - * kmAgl. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Dec 03, 2009 3698 bgonzale Range rings overlay with labels + * for radius in km and miles and + * labels for elevation in ftMSL and + * kmAgl. + * Jun 11, 2014 2061 bsteffen Switch IRangeableResource to return + * Measure. + * * * *@@ -139,8 +142,7 @@ public class RangeRingsOverlayLayer implements IRenderable { this.rangedResource = rangedResource; this.center = this.rangedResource.getCenter(); this.resourceSourceElevationInMeters = this.rangedResource - .getElevation().getUnit().getConverterTo(SI.METER) - .convert(this.rangedResource.getElevation().doubleValue()); + .getElevation().doubleValue(SI.METER); this.gc.setStartingGeographicPoint(this.center.x, this.center.y); updateTilt(); } @@ -151,15 +153,16 @@ public class RangeRingsOverlayLayer implements IRenderable { * @seecom.raytheon.viz.core.rsc.IVizResource#paint(com.raytheon.viz.core. * IGraphicsTarget, com.raytheon.viz.core.PixelExtent, double, float) */ + @Override public void paint(IGraphicsTarget target, PaintProperties paintProps) throws VizException { // calculate ring spacing to use, in miles - float zoomLevel = (float) paintProps.getZoomLevel(); + float zoomLevel = paintProps.getZoomLevel(); IExtent pixelExtent = paintProps.getView().getExtent(); float metersZoomConstant = 500000; int mapWidth = descriptor.getMapWidth(); - float dataZoom = (float) ((mapWidth * zoomLevel) / metersZoomConstant); + float dataZoom = (mapWidth * zoomLevel) / metersZoomConstant; double dRing = getStandardRadius(dataZoom); IWireframeShape shape = getRangeRingsWireframe(dRing, pixelExtent, diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/AbstractRadarResource.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/AbstractRadarResource.java index bcb2df5310..92f68c3904 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/AbstractRadarResource.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/AbstractRadarResource.java @@ -27,13 +27,10 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.measure.unit.NonSI; - import org.opengis.referencing.FactoryException; import org.opengis.referencing.operation.TransformException; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; -import com.raytheon.uf.common.dataplugin.IDecoderGettable.Amount; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.radar.RadarRecord; import com.raytheon.uf.common.dataplugin.radar.util.RadarInfoDict; @@ -63,7 +60,6 @@ import com.raytheon.uf.viz.d2d.core.sampling.ID2DSamplingResource; import com.raytheon.uf.viz.d2d.core.time.D2DTimeMatcher; import com.raytheon.uf.viz.d2d.core.time.ID2DTimeMatchingExtension; import com.raytheon.uf.viz.d2d.core.time.TimeMatcher; -import com.raytheon.viz.awipstools.capabilityInterfaces.IRangeableResource; import com.raytheon.viz.radar.DefaultVizRadarRecord; import com.raytheon.viz.radar.VizRadarRecord; import com.raytheon.viz.radar.interrogators.IRadarInterrogator; @@ -79,12 +75,13 @@ import com.vividsolutions.jts.geom.Coordinate; *
* * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Aug 03, 2010 mnash Initial creation - * MAR 05, 2013 15313 kshresth Added sampling for DMD - * Apr 11, 2013 DR 16030 D. Friedman Fix NPE. - * May 5, 2014 DR 17201 D. Friedman Enable same-radar time matching. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Aug 03, 2010 mnash Initial creation + * MAR 05, 2013 15313 kshresth Added sampling for DMD + * Apr 11, 2013 16030 D. Friedman Fix NPE. + * May 5, 2014 17201 D. Friedman Enable same-radar time matching. + * Jun 11, 2014 2061 bsteffen Move rangeable methods to radial resource * ** @@ -94,7 +91,7 @@ import com.vividsolutions.jts.geom.Coordinate; public class AbstractRadarResource
* * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Aug 4, 2010 mnash Initial creation + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Aug 04, 2010 mnash Initial creation + * Jun 11, 2014 2061 bsteffen Move rangeable capability to radial + * resource * ** @@ -345,9 +346,6 @@ public class RadarImageResource
* * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Jul 29, 2010 mnash Initial creation - * 05/02/2013 DR 14587 D. Friedman Implement IRadialVelocityToolSource - * Jul 31, 2013 2190 mschenke Convert interrogate string "msl" to Measure and - * put in as "height" + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Jul 29, 2010 mnash Initial creation + * May 02, 2013 14587 D. Friedman Implement IRadialVelocityToolSource + * Jul 31, 2013 2190 mschenke Convert interrogate string "msl" to + * Measure and put in as "height" + * Jun 11, 2014 2061 bsteffen Move rangeable methods here. + * ** * @author mnash @@ -74,7 +79,7 @@ import com.vividsolutions.jts.geom.Coordinate; */ public class RadarRadialResource extends RadarImageResource