org.wdssii.polarmerger
Class PolarMerger

java.lang.Object
  extended by org.wdssii.core.WDSSIIProgram
      extended by org.wdssii.core.Algorithm
          extended by org.wdssii.polarmerger.PolarMerger
All Implemented Interfaces:
IndexRecordListener

public class PolarMerger
extends Algorithm

Author:
lakshman

Nested Class Summary
static class PolarMerger.MergerStrategy
           
 
Field Summary
private  float ageOffInMinutes
           
private  float azimuthalSpacingDegrees
           
private  boolean compositeEnabled
           
private  float distToFirst
           
private  float gateWidthKms
           
private  String inputType
           
private  Date lastUpdate
           
private  Date lastWrite
           
private static org.apache.commons.logging.Log log
           
private  PowerDensityLookup lookup
           
private  float maxElevation
           
private  PolarMerger.MergerStrategy mergerStrategy
           
private  int numElev
           
private  int numGates
           
private  int numNewRadials
           
private  float nyquist
           
private  MergeableObservations observations
           
private  String outputType
           
private  Location radarLocation
           
private  boolean writeAfterEveryInputReceived
           
private  int writeIntervalSeconds
           
 
Constructor Summary
PolarMerger()
           
 
Method Summary
private  void computeAndWriteIfNeeded()
           
protected  void computeAndWriteOutputs()
           
 float getAgeOffInMinutes()
           
 float getAzimuthalSpacingDegrees()
           
 float getGateWidthKms()
           
 String getInputType()
           
 float getMaxElevation()
           
 String getMergerStrategy()
          One of the MergerStrategy enums
 int getNumGates()
           
 String getOutputType()
           
 int getWriteIntervalSeconds()
           
 void handleRecord(IndexRecord rec)
           
private  void initIfNeeded(RadialSet rs)
           
 boolean isCompositeEnabled()
           
 boolean isWriteAfterEveryInputReceived()
           
static void main(String[] args)
           
private  PolarGrid[] performAlgorithms(PolarGrid[] grids)
           
private  void reset()
           
 void setAgeOffInMinutes(float ageOffInMinutes)
           
 void setAzimuthalSpacingDegrees(float azimuthalSpacingDegrees)
           
 void setCompositeEnabled(boolean compositeEnabled)
           
 void setGateWidthKms(float gateWidthKms)
           
 void setInputType(String inputType)
           
 void setMaxElevation(float elevationDegrees)
           
 void setMergerStrategy(String mergerStrategy)
          One of the MergerStrategy enums
 void setNumGates(int numGates)
           
 void setOutputType(String outputType)
           
 void setWriteAfterEveryInputReceived(boolean writeAfterEveryInputReceived)
          If set to true, then writeIntervalSeconds is ignored.
 void setWriteIntervalSeconds(int writeIntervalSeconds)
           
private  void update(Radial radial, float elevation, float dist_to_first_gate, Date date)
           
private  void update(RadialSet rs)
           
 
Methods inherited from class org.wdssii.core.Algorithm
execute, getInputURLs, setInputURLs
 
Methods inherited from class org.wdssii.core.WDSSIIProgram
getOutputDir, getPropertiesFromCommandLine, getSubTypeForElevation, isRealTime, printUsage, setOutputDir, setRealTime, setup, setup, setupAndExecute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

inputType

private String inputType

compositeEnabled

private boolean compositeEnabled

writeIntervalSeconds

private int writeIntervalSeconds

writeAfterEveryInputReceived

private boolean writeAfterEveryInputReceived

maxElevation

private float maxElevation

azimuthalSpacingDegrees

private float azimuthalSpacingDegrees

gateWidthKms

private float gateWidthKms

numGates

private int numGates

ageOffInMinutes

private float ageOffInMinutes

numElev

private int numElev

mergerStrategy

private PolarMerger.MergerStrategy mergerStrategy

numNewRadials

private int numNewRadials

observations

private MergeableObservations observations

lookup

private PowerDensityLookup lookup

lastUpdate

private Date lastUpdate

lastWrite

private Date lastWrite

radarLocation

private Location radarLocation

nyquist

private float nyquist

outputType

private String outputType

distToFirst

private final float distToFirst
See Also:
Constant Field Values
Constructor Detail

PolarMerger

public PolarMerger()
Method Detail

main

public static void main(String[] args)

getAzimuthalSpacingDegrees

public float getAzimuthalSpacingDegrees()

setAzimuthalSpacingDegrees

public void setAzimuthalSpacingDegrees(float azimuthalSpacingDegrees)

isCompositeEnabled

public boolean isCompositeEnabled()

setCompositeEnabled

public void setCompositeEnabled(boolean compositeEnabled)

getMaxElevation

public float getMaxElevation()

setMaxElevation

public void setMaxElevation(float elevationDegrees)

reset

private void reset()

getGateWidthKms

public float getGateWidthKms()

setGateWidthKms

public void setGateWidthKms(float gateWidthKms)

getInputType

public String getInputType()

setInputType

public void setInputType(String inputType)

getNumGates

public int getNumGates()

setNumGates

public void setNumGates(int numGates)

getWriteIntervalSeconds

public int getWriteIntervalSeconds()

setWriteIntervalSeconds

public void setWriteIntervalSeconds(int writeIntervalSeconds)

getAgeOffInMinutes

public float getAgeOffInMinutes()

setAgeOffInMinutes

public void setAgeOffInMinutes(float ageOffInMinutes)

getOutputType

public String getOutputType()

setOutputType

public void setOutputType(String outputType)

getMergerStrategy

public String getMergerStrategy()
One of the MergerStrategy enums

Returns:
mergerStrategy

setMergerStrategy

public void setMergerStrategy(String mergerStrategy)
One of the MergerStrategy enums

Parameters:
mergerStrategy -

handleRecord

public void handleRecord(IndexRecord rec)

computeAndWriteIfNeeded

private void computeAndWriteIfNeeded()

update

private void update(RadialSet rs)

initIfNeeded

private void initIfNeeded(RadialSet rs)

update

private void update(Radial radial,
                    float elevation,
                    float dist_to_first_gate,
                    Date date)

computeAndWriteOutputs

protected void computeAndWriteOutputs()

performAlgorithms

private PolarGrid[] performAlgorithms(PolarGrid[] grids)

isWriteAfterEveryInputReceived

public boolean isWriteAfterEveryInputReceived()

setWriteAfterEveryInputReceived

public void setWriteAfterEveryInputReceived(boolean writeAfterEveryInputReceived)
If set to true, then writeIntervalSeconds is ignored.