Omaha #3072 Remove RadarRecord dependency for Radial Mesh.
Former-commit-id:5c4f89644c
[formerly 664ae8372cd7df344ae66dfec599646b31dbd27b] Former-commit-id:e244664b7d
This commit is contained in:
parent
ee3d343a64
commit
08fe257daa
20 changed files with 463 additions and 372 deletions
|
@ -1,8 +0,0 @@
|
||||||
#Thu Apr 12 17:10:20 CDT 2012
|
|
||||||
eclipse.preferences.version=1
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
|
@ -2,20 +2,14 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Radar Collaboration
|
Bundle-Name: Radar Collaboration
|
||||||
Bundle-SymbolicName: com.raytheon.uf.viz.collaboration.radar;singleton:=true
|
Bundle-SymbolicName: com.raytheon.uf.viz.collaboration.radar;singleton:=true
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.14.0.qualifier
|
||||||
Bundle-Activator: com.raytheon.uf.viz.collaboration.radar.Activator
|
|
||||||
Bundle-Vendor: RAYTHEON
|
Bundle-Vendor: RAYTHEON
|
||||||
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
|
||||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.common.dataplugin.radar;bundle-version="1.0.0",
|
|
||||||
com.raytheon.viz.radar;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.viz.remote.graphics;bundle-version="1.0.0",
|
|
||||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
|
||||||
org.geotools;bundle-version="2.6.4",
|
|
||||||
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.viz.collaboration.display;bundle-version="1.0.0",
|
|
||||||
com.raytheon.uf.viz.collaboration.comm;bundle-version="1.0.0",
|
|
||||||
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174"
|
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
|
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
|
||||||
|
Require-Bundle: com.raytheon.uf.viz.core;bundle-version="1.14",
|
||||||
|
com.raytheon.viz.radar;bundle-version="1.14",
|
||||||
|
com.raytheon.uf.viz.remote.graphics;bundle-version="1.14",
|
||||||
|
com.raytheon.uf.common.geospatial;bundle-version="1.14",
|
||||||
|
com.raytheon.uf.viz.collaboration.display;bundle-version="1.13",
|
||||||
|
com.raytheon.uf.viz.collaboration.comm;bundle-version="1.14"
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
package com.raytheon.uf.viz.collaboration.radar;
|
|
||||||
|
|
||||||
import org.osgi.framework.BundleActivator;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
public class Activator implements BundleActivator {
|
|
||||||
|
|
||||||
private static BundleContext context;
|
|
||||||
|
|
||||||
static BundleContext getContext() {
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void start(BundleContext bundleContext) throws Exception {
|
|
||||||
Activator.context = bundleContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void stop(BundleContext bundleContext) throws Exception {
|
|
||||||
Activator.context = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -21,11 +21,11 @@ package com.raytheon.uf.viz.collaboration.radar.mesh;
|
||||||
|
|
||||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
import com.raytheon.uf.viz.remote.graphics.events.AbstractDispatchingObjectEvent;
|
import com.raytheon.uf.viz.remote.graphics.events.AbstractDispatchingObjectEvent;
|
||||||
import com.raytheon.uf.viz.remote.graphics.events.ICreationEvent;
|
import com.raytheon.uf.viz.remote.graphics.events.ICreationEvent;
|
||||||
|
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension.RadialMeshData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event class used to specify the creation of a radar radial mesh
|
* Event class used to specify the creation of a radar radial mesh
|
||||||
|
@ -34,9 +34,11 @@ import com.raytheon.uf.viz.remote.graphics.events.ICreationEvent;
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- --------------------------
|
||||||
* Apr 16, 2012 mschenke Initial creation
|
* Apr 16, 2012 mschenke Initial creation
|
||||||
|
* Jun 24, 2014 3072 bsteffen Remove RadarRecord dependency for Radial
|
||||||
|
* Mesh
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -77,37 +79,29 @@ public class CreateRadarRadialMesh extends AbstractDispatchingObjectEvent
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private GeneralGridGeometry targetGeometry;
|
private GeneralGridGeometry targetGeometry;
|
||||||
|
|
||||||
/**
|
public RadialMeshData getMeshData() {
|
||||||
* @return the radarRecord
|
RadialMeshData radarRecord = new RadialMeshData();
|
||||||
*/
|
|
||||||
public RadarRecord getRadarRecord() {
|
|
||||||
RadarRecord radarRecord = new RadarRecord();
|
|
||||||
radarRecord.setAngleData(angleData);
|
radarRecord.setAngleData(angleData);
|
||||||
radarRecord.setFormat(format);
|
radarRecord.setBinWidth(gateResolution);
|
||||||
radarRecord.setGateResolution(gateResolution);
|
radarRecord.setFirstBin(jstart);
|
||||||
radarRecord.setJstart(jstart);
|
|
||||||
radarRecord.setLatitude(latitude);
|
radarRecord.setLatitude(latitude);
|
||||||
radarRecord.setLongitude(longitude);
|
radarRecord.setLongitude(longitude);
|
||||||
radarRecord.setNumBins(numBins);
|
radarRecord.setNumBins(numBins);
|
||||||
radarRecord.setNumRadials(numRadials);
|
radarRecord.setNumRadials(numRadials);
|
||||||
radarRecord.setTrueElevationAngle(trueElevationAngle);
|
radarRecord.setTiltAngle(trueElevationAngle);
|
||||||
return radarRecord;
|
return radarRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public void setMeshData(RadialMeshData radarRecord) {
|
||||||
* @param radarRecord
|
|
||||||
* the radarRecord to set
|
|
||||||
*/
|
|
||||||
public void setRadarRecord(RadarRecord radarRecord) {
|
|
||||||
this.angleData = radarRecord.getAngleData();
|
this.angleData = radarRecord.getAngleData();
|
||||||
this.format = radarRecord.getFormat();
|
this.format = "Radial";
|
||||||
this.gateResolution = radarRecord.getGateResolution();
|
this.gateResolution = radarRecord.getBinWidth();
|
||||||
this.jstart = radarRecord.getJstart();
|
this.jstart = radarRecord.getFirstBin();
|
||||||
this.latitude = radarRecord.getLatitude();
|
this.latitude = radarRecord.getLatitude();
|
||||||
this.longitude = radarRecord.getLongitude();
|
this.longitude = radarRecord.getLongitude();
|
||||||
this.numBins = radarRecord.getNumBins();
|
this.numBins = radarRecord.getNumBins();
|
||||||
this.numRadials = radarRecord.getNumRadials();
|
this.numRadials = radarRecord.getNumRadials();
|
||||||
this.trueElevationAngle = radarRecord.getTrueElevationAngle();
|
this.trueElevationAngle = radarRecord.getTiltAngle();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.viz.collaboration.radar.mesh;
|
||||||
|
|
||||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
|
||||||
import com.raytheon.uf.viz.core.IMesh;
|
import com.raytheon.uf.viz.core.IMesh;
|
||||||
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
|
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
|
@ -38,9 +37,11 @@ import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- --------------------------
|
||||||
* Apr 13, 2012 mschenke Initial creation
|
* Apr 13, 2012 mschenke Initial creation
|
||||||
|
* Jun 24, 2014 3072 bsteffen Remove RadarRecord dependency for Radial
|
||||||
|
* Mesh
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,19 +58,19 @@ public class DispatchingRadarMeshExtension extends
|
||||||
*
|
*
|
||||||
* @see
|
* @see
|
||||||
* com.raytheon.viz.radar.rsc.image.IRadialMeshExtension#constructMesh(com
|
* com.raytheon.viz.radar.rsc.image.IRadialMeshExtension#constructMesh(com
|
||||||
* .raytheon.uf.common.dataplugin.radar.RadarRecord,
|
* .raytheon.viz.radar.rsc.image.IRadialMeshExtension.RadialMeshData,
|
||||||
* org.geotools.coverage.grid.GeneralGridGeometry)
|
* org.geotools.coverage.grid.GeneralGridGeometry)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IMesh constructMesh(RadarRecord radarData,
|
public IMesh constructMesh(RadialMeshData meshData,
|
||||||
GeneralGridGeometry targetGeometry) throws VizException {
|
GeneralGridGeometry targetGeometry) throws VizException {
|
||||||
DispatchingMesh wrapping = new DispatchingMesh(target
|
DispatchingMesh wrapping = new DispatchingMesh(target
|
||||||
.getWrappedObject().getExtension(IRadialMeshExtension.class)
|
.getWrappedObject().getExtension(IRadialMeshExtension.class)
|
||||||
.constructMesh(radarData, targetGeometry),
|
.constructMesh(meshData, targetGeometry),
|
||||||
target.getDispatcher());
|
target.getDispatcher());
|
||||||
CreateRadarRadialMesh create = RemoteGraphicsEventFactory.createEvent(
|
CreateRadarRadialMesh create = RemoteGraphicsEventFactory.createEvent(
|
||||||
CreateRadarRadialMesh.class, wrapping);
|
CreateRadarRadialMesh.class, wrapping);
|
||||||
create.setRadarRecord(radarData);
|
create.setMeshData(meshData);
|
||||||
create.setTargetGeometry(targetGeometry);
|
create.setTargetGeometry(targetGeometry);
|
||||||
target.dispatch(create);
|
target.dispatch(create);
|
||||||
return wrapping;
|
return wrapping;
|
||||||
|
|
|
@ -35,9 +35,11 @@ import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- --------------------------
|
||||||
* Apr 17, 2012 mschenke Initial creation
|
* Apr 17, 2012 mschenke Initial creation
|
||||||
|
* Jun 24, 2014 3072 bsteffen Remove RadarRecord dependency for Radial
|
||||||
|
* Mesh
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -56,7 +58,7 @@ public class RadarGraphicsExtRenderingHandler extends
|
||||||
dataManager.putRenderableObject(
|
dataManager.putRenderableObject(
|
||||||
meshId,
|
meshId,
|
||||||
target.getExtension(IRadialMeshExtension.class)
|
target.getExtension(IRadialMeshExtension.class)
|
||||||
.constructMesh(event.getRadarRecord(),
|
.constructMesh(event.getMeshData(),
|
||||||
event.getTargetGeometry()));
|
event.getTargetGeometry()));
|
||||||
} catch (VizException e) {
|
} catch (VizException e) {
|
||||||
Activator.statusHandler.handle(Priority.PROBLEM,
|
Activator.statusHandler.handle(Priority.PROBLEM,
|
||||||
|
|
|
@ -20,18 +20,14 @@
|
||||||
package com.raytheon.uf.viz.kml.export.graphics.ext.radar;
|
package com.raytheon.uf.viz.kml.export.graphics.ext.radar;
|
||||||
|
|
||||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||||
import org.geotools.coverage.grid.GridGeometry2D;
|
|
||||||
import org.opengis.referencing.FactoryException;
|
import org.opengis.referencing.FactoryException;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
|
||||||
import com.raytheon.uf.common.dataplugin.radar.projection.RadarProjectionFactory;
|
|
||||||
import com.raytheon.uf.viz.core.IMesh;
|
import com.raytheon.uf.viz.core.IMesh;
|
||||||
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
|
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.uf.viz.kml.export.graphics.KmlGraphicsTarget;
|
import com.raytheon.uf.viz.kml.export.graphics.KmlGraphicsTarget;
|
||||||
import com.raytheon.uf.viz.kml.export.graphics.ext.KmlMesh;
|
import com.raytheon.uf.viz.kml.export.graphics.ext.KmlMesh;
|
||||||
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a KMLMesh by constructing a RadialBinCRS based CrigGeometry object.
|
* Creates a KMLMesh by constructing a RadialBinCRS based CrigGeometry object.
|
||||||
|
@ -40,9 +36,11 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- --------------------------
|
||||||
* Jun 6, 2012 bsteffen Initial creation
|
* Jun 06, 2012 bsteffen Initial creation
|
||||||
|
* Jun 24, 2014 3072 bsteffen Remove RadarRecord dependency for Radial
|
||||||
|
* Mesh
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -58,21 +56,16 @@ public class KmlRadialMeshExtension extends
|
||||||
return Compatibilty.TARGET_COMPATIBLE;
|
return Compatibilty.TARGET_COMPATIBLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMesh constructMesh(RadarRecord record,
|
public IMesh constructMesh(RadialMeshData meshData,
|
||||||
GeneralGridGeometry targetGeometry) throws VizException {
|
GeneralGridGeometry targetGeometry) throws VizException {
|
||||||
GridGeometry2D imageGeometry;
|
|
||||||
try {
|
try {
|
||||||
imageGeometry = RadarProjectionFactory
|
return new KmlMesh(meshData.getGridGeometry());
|
||||||
.constructGridGeometry(new Coordinate(
|
|
||||||
record.getLongitude(), record.getLatitude()),
|
|
||||||
record.getAngleData(), record.getGateResolution(),
|
|
||||||
record.getTrueElevationAngle(),
|
|
||||||
record.getNumBins(), true);
|
|
||||||
} catch (FactoryException e) {
|
} catch (FactoryException e) {
|
||||||
throw new VizException(e);
|
throw new VizException(e);
|
||||||
}
|
}
|
||||||
return new KmlMesh(imageGeometry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#Tue May 25 15:06:45 CDT 2010
|
|
||||||
eclipse.preferences.version=1
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
|
@ -1,21 +1,12 @@
|
||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: RadarGL Plug-in
|
Bundle-Name: Radar GL Plug-in
|
||||||
Bundle-SymbolicName: com.raytheon.uf.viz.radar.gl;singleton:=true
|
Bundle-SymbolicName: com.raytheon.uf.viz.radar.gl;singleton:=true
|
||||||
Bundle-Version: 1.12.1174.qualifier
|
Bundle-Version: 1.14.0.qualifier
|
||||||
Bundle-Activator: com.raytheon.uf.viz.radar.gl.Activator
|
|
||||||
Bundle-Vendor: RAYTHEON
|
Bundle-Vendor: RAYTHEON
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
Require-Bundle: com.raytheon.viz.radar;bundle-version="1.14",
|
||||||
com.raytheon.viz.radar;bundle-version="1.11.31",
|
com.raytheon.viz.core.gl;bundle-version="1.14",
|
||||||
com.raytheon.viz.core.gl;bundle-version="1.11.31",
|
com.raytheon.uf.viz.core;bundle-version="1.14",
|
||||||
com.raytheon.uf.viz.core;bundle-version="1.12.2",
|
com.raytheon.uf.common.geospatial;bundle-version="1.14"
|
||||||
javax.media.opengl;bundle-version="1.1.0",
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||||
org.eclipse.ui,
|
|
||||||
com.raytheon.viz.core;bundle-version="1.12.2",
|
|
||||||
org.geotools;bundle-version="2.6.4",
|
|
||||||
javax.measure;bundle-version="1.0.0",
|
|
||||||
com.raytheon.uf.common.util;bundle-version="1.12.1112",
|
|
||||||
com.raytheon.uf.common.colormap;bundle-version="1.12.1120",
|
|
||||||
com.raytheon.uf.common.dataplugin.radar;bundle-version="1.0.0"
|
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
package com.raytheon.uf.viz.radar.gl;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.Plugin;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The activator class controls the plug-in life cycle
|
|
||||||
*/
|
|
||||||
public class Activator extends Plugin {
|
|
||||||
|
|
||||||
// The plug-in ID
|
|
||||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.radar.gl";
|
|
||||||
|
|
||||||
// The shared instance
|
|
||||||
private static Activator plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
*/
|
|
||||||
public Activator() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void start(BundleContext context) throws Exception {
|
|
||||||
super.start(context);
|
|
||||||
plugin = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void stop(BundleContext context) throws Exception {
|
|
||||||
plugin = null;
|
|
||||||
super.stop(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the shared instance
|
|
||||||
*
|
|
||||||
* @return the shared instance
|
|
||||||
*/
|
|
||||||
public static Activator getDefault() {
|
|
||||||
return plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.viz.radar.gl;
|
||||||
|
|
||||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
|
||||||
import com.raytheon.uf.viz.core.IMesh;
|
import com.raytheon.uf.viz.core.IMesh;
|
||||||
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
|
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
|
@ -34,9 +33,11 @@ import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- --------------------------
|
||||||
* Jun 19, 2010 mschenke Initial creation
|
* Jun 19, 2010 mschenke Initial creation
|
||||||
|
* Jun 24, 2014 3072 bsteffen Remove RadarRecord dependency for Radial
|
||||||
|
* Mesh
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -51,20 +52,14 @@ public class GLRadialMeshExtension extends GraphicsExtension<IGLTarget>
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @see
|
* @see
|
||||||
* com.raytheon.viz.radar.IRadarGraphicsFactoryAdapter#constructMesh(com
|
* com.raytheon.viz.radar.rsc.image.IRadialMeshExtension#constructMesh(com
|
||||||
* .raytheon.uf.viz.core.cache.CacheObject,
|
* .raytheon.viz.radar.rsc.image.IRadialMeshExtension.RadialMeshData,
|
||||||
* com.raytheon.uf.viz.core.drawables.IDescriptor)
|
* org.geotools.coverage.grid.GeneralGridGeometry)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IMesh constructMesh(RadarRecord radarData,
|
public IMesh constructMesh(RadialMeshData meshData,
|
||||||
GeneralGridGeometry targetGeometry) throws VizException {
|
GeneralGridGeometry targetGeometry) throws VizException {
|
||||||
String format = radarData.getFormat();
|
return RadarRadialMesh.getMesh(meshData, targetGeometry);
|
||||||
if ("Radial".equals(format)) {
|
|
||||||
return RadarRadialMesh.getMesh(radarData, targetGeometry);
|
|
||||||
} else {
|
|
||||||
throw new VizException(
|
|
||||||
"Cannot construct radial meshes for non radial RadarRecords");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.uf.viz.radar.gl;
|
package com.raytheon.uf.viz.radar.gl;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -27,17 +26,20 @@ import javax.media.opengl.GL;
|
||||||
|
|
||||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||||
import org.geotools.coverage.grid.GridGeometry2D;
|
import org.geotools.coverage.grid.GridGeometry2D;
|
||||||
|
import org.opengis.referencing.crs.ProjectedCRS;
|
||||||
import org.opengis.referencing.operation.MathTransform;
|
import org.opengis.referencing.operation.MathTransform;
|
||||||
import org.opengis.referencing.operation.TransformException;
|
import org.opengis.referencing.operation.TransformException;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
|
||||||
import com.raytheon.uf.common.dataplugin.radar.util.RadarUtil;
|
import com.raytheon.uf.common.dataplugin.radar.util.RadarUtil;
|
||||||
|
import com.raytheon.uf.common.geospatial.CRSCache;
|
||||||
|
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.viz.core.gl.AbstractGLMesh;
|
import com.raytheon.viz.core.gl.AbstractGLMesh;
|
||||||
import com.raytheon.viz.core.gl.SharedCoordMap.SharedCoordinateKey;
|
import com.raytheon.viz.core.gl.SharedCoordMap.SharedCoordinateKey;
|
||||||
|
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension.RadialMeshData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mesh for radar data. Uses GL_TRIANGLE_STRIPS. density is every 2^n-th bin,
|
* Mesh for radar data. Uses GL_TRIANGLE_STRIPS. density is every 2^n-th bin,
|
||||||
|
@ -45,10 +47,12 @@ import com.raytheon.viz.core.gl.SharedCoordMap.SharedCoordinateKey;
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
* * Date Ticket# Engineer Description
|
||||||
* SOFTWARE HISTORY Date Ticket# Engineer Description ------------ ----------
|
* ------------- -------- ----------- -------------- ------------
|
||||||
* ----------- -------------------------- Jun 10, 2010 mschenke Initial creation
|
* Jun 10, 2010 mschenke Initial creation
|
||||||
* OCT 09, 2012 15018 kshresth
|
* Oct 09, 2012 15018 kshresth
|
||||||
|
* Jun 24, 2014 3072 bsteffen Remove RadarRecord dependency for Radial
|
||||||
|
* Mesh
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author mschenke
|
* @author mschenke
|
||||||
|
@ -56,60 +60,28 @@ import com.raytheon.viz.core.gl.SharedCoordMap.SharedCoordinateKey;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class RadarRadialMesh extends AbstractGLMesh {
|
public class RadarRadialMesh extends AbstractGLMesh {
|
||||||
|
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||||
.getHandler(RadarRadialMesh.class);
|
.getHandler(RadarRadialMesh.class);
|
||||||
|
|
||||||
private static class CacheKey {
|
private static class CacheKey {
|
||||||
private final float latitude;
|
private final RadialMeshData data;
|
||||||
|
|
||||||
private final float longitude;
|
|
||||||
|
|
||||||
private final int hashCode;
|
|
||||||
|
|
||||||
private final int numBins;
|
|
||||||
|
|
||||||
private final int numRadials;
|
|
||||||
|
|
||||||
private final int gateResolution;
|
|
||||||
|
|
||||||
private final float trueElevationAngle;
|
|
||||||
|
|
||||||
private final int jStart;
|
|
||||||
|
|
||||||
private final float[] angleData;
|
|
||||||
|
|
||||||
private final GeneralGridGeometry gridGeometry;
|
private final GeneralGridGeometry gridGeometry;
|
||||||
|
|
||||||
public CacheKey(float latitude, float longitude, int numBins,
|
public CacheKey(RadialMeshData data, GeneralGridGeometry gridGeometry) {
|
||||||
int numRadials, int gateResolution, float trueElevationAngle,
|
this.data = data;
|
||||||
int jStart, float[] angleData, GeneralGridGeometry gridGeometry) {
|
|
||||||
this.latitude = latitude;
|
|
||||||
this.longitude = longitude;
|
|
||||||
this.numBins = numBins;
|
|
||||||
this.numRadials = numRadials;
|
|
||||||
this.gateResolution = gateResolution;
|
|
||||||
this.trueElevationAngle = trueElevationAngle;
|
|
||||||
this.jStart = jStart;
|
|
||||||
this.angleData = angleData;
|
|
||||||
this.gridGeometry = gridGeometry;
|
this.gridGeometry = gridGeometry;
|
||||||
final int prime = 31;
|
|
||||||
int hashCode = 1;
|
|
||||||
hashCode = prime * hashCode + Arrays.hashCode(angleData);
|
|
||||||
hashCode = prime * hashCode + gateResolution;
|
|
||||||
hashCode = prime * hashCode + jStart;
|
|
||||||
hashCode = prime * hashCode + Float.floatToIntBits(latitude);
|
|
||||||
hashCode = prime * hashCode + Float.floatToIntBits(longitude);
|
|
||||||
hashCode = prime * hashCode + numBins;
|
|
||||||
hashCode = prime * hashCode + numRadials;
|
|
||||||
hashCode = prime * hashCode
|
|
||||||
+ Float.floatToIntBits(trueElevationAngle);
|
|
||||||
hashCode = prime * hashCode + gridGeometry.hashCode();
|
|
||||||
this.hashCode = hashCode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return hashCode;
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((data == null) ? 0 : data.hashCode());
|
||||||
|
result = prime * result
|
||||||
|
+ ((gridGeometry == null) ? 0 : gridGeometry.hashCode());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -121,57 +93,42 @@ public class RadarRadialMesh extends AbstractGLMesh {
|
||||||
if (getClass() != obj.getClass())
|
if (getClass() != obj.getClass())
|
||||||
return false;
|
return false;
|
||||||
CacheKey other = (CacheKey) obj;
|
CacheKey other = (CacheKey) obj;
|
||||||
if (hashCode != other.hashCode)
|
if (data == null) {
|
||||||
|
if (other.data != null)
|
||||||
|
return false;
|
||||||
|
} else if (!data.equals(other.data))
|
||||||
return false;
|
return false;
|
||||||
if (gateResolution != other.gateResolution)
|
if (gridGeometry == null) {
|
||||||
|
if (other.gridGeometry != null)
|
||||||
|
return false;
|
||||||
|
} else if (!gridGeometry.equals(other.gridGeometry))
|
||||||
return false;
|
return false;
|
||||||
if (jStart != other.jStart)
|
|
||||||
return false;
|
|
||||||
if (latitude != other.latitude)
|
|
||||||
return false;
|
|
||||||
if (longitude != other.longitude)
|
|
||||||
return false;
|
|
||||||
if (numBins != other.numBins)
|
|
||||||
return false;
|
|
||||||
if (numRadials != other.numRadials)
|
|
||||||
return false;
|
|
||||||
if (Float.floatToIntBits(trueElevationAngle) != Float
|
|
||||||
.floatToIntBits(other.trueElevationAngle))
|
|
||||||
return false;
|
|
||||||
if (!Arrays.equals(angleData, other.angleData))
|
|
||||||
return false;
|
|
||||||
if (gridGeometry != null && other.gridGeometry == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (gridGeometry == null && other.gridGeometry != null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (gridGeometry != null
|
|
||||||
&& !gridGeometry.equals(other.gridGeometry)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Map<CacheKey, RadarRadialMesh> cache = new HashMap<CacheKey, RadarRadialMesh>();
|
private static Map<CacheKey, RadarRadialMesh> cache = new HashMap<CacheKey, RadarRadialMesh>();
|
||||||
|
|
||||||
/** The record to build the mesh for */
|
private RadialMeshData data;
|
||||||
private RadarRecord record;
|
|
||||||
|
|
||||||
private CacheKey cacheKey;
|
private CacheKey cacheKey;
|
||||||
|
|
||||||
public RadarRadialMesh(RadarRecord record,
|
public RadarRadialMesh(RadialMeshData data,
|
||||||
GeneralGridGeometry targetGeometry, CacheKey cacheKey)
|
GeneralGridGeometry targetGeometry, CacheKey cacheKey)
|
||||||
throws VizException {
|
throws VizException {
|
||||||
super(GL.GL_TRIANGLE_STRIP);
|
super(GL.GL_TRIANGLE_STRIP);
|
||||||
this.record = record;
|
this.data = data;
|
||||||
this.cacheKey = cacheKey;
|
this.cacheKey = cacheKey;
|
||||||
initialize(
|
ProjectedCRS crs = CRSCache.getInstance().constructStereographic(
|
||||||
RadarUtil.constructGridGeometry(record.getCRS(),
|
MapUtil.AWIPS_EARTH_RADIUS, MapUtil.AWIPS_EARTH_RADIUS,
|
||||||
RadarUtil.calculateExtent(record),
|
data.getLatitude(), data.getLongitude());
|
||||||
Math.max(record.getNumBins(), record.getNumRadials())),
|
GridGeometry2D gridGeometry = RadarUtil.constructGridGeometry(crs,
|
||||||
targetGeometry);
|
RadarUtil.calculateExtent(data.getNumBins(),
|
||||||
|
data.getFirstBin(), data.getBinWidth(),
|
||||||
|
(double) data.getTiltAngle(), "Radial"), Math.max(
|
||||||
|
data.getNumBins(), data.getNumRadials()));
|
||||||
|
initialize(gridGeometry, targetGeometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -185,7 +142,7 @@ public class RadarRadialMesh extends AbstractGLMesh {
|
||||||
float dX = (1.0f / (key.horizontalDivisions));
|
float dX = (1.0f / (key.horizontalDivisions));
|
||||||
|
|
||||||
// set up our angle data for the radials
|
// set up our angle data for the radials
|
||||||
float[] angles = record.getAngleData();
|
float[] angles = data.getAngleData();
|
||||||
int height = 2 * verticalDivisions;
|
int height = 2 * verticalDivisions;
|
||||||
int width = horizontalDivisions;
|
int width = horizontalDivisions;
|
||||||
|
|
||||||
|
@ -222,13 +179,13 @@ public class RadarRadialMesh extends AbstractGLMesh {
|
||||||
sinAngles[sinAngles.length - 1] = Math.sin(Math.toRadians(lastAngle));
|
sinAngles[sinAngles.length - 1] = Math.sin(Math.toRadians(lastAngle));
|
||||||
|
|
||||||
// precalculated bin value
|
// precalculated bin value
|
||||||
double calculatedVal = record.getNumBins() * record.getGateResolution()
|
double calculatedVal = data.getNumBins() * data.getBinWidth()
|
||||||
* Math.cos(Math.toRadians(record.getTrueElevationAngle()));
|
* Math.cos(Math.toRadians(data.getTiltAngle()));
|
||||||
|
|
||||||
double startRange = 0;
|
double startRange = 0;
|
||||||
if (record.getJstart() != null) {
|
if (data.getFirstBin() != 0) {
|
||||||
startRange = record.getJstart() * record.getGateResolution()
|
startRange = data.getFirstBin() * data.getFirstBin()
|
||||||
* Math.cos(Math.toRadians(record.getTrueElevationAngle()));
|
* Math.cos(Math.toRadians(data.getTiltAngle()));
|
||||||
}
|
}
|
||||||
|
|
||||||
double rangeHigh = startRange, rangeLow;
|
double rangeHigh = startRange, rangeLow;
|
||||||
|
@ -273,30 +230,27 @@ public class RadarRadialMesh extends AbstractGLMesh {
|
||||||
protected SharedCoordinateKey generateKey(GridGeometry2D imageGeometry,
|
protected SharedCoordinateKey generateKey(GridGeometry2D imageGeometry,
|
||||||
MathTransform mt) {
|
MathTransform mt) {
|
||||||
try {
|
try {
|
||||||
return new SharedCoordinateKey(record.getNumRadials(),
|
return new SharedCoordinateKey(data.getNumRadials(),
|
||||||
getNumVerticalDivisions(mt, record));
|
getNumVerticalDivisions(mt));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
statusHandler
|
statusHandler
|
||||||
.handle(Priority.PROBLEM,
|
.handle(Priority.PROBLEM,
|
||||||
"Error calculating divisions needed for radar, defaulting to 10",
|
"Error calculating divisions needed for radar, defaulting to 10",
|
||||||
e);
|
e);
|
||||||
return new SharedCoordinateKey(record.getNumRadials(), 10);
|
return new SharedCoordinateKey(data.getNumRadials(), 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final double THRESHOLD = 0.1;
|
private static final double THRESHOLD = 0.1;
|
||||||
|
|
||||||
private int getNumVerticalDivisions(MathTransform toLatLon,
|
private int getNumVerticalDivisions(MathTransform toLatLon)
|
||||||
RadarRecord record) throws Exception {
|
throws Exception {
|
||||||
float[] angles = record.getAngleData();
|
float[] angles = data.getAngleData();
|
||||||
int numBins = record.getNumBins();
|
int numBins = data.getNumBins();
|
||||||
int startBin = 0;
|
int startBin = data.getFirstBin();
|
||||||
if (record.getJstart() != null) {
|
|
||||||
startBin = record.getJstart();
|
|
||||||
}
|
|
||||||
|
|
||||||
double calculatedVal = record.getGateResolution()
|
double calculatedVal = data.getBinWidth()
|
||||||
* Math.cos(Math.toRadians(record.getTrueElevationAngle()));
|
* Math.cos(Math.toRadians(data.getTiltAngle()));
|
||||||
|
|
||||||
double[] in = new double[2];
|
double[] in = new double[2];
|
||||||
double[] out = new double[3];
|
double[] out = new double[3];
|
||||||
|
@ -396,33 +350,19 @@ public class RadarRadialMesh extends AbstractGLMesh {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RadarRadialMesh getMesh(RadarRecord radarData,
|
public static RadarRadialMesh getMesh(RadialMeshData data,
|
||||||
GeneralGridGeometry targetGeometry) throws VizException {
|
GeneralGridGeometry targetGeometry) throws VizException {
|
||||||
float latitude = radarData.getLatitude();
|
// check if numBins and numRadials equals to zero, then angleData does
|
||||||
float longitude = radarData.getLongitude();
|
// not exist
|
||||||
int numBins = radarData.getNumBins();
|
if (data.getNumBins() == 0 && data.getNumRadials() == 0) {
|
||||||
int numRadials = radarData.getNumRadials();
|
return null;
|
||||||
int gateResolution = radarData.getGateResolution();
|
|
||||||
float trueElevationAngle = radarData.getTrueElevationAngle();
|
|
||||||
Integer jStart = radarData.getJstart();
|
|
||||||
if (jStart == null) {
|
|
||||||
jStart = 0;
|
|
||||||
}
|
}
|
||||||
|
CacheKey key = new CacheKey(data, targetGeometry);
|
||||||
//check if numBins and numRadials equals to zero, then angleData does not exist
|
|
||||||
if (numBins == 0 && numRadials == 0 ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
float[] angleData = radarData.getAngleData();
|
|
||||||
CacheKey key = new CacheKey(latitude, longitude, numBins, numRadials,
|
|
||||||
gateResolution, trueElevationAngle, jStart, angleData,
|
|
||||||
targetGeometry);
|
|
||||||
synchronized (cache) {
|
synchronized (cache) {
|
||||||
RadarRadialMesh mesh = cache.get(key);
|
RadarRadialMesh mesh = cache.get(key);
|
||||||
if (mesh == null) {
|
if (mesh == null) {
|
||||||
// System.out.println("Mesh Cache miss");
|
// System.out.println("Mesh Cache miss");
|
||||||
mesh = new RadarRadialMesh(radarData, targetGeometry, key);
|
mesh = new RadarRadialMesh(data, targetGeometry, key);
|
||||||
cache.put(key, mesh);
|
cache.put(key, mesh);
|
||||||
} else {
|
} else {
|
||||||
mesh.use();
|
mesh.use();
|
||||||
|
@ -435,6 +375,6 @@ public class RadarRadialMesh extends AbstractGLMesh {
|
||||||
@Override
|
@Override
|
||||||
public RadarRadialMesh clone(GeneralGridGeometry targetGeometry)
|
public RadarRadialMesh clone(GeneralGridGeometry targetGeometry)
|
||||||
throws VizException {
|
throws VizException {
|
||||||
return getMesh(record, targetGeometry);
|
return getMesh(data, targetGeometry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#Thu Mar 26 11:01:38 CDT 2009
|
|
||||||
eclipse.preferences.version=1
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
|
@ -2,11 +2,11 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Radar Plug-in
|
Bundle-Name: Radar Plug-in
|
||||||
Bundle-SymbolicName: com.raytheon.viz.radar;singleton:=true
|
Bundle-SymbolicName: com.raytheon.viz.radar;singleton:=true
|
||||||
Bundle-Version: 1.12.1174.qualifier
|
Bundle-Version: 1.14.0.qualifier
|
||||||
Bundle-Activator: com.raytheon.viz.radar.Activator
|
Bundle-Activator: com.raytheon.viz.radar.Activator
|
||||||
Bundle-Vendor: Raytheon
|
Bundle-Vendor: Raytheon
|
||||||
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization, com.raytheon.uf.viz.core
|
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||||
Export-Package: com.raytheon.viz.radar,
|
Export-Package: com.raytheon.viz.radar,
|
||||||
com.raytheon.viz.radar.interrogators,
|
com.raytheon.viz.radar.interrogators,
|
||||||
com.raytheon.viz.radar.rsc,
|
com.raytheon.viz.radar.rsc,
|
||||||
|
@ -16,38 +16,35 @@ Export-Package: com.raytheon.viz.radar,
|
||||||
com.raytheon.viz.radar.ui,
|
com.raytheon.viz.radar.ui,
|
||||||
com.raytheon.viz.radar.ui.xy,
|
com.raytheon.viz.radar.ui.xy,
|
||||||
com.raytheon.viz.radar.util
|
com.raytheon.viz.radar.util
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
|
||||||
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
|
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
|
||||||
org.eclipse.ui;bundle-version="3.8.2",
|
com.raytheon.uf.common.units,
|
||||||
com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
|
com.raytheon.uf.common.colormap,
|
||||||
com.raytheon.uf.common.units;bundle-version="1.0.0",
|
com.raytheon.uf.common.geospatial;bundle-version="1.14",
|
||||||
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
|
com.raytheon.uf.common.util;bundle-version="1.14",
|
||||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
com.raytheon.uf.common.dataplugin,
|
||||||
com.raytheon.uf.common.util;bundle-version="1.12.1174",
|
com.raytheon.uf.common.dataplugin.radar;bundle-version="1.14";visibility:=reexport,
|
||||||
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
|
com.raytheon.uf.common.datastorage;bundle-version="1.14",
|
||||||
com.raytheon.uf.common.dataplugin.radar;bundle-version="1.0.0";visibility:=reexport,
|
com.raytheon.uf.common.pointdata;bundle-version="1.13",
|
||||||
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
|
com.raytheon.uf.common.dataplugin.level;bundle-version="1.14",
|
||||||
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174",
|
com.raytheon.uf.common.topo;bundle-version="1.14",
|
||||||
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.core;bundle-version="1.14",
|
||||||
com.raytheon.uf.common.topo;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.d2d.core,
|
||||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.d2d.ui,
|
||||||
com.raytheon.uf.viz.d2d.core;bundle-version="1.12.1174",
|
com.raytheon.viz.ui;bundle-version="1.14",
|
||||||
com.raytheon.uf.viz.d2d.ui;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.xy;bundle-version="1.14",
|
||||||
com.raytheon.viz.ui;bundle-version="1.12.1174",
|
com.raytheon.viz.pointdata;bundle-version="1.14",
|
||||||
com.raytheon.uf.viz.xy;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.productbrowser;bundle-version="1.14",
|
||||||
com.raytheon.viz.pointdata;bundle-version="1.12.1174",
|
com.raytheon.viz.core.graphing,
|
||||||
com.raytheon.uf.viz.productbrowser;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.points,
|
||||||
com.raytheon.viz.core.graphing;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.ui.menus,
|
||||||
com.raytheon.uf.viz.points;bundle-version="1.0.0",
|
com.raytheon.viz.awipstools,
|
||||||
com.raytheon.uf.viz.ui.menus;bundle-version="1.12.1174",
|
org.apache.batik;bundle-version="1.6",
|
||||||
com.raytheon.viz.awipstools;bundle-version="1.12.1174",
|
|
||||||
org.apache.batik;bundle-version="1.6.0",
|
|
||||||
com.raytheon.uf.common.wxmath,
|
com.raytheon.uf.common.wxmath,
|
||||||
com.raytheon.uf.common.style;bundle-version="1.0.0",
|
com.raytheon.uf.common.style,
|
||||||
com.raytheon.uf.common.derivparam;bundle-version="1.14.0",
|
com.raytheon.uf.common.derivparam;bundle-version="1.14",
|
||||||
com.raytheon.uf.viz.datacube;bundle-version="1.14.0"
|
com.raytheon.uf.viz.datacube;bundle-version="1.14",
|
||||||
Import-Package: com.raytheon.uf.common.comm,
|
com.raytheon.uf.common.inventory;bundle-version="1.14",
|
||||||
com.raytheon.uf.common.inventory.exception,
|
com.raytheon.uf.common.comm,
|
||||||
com.raytheon.viz.core.contours.util,
|
com.raytheon.viz.core.contours;bundle-version="1.14"
|
||||||
com.raytheon.viz.core.rsc,
|
Import-Package: com.raytheon.viz.core.rsc,
|
||||||
com.raytheon.viz.core.rsc.jts
|
com.raytheon.viz.core.rsc.jts
|
||||||
|
|
|
@ -148,4 +148,10 @@
|
||||||
value="Monospaced-regular-12">
|
value="Monospaced-regular-12">
|
||||||
</fontDefinition>
|
</fontDefinition>
|
||||||
</extension>
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="com.raytheon.uf.viz.core.graphicsExtension">
|
||||||
|
<graphicsExtension
|
||||||
|
class="com.raytheon.viz.radar.rsc.image.GeneralRadialMeshExtension">
|
||||||
|
</graphicsExtension>
|
||||||
|
</extension>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
/**
|
||||||
|
* This software was developed and / or modified by Raytheon Company,
|
||||||
|
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
|
*
|
||||||
|
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
|
* This software product contains export-restricted data whose
|
||||||
|
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
|
* to non-U.S. persons whether in the United States or abroad requires
|
||||||
|
* an export license or other authorization.
|
||||||
|
*
|
||||||
|
* Contractor Name: Raytheon Company
|
||||||
|
* Contractor Address: 6825 Pine Street, Suite 340
|
||||||
|
* Mail Stop B8
|
||||||
|
* Omaha, NE 68106
|
||||||
|
* 402.291.0100
|
||||||
|
*
|
||||||
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
|
* further licensing information.
|
||||||
|
**/
|
||||||
|
package com.raytheon.viz.radar.rsc.image;
|
||||||
|
|
||||||
|
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||||
|
import org.opengis.referencing.FactoryException;
|
||||||
|
|
||||||
|
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||||
|
import com.raytheon.uf.viz.core.IMesh;
|
||||||
|
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
|
||||||
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
|
import com.raytheon.uf.viz.core.map.IMapMeshExtension;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Default implementation of {@link IRadialMeshExtension} that just delegates to
|
||||||
|
* {@link IMapMeshExtension}.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------- -------- ----------- --------------------------
|
||||||
|
* Jun 24, 2014 3072 bsteffen Initial creation
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author bsteffen
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
public class GeneralRadialMeshExtension extends
|
||||||
|
GraphicsExtension<IGraphicsTarget> implements IRadialMeshExtension {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCompatibilityValue(IGraphicsTarget target) {
|
||||||
|
return Compatibilty.GENERIC;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IMesh constructMesh(RadialMeshData meshData,
|
||||||
|
GeneralGridGeometry targetGeometry) throws VizException {
|
||||||
|
try {
|
||||||
|
return target.getExtension(IMapMeshExtension.class).constructMesh(
|
||||||
|
meshData.getGridGeometry(), targetGeometry);
|
||||||
|
} catch (FactoryException e) {
|
||||||
|
throw new VizException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -19,12 +19,18 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.viz.radar.rsc.image;
|
package com.raytheon.viz.radar.rsc.image;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||||
|
import org.geotools.coverage.grid.GridGeometry2D;
|
||||||
|
import org.opengis.referencing.FactoryException;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
||||||
|
import com.raytheon.uf.common.dataplugin.radar.projection.RadarProjectionFactory;
|
||||||
import com.raytheon.uf.viz.core.IMesh;
|
import com.raytheon.uf.viz.core.IMesh;
|
||||||
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension.IGraphicsExtensionInterface;
|
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension.IGraphicsExtensionInterface;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for constructing radial meshes for radar records
|
* Interface for constructing radial meshes for radar records
|
||||||
|
@ -33,9 +39,11 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- --------------------------
|
||||||
* Nov 16, 2011 mschenke Initial creation
|
* Nov 16, 2011 mschenke Initial creation
|
||||||
|
* Jun 24, 2014 3072 bsteffen Remove RadarRecord dependency for Radial
|
||||||
|
* Mesh
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -46,14 +54,202 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
public interface IRadialMeshExtension extends IGraphicsExtensionInterface {
|
public interface IRadialMeshExtension extends IGraphicsExtensionInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a mesh to be used for the radar record on the descriptor
|
* Construct a mesh to be used for the radial data on the targetGeometry
|
||||||
*
|
*
|
||||||
* @param radarData
|
* @param radarData
|
||||||
* @param descriptor
|
* @param descriptor
|
||||||
* @return
|
* @return
|
||||||
* @throws VizException
|
* @throws VizException
|
||||||
*/
|
*/
|
||||||
public IMesh constructMesh(RadarRecord radarData,
|
public IMesh constructMesh(RadialMeshData meshData,
|
||||||
GeneralGridGeometry targetGeometry) throws VizException;
|
GeneralGridGeometry targetGeometry) throws VizException;
|
||||||
|
|
||||||
|
public static class RadialMeshData{
|
||||||
|
|
||||||
|
/** longitude of center point of radial data. */
|
||||||
|
private float longitude;
|
||||||
|
|
||||||
|
/** latitude of center point of radial data. */
|
||||||
|
private float latitude;
|
||||||
|
|
||||||
|
/** angle(in degrees) of each radial */
|
||||||
|
private float[] angleData;
|
||||||
|
|
||||||
|
/** number of bins */
|
||||||
|
private int numBins;
|
||||||
|
|
||||||
|
/** number of radials */
|
||||||
|
private int numRadials;
|
||||||
|
|
||||||
|
/** width of the bins(in meters) */
|
||||||
|
private int binWidth;
|
||||||
|
|
||||||
|
/** Angle above ground of the tilt of the mesh */
|
||||||
|
private float tiltAngle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When 0 the mesh will start in the center, a larger number will cause
|
||||||
|
* the mesh to begin firstBin*binWidth meters from the center.
|
||||||
|
*/
|
||||||
|
private int firstBin = 0;
|
||||||
|
|
||||||
|
public RadialMeshData() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public RadialMeshData(RadarRecord record) {
|
||||||
|
longitude = record.getLongitude();
|
||||||
|
latitude = record.getLatitude();
|
||||||
|
angleData = record.getAngleData();
|
||||||
|
numBins = record.getNumBins();
|
||||||
|
numRadials = record.getNumRadials();
|
||||||
|
binWidth = record.getGateResolution();
|
||||||
|
tiltAngle = record.getTrueElevationAngle();
|
||||||
|
Integer jStart = record.getJstart();
|
||||||
|
if (jStart != null) {
|
||||||
|
firstBin = jStart;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(float longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(float latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float[] getAngleData() {
|
||||||
|
return angleData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAngleData(float[] angleData) {
|
||||||
|
this.angleData = angleData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumBins() {
|
||||||
|
return numBins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumBins(int numBins) {
|
||||||
|
this.numBins = numBins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumRadials() {
|
||||||
|
return numRadials;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumRadials(int numRadials) {
|
||||||
|
this.numRadials = numRadials;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBinWidth() {
|
||||||
|
return binWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBinWidth(int binWidth) {
|
||||||
|
this.binWidth = binWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getTiltAngle() {
|
||||||
|
return tiltAngle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTiltAngle(float tiltAngle) {
|
||||||
|
this.tiltAngle = tiltAngle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFirstBin() {
|
||||||
|
return firstBin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstBin(int firstBin) {
|
||||||
|
this.firstBin = firstBin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GridGeometry2D getGridGeometry() throws FactoryException {
|
||||||
|
return RadarProjectionFactory.constructGridGeometry(new Coordinate(
|
||||||
|
longitude, latitude), angleData, binWidth, tiltAngle,
|
||||||
|
numBins, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RadialMeshData clone() {
|
||||||
|
RadialMeshData clone = new RadialMeshData();
|
||||||
|
clone.setLongitude(longitude);
|
||||||
|
clone.setLatitude(latitude);
|
||||||
|
clone.setAngleData(angleData);
|
||||||
|
clone.setNumBins(numBins);
|
||||||
|
clone.setNumRadials(numRadials);
|
||||||
|
clone.setBinWidth(binWidth);
|
||||||
|
clone.setTiltAngle(tiltAngle);
|
||||||
|
clone.setFirstBin(firstBin);
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + Arrays.hashCode(angleData);
|
||||||
|
result = prime * result + binWidth;
|
||||||
|
result = prime * result + firstBin;
|
||||||
|
result = prime * result + Float.floatToIntBits(latitude);
|
||||||
|
result = prime * result + Float.floatToIntBits(longitude);
|
||||||
|
result = prime * result + numBins;
|
||||||
|
result = prime * result + numRadials;
|
||||||
|
result = prime * result + Float.floatToIntBits(tiltAngle);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
RadialMeshData other = (RadialMeshData) obj;
|
||||||
|
if (!Arrays.equals(angleData, other.angleData))
|
||||||
|
return false;
|
||||||
|
if (binWidth != other.binWidth)
|
||||||
|
return false;
|
||||||
|
if (firstBin != other.firstBin)
|
||||||
|
return false;
|
||||||
|
if (Float.floatToIntBits(latitude) != Float
|
||||||
|
.floatToIntBits(other.latitude))
|
||||||
|
return false;
|
||||||
|
if (Float.floatToIntBits(longitude) != Float
|
||||||
|
.floatToIntBits(other.longitude))
|
||||||
|
return false;
|
||||||
|
if (numBins != other.numBins)
|
||||||
|
return false;
|
||||||
|
if (numRadials != other.numRadials)
|
||||||
|
return false;
|
||||||
|
if (Float.floatToIntBits(tiltAngle) != Float
|
||||||
|
.floatToIntBits(other.tiltAngle))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "RadialMeshData [longitude=" + longitude + ", latitude="
|
||||||
|
+ latitude + ", numBins=" + numBins + ", numRadials="
|
||||||
|
+ numRadials + ", binWidth=" + binWidth + ", tiltAngle="
|
||||||
|
+ tiltAngle + ", firstBin=" + firstBin + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@ import com.raytheon.viz.radar.interrogators.RadarRadialInterrogator;
|
||||||
import com.raytheon.viz.radar.rsc.RadarImageResource;
|
import com.raytheon.viz.radar.rsc.RadarImageResource;
|
||||||
import com.raytheon.viz.radar.rsc.RadarProductFactory;
|
import com.raytheon.viz.radar.rsc.RadarProductFactory;
|
||||||
import com.raytheon.viz.radar.rsc.RadarResourceData;
|
import com.raytheon.viz.radar.rsc.RadarResourceData;
|
||||||
|
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension.RadialMeshData;
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,6 +72,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* Jul 31, 2013 2190 mschenke Convert interrogate string "msl" to
|
* Jul 31, 2013 2190 mschenke Convert interrogate string "msl" to
|
||||||
* Measure and put in as "height"
|
* Measure and put in as "height"
|
||||||
* Jun 11, 2014 2061 bsteffen Move rangeable methods here.
|
* Jun 11, 2014 2061 bsteffen Move rangeable methods here.
|
||||||
|
* Jun 24, 2014 3072 bsteffen Remove RadarRecord dependency for Radial
|
||||||
|
* Mesh
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -244,7 +247,7 @@ public class RadarRadialResource extends RadarImageResource<MapDescriptor>
|
||||||
public IMesh buildMesh(IGraphicsTarget target, VizRadarRecord radarRecord)
|
public IMesh buildMesh(IGraphicsTarget target, VizRadarRecord radarRecord)
|
||||||
throws VizException {
|
throws VizException {
|
||||||
return target.getExtension(IRadialMeshExtension.class).constructMesh(
|
return target.getExtension(IRadialMeshExtension.class).constructMesh(
|
||||||
radarRecord, descriptor.getGridGeometry());
|
new RadialMeshData(radarRecord), descriptor.getGridGeometry());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,6 +31,13 @@ import com.raytheon.uf.common.geospatial.MapUtil;
|
||||||
/**
|
/**
|
||||||
* A series of methods to help in the processing and tiling of radar data.
|
* A series of methods to help in the processing and tiling of radar data.
|
||||||
*
|
*
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* * Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- -------------- ------------
|
||||||
|
* Jun 20, 2014 3072 mweeks Updates to remove caculateExtent's dependence on RadarRecord.
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
* @author brockwoo
|
* @author brockwoo
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -236,17 +243,20 @@ public class RadarUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double calculateExtent(RadarRecord radarData) {
|
public static double calculateExtent(RadarRecord radarData) {
|
||||||
int numBins = radarData.getNumBins();
|
return calculateExtent(radarData.getNumBins(), radarData.getJstart(), radarData.getGateResolution(),
|
||||||
if (radarData.getJstart() != null) {
|
(double)radarData.getTrueElevationAngle(), radarData.getFormat());
|
||||||
numBins += radarData.getJstart();
|
}
|
||||||
}
|
|
||||||
double maxExtent = radarData.getGateResolution() * numBins
|
|
||||||
* Math.cos(Math.toRadians(radarData.getTrueElevationAngle()));
|
|
||||||
|
|
||||||
if ("Raster".equals(radarData.getFormat())) {
|
public static double calculateExtent(int numBins, Integer startBin, Integer gateResolution,
|
||||||
|
Double elevationAngle, String format) {
|
||||||
|
if (startBin != null) {
|
||||||
|
numBins += startBin;
|
||||||
|
}
|
||||||
|
double maxExtent = gateResolution * numBins
|
||||||
|
* Math.cos(Math.toRadians(elevationAngle));
|
||||||
|
if ("Raster".equals(format)) {
|
||||||
maxExtent /= 2;
|
maxExtent /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return maxExtent;
|
return maxExtent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ import com.raytheon.uf.viz.core.map.MapDescriptor;
|
||||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||||
import com.raytheon.viz.radar.VizRadarRecord;
|
import com.raytheon.viz.radar.VizRadarRecord;
|
||||||
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
||||||
|
import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension.RadialMeshData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO Add Description
|
* TODO Add Description
|
||||||
|
@ -48,6 +49,7 @@ import com.raytheon.viz.radar.rsc.image.IRadialMeshExtension;
|
||||||
* 09-04-2012 B. Hebbard Add getGridGeometry() to descriptor per OB12.9.1 RTS
|
* 09-04-2012 B. Hebbard Add getGridGeometry() to descriptor per OB12.9.1 RTS
|
||||||
* change IRadialMeshExtension.constructMesh 2nd param
|
* change IRadialMeshExtension.constructMesh 2nd param
|
||||||
* 06/16/2014 #2061 bsteffen update IRangeableResource
|
* 06/16/2014 #2061 bsteffen update IRangeableResource
|
||||||
|
* 06/24/2014 #2061 bsteffen Remove RadarRecord dependency for Radial Mesh
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -166,7 +168,8 @@ public class RadarRadialResource extends RadarImageResource<MapDescriptor> {
|
||||||
public IMesh buildMesh(IGraphicsTarget target, VizRadarRecord radarRecord)
|
public IMesh buildMesh(IGraphicsTarget target, VizRadarRecord radarRecord)
|
||||||
throws VizException {
|
throws VizException {
|
||||||
return target.getExtension(IRadialMeshExtension.class).constructMesh(
|
return target.getExtension(IRadialMeshExtension.class).constructMesh(
|
||||||
radarRecord, ((IMapDescriptor) descriptor).getGridGeometry());
|
new RadialMeshData(radarRecord),
|
||||||
|
((IMapDescriptor) descriptor).getGridGeometry());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue