Package ucar.unidata.idv.control.drawing
Class DrawingGlyph
java.lang.Object
ucar.unidata.idv.control.drawing.DrawingGlyph
- Direct Known Subclasses:
HighLowGlyph
,ImageGlyph
,LineGlyph
,MovieGlyph
,SymbolGlyph
,TextGlyph
Class Glyph. Base class for all drawing things
- Version:
- $Revision: 1.92 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
actual points being displayedstatic final String
static final String
xml attribute namestatic final String
xml attribute namestatic final String
xml attribute namestatic final String
xml attribute namestatic final String
xml attribute namestatic final String
xml attribute namestatic final String
xml attribute namestatic final String
xml attribute namestatic final String
xml attr namesstatic final String
xml attribute for time formatstatic final String
xml attribute namestatic final String
xml attribute nameprotected DrawingControl
My controlstatic final String[]
labels for coordinate syste type.static final int
Represents LAT/LON vertical coordinatestatic final int
Represents LAT/LON/ALT vertical coordinatestatic final int
Represents LAT/LON vertical coordinatestatic final int
Represents no vertical coordinatestatic final String[]
Drawing coordinate namesstatic final int[]
Drawing coordinate typesstatic final int
Represents XY vertical coordinatestatic final int
Represents XYZ vertical coordinateprotected int
What drawing coord system are we onprotected EarthLocation
Where did we start movingprotected double[]
Where did we start movingstatic final int
Indices into arraysstatic final int
Indices into arraysstatic final int
Indices into arraysstatic final int
Indices into arraysstatic final int
Indices into arraysstatic final int
Indices into arraysboolean
flagprotected CompositeDisplayable
Top level displayableprotected List
List of points.protected JDialog
The properties dialogprotected boolean
Is properties dialog shownstatic final int
Indices into arraysstatic final int
Indices into arraysstatic final int
Indices into arraysprotected CompositeDisplayable
Shows selected highlightprotected int
What point are we stretchingprotected JTabbedPane
For propsstatic final String
Xml tag namestatic final String
Xml tag namestatic final String
Xml tag namestatic final String
Xml tag namestatic final String
Xml tag namestatic final String
Xml tag namestatic final String
Xml tag namestatic final String
Xml tag namestatic final String
Xml tag namestatic final String
Xml tag nameprotected static int
For unique idsprotected float
Fixed z position -
Constructor Summary
ConstructorsConstructorDescriptionCtorDrawingGlyph
(DrawingControl control, DisplayEvent event) CtorDrawingGlyph
(DrawingControl control, DisplayEvent event, boolean filled) Ctor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Populate the xml node with attrsprotected void
addDisplayable
(Displayable displayable) Add the displayable to the main parent displayablevoid
Add the time to the list of timesprotected boolean
applyProperties
(Hashtable compMap) Handle the property apply.boolean
Can this glyph type calculate areaboolean
Can this glyph type calculate distancevoid
Is this glyph visible in the current time stepvoid
Make sure the displayable is not visible if this glyph is not visibleint
closestPoint
(double[] location, List points) Find index of closest pointprotected boolean
Is glyph constrained to 2ddouble
distance
(double[] location, double[] direction) Calculate distancestatic double
distanceBetween
(double[] origin, double[] loc2) Get distance betweendouble
distanceBetween
(double[] loc1, EarthLocation el) Get distancevoid
doDeletePoint
(DisplayEvent event) delete the point nearest the eventprotected void
This stretches the current point and also stretches the rest of the points by a linear delta from the initial point.void
doMove
(DisplayEvent event) Move this glyphvoid
all donevoid
doStretch
(DisplayEvent event) Stretch this glyphvoid
Evaluate the jython from the properties dialogdouble
getArea()
Get the area in square feet.get string representation of the area for showing the userboolean
Get the BeenRemoved property.boolean
currently being createdGet the Bgcolor property.protected List
getBoundingBox
(List points) Find bounding box of pointsprotected double[]
getBoxPoint
(int i) Get xyz of point at given indexprotected double[]
getBoxPoint
(int i, List l) Get xyz of point at given indexprotected double[]
getBoxPoint
(Object point) Convert point (either latlonalt or xyz) to xyzgetColor()
Get the Color property.int
Get the CoordType property.boolean
Get the CreatedByUser property.protected float
Get the default Z position for the glyph.Get the descriptionGet the main displayable.Calculate the distance along the lineboolean
Get the Editable property.final Element
getElement
(Document doc) Create an xml element that represents this glyphGet extra description to show in the JTableboolean
Get the Filled property.protected double
Get altitude of zpositionboolean
Get the FullLatLon property.boolean
is this glyph a raster thingfloat[][]
get the points as an array of lat/lonsprotected float[][]
getLatLons
(List points) Convert points list of array of xyz or lat/lon/altgetName()
Get the Name property.protected CompositeDisplayable
Get the main displayable.boolean
Get the Pickable property.protected Object
getPoint
(DisplayEvent event) Get point to use from the event.Get the Points property.protected float[][]
Convert points list of array of xyz or lat/lon/altprotected float[][]
getPointValues
(boolean convertToXY) Convert points list of array of xyz or lat/lon/altprotected double[][]
Convert points list of array of xyz or lat/lon/altprotected double[][]
getPointValuesDouble
(boolean convertToXY) Convert points list of array of xyz or lat/lon/altprotected void
getPropertiesComponents
(List comps, Hashtable compMap) Make the properties widgetsprotected List
Get points used to select this glyph.abstract String
Get xml tag name to useprotected Data
getTimeField
(Data data) Make the time field if we have time values If not, just return the dataprotected void
getTimePropertiesComponents
(List comps, Hashtable compMap) Add to the comps array the time list for selecting timesGet the TimeValue property.abstract String
Get the name of this glyph typeboolean
Get the VisibleFlag property.float
Get the ZPosition property.handleCreation
(DisplayEvent event) Handle the creation event.handleKeyPressed
(DisplayEvent event) Handle event.handleMouseDragged
(DisplayEvent event) Handle event.handleMouseMoved
(DisplayEvent event) Handle the event.handleMousePressed
(DisplayEvent event) Handle the event.handleMouseReleased
(DisplayEvent event) Handle event.void
hide()
Hide glyphfinal boolean
Do final initializationprotected boolean
This is called to do final initializationvoid
initFromBundle
(DrawingControl control) Initialize when recreated from a bundleboolean
initFromUser
(DrawingControl control, DisplayEvent event) Initialize from a user event.void
initFromXml
(DrawingControl control, Element node) Initialize from xmlvoid
initMove
(DisplayEvent event) Started movingvoid
initStretch
(DisplayEvent event) Start strethprotected boolean
Is the control a front displayboolean
Are we drawing in xy or lat/lon spaceboolean
In lat/lon or lat/lon/alt spaceboolean
Are we drawing in xy or xyz spaceboolean
Is this glyph selectableboolean
isValid()
Is this glyph valid.boolean
Is this glyph visibleprotected EarthLocation
makePoint
(double lat, double lon, double alt) Utility to make a pointboolean
mousePressed
(DisplayEvent event) handle eventprotected void
moveTo
(DisplayEvent event) Move this glyph to the location of the eventvoid
processPointStrings
(List pointStrings) Parse the List of point strings.void
processPointStrings
(List pointStrings, boolean normalize360) Parse the List of point strings.void
Handle eventprotected void
removeDisplayable
(Displayable displayable) Remove the displayable from the main displayableprotected void
setActualPoints
(float[][] pts) Set the points listvoid
setBeenRemoved
(boolean value) Set the BeenRemoved property.void
setBgcolor
(Color value) Set the Bgcolor property.void
Set the Color property.protected void
setColor
(Displayable displayable, Color c) Set color on displayablevoid
setCoordType
(int value) Set the CoordType property.void
setCreatedByUser
(boolean value) Set the CreatedByUser property.void
setEditable
(boolean value) Set the Editable property.void
setFilled
(boolean value) Set the Filled property.void
setFullLatLon
(boolean value) Set the Fulllatlon property.void
Set the Name property.void
setPickable
(boolean value) Set the Pickable property.void
Set the Points property.final void
Set the properties from the dialogvoid
setSelected
(boolean selected) Set this glyph selectedvoid
setTimeValues
(List value) Set the TimeValue property.void
setVisible
(boolean visible) Toggle visiblity of the displayablevoid
setVisibleFlag
(boolean value) Set the VisibleFlag property.void
setZPosition
(float value) Set the Zposition property.protected boolean
protected boolean
Should show color selector in propertiesvoid
show()
Show glyphstatic double[][]
smoothCurve
(double[][] curve, int window) Smooth the curvestatic double
squared
(double v1) Square valueprotected void
swap
(double[] a1, double[] a2, int index) Swap array values at indexprotected void
swap
(float[] a1, float[] a2, int index) Swap array values at indexprotected float[]
Convert to float arraytoString()
to stringprotected Data
Try to fill the pts arrayvoid
Glyph moved.void
viewpoint changedvoid
write out the points as a csv file
-
Field Details
-
uniqueCnt
protected static int uniqueCntFor unique ids -
TAG_POLYGON
Xml tag name- See Also:
-
TAG_ARROW
Xml tag name- See Also:
-
TAG_FRONT
Xml tag name- See Also:
-
TAG_TEXT
Xml tag name- See Also:
-
TAG_HIGH
Xml tag name- See Also:
-
TAG_LOW
Xml tag name- See Also:
-
TAG_SHAPE
Xml tag name- See Also:
-
TAG_SYMBOL
Xml tag name- See Also:
-
TAG_IMAGE
Xml tag name- See Also:
-
TAG_MOVIE
Xml tag name- See Also:
-
ATTR_COLOR
xml attribute name- See Also:
-
ATTR_BGCOLOR
- See Also:
-
ATTR_FILLED
xml attribute name- See Also:
-
ATTR_PICKABLE
xml attribute name- See Also:
-
ATTR_FULLLATLON
xml attribute name- See Also:
-
ATTR_TIMES
xml attribute name- See Also:
-
ATTR_TIMEFORMAT
xml attribute for time format- See Also:
-
ATTR_ZPOSITION
xml attribute name- See Also:
-
ATTR_COORDTYPE
xml attribute name- See Also:
-
ATTR_POINTS
xml attribute name- See Also:
-
ATTR_LINEWIDTH
xml attribute name- See Also:
-
ATTR_TEXT
xml attr names- See Also:
-
ATTR_NAME
xml attribute name- See Also:
-
COORD_NONE
public static final int COORD_NONERepresents no vertical coordinate- See Also:
-
COORD_XYZ
public static final int COORD_XYZRepresents XYZ vertical coordinate- See Also:
-
COORD_XY
public static final int COORD_XYRepresents XY vertical coordinate- See Also:
-
COORD_LATLONALT
public static final int COORD_LATLONALTRepresents LAT/LON/ALT vertical coordinate- See Also:
-
COORD_LATLON
public static final int COORD_LATLONRepresents LAT/LON vertical coordinate- See Also:
-
COORD_LONLAT
public static final int COORD_LONLATRepresents LAT/LON vertical coordinate- See Also:
-
COORD_TYPES
public static final int[] COORD_TYPESDrawing coordinate types -
COORD_TYPENAMES
Drawing coordinate names -
COORD_LABELS
labels for coordinate syste type. -
oldVisibility
public boolean oldVisibilityflag -
propertiesUp
protected boolean propertiesUpIs properties dialog shown -
propDialog
The properties dialog -
tabbedPane
For props -
points
List of points. May be lat/lon/alt or x/y/z -
stretchIndex
protected int stretchIndexWhat point are we stretching -
firstMoveLocation
protected double[] firstMoveLocationWhere did we start moving -
actualPoints
actual points being displayed -
firstMoveEarthLocation
Where did we start moving -
PT_X
public static final int PT_XIndices into arrays- See Also:
-
PT_Y
public static final int PT_YIndices into arrays- See Also:
-
PT_Z
public static final int PT_ZIndices into arrays- See Also:
-
IDX_X
public static final int IDX_XIndices into arrays- See Also:
-
IDX_Y
public static final int IDX_YIndices into arrays- See Also:
-
IDX_Z
public static final int IDX_ZIndices into arrays- See Also:
-
IDX_LAT
public static final int IDX_LATIndices into arrays- See Also:
-
IDX_LON
public static final int IDX_LONIndices into arrays- See Also:
-
IDX_ALT
public static final int IDX_ALTIndices into arrays- See Also:
-
coordType
protected int coordTypeWhat drawing coord system are we on -
zPosition
protected float zPositionFixed z position -
parentDisplayable
Top level displayable -
selectionDisplayable
Shows selected highlight -
control
My control
-
-
Constructor Details
-
DrawingGlyph
public DrawingGlyph()Ctor -
DrawingGlyph
Ctor- Parameters:
control
- The control I'm inevent
- The display event.
-
DrawingGlyph
Ctor- Parameters:
control
- The control I'm inevent
- The display event.filled
- Is this glyph filled
-
-
Method Details
-
initFinal
Do final initialization- Returns:
- Success
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
initFinalInner
This is called to do final initialization- Returns:
- Successful
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
initFromUser
public boolean initFromUser(DrawingControl control, DisplayEvent event) throws VisADException, RemoteException Initialize from a user event.- Parameters:
control
- The control I'm inevent
- The display event.- Returns:
- OK
- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
initFromBundle
Initialize when recreated from a bundle- Parameters:
control
- The control I'm in- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
initFromXml
public void initFromXml(DrawingControl control, Element node) throws VisADException, RemoteException Initialize from xml- Parameters:
control
- The control I'm innode
- The xml node- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
isSelectable
public boolean isSelectable()Is this glyph selectable- Returns:
- By default return true
-
isFrontDisplay
protected boolean isFrontDisplay()Is the control a front display- Returns:
- is a front display
-
getDefaultZPosition
protected float getDefaultZPosition()Get the default Z position for the glyph.- Returns:
- default Z position for the glyph.
-
isValid
public boolean isValid()Is this glyph valid. Some glyph classes get created but are not fully valid.- Returns:
- By default return true
-
processPointStrings
Parse the List of point strings. The format depends on the coordinate system type (e.g., XY, XYZ, etc.)- Parameters:
pointStrings
- List of Strings that represent double location values- Throws:
RemoteException
- On badnessVisADException
- On badness
-
processPointStrings
public void processPointStrings(List pointStrings, boolean normalize360) throws VisADException, RemoteException Parse the List of point strings. The format depends on the coordinate system type (e.g., XY, XYZ, etc.)- Parameters:
pointStrings
- List of Strings that represent double location values- Throws:
RemoteException
- On badnessVisADException
- On badness
-
mousePressed
handle event- Parameters:
event
- event- Returns:
- continue processing
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setSelected
Set this glyph selected- Parameters:
selected
- Is selected- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getSelectionPoints
Get points used to select this glyph.- Returns:
- Selection points
-
getElement
Create an xml element that represents this glyph- Parameters:
doc
- The doc to create with- Returns:
- The element
-
getTimeField
Make the time field if we have time values If not, just return the data- Parameters:
data
- the data to make the range of the time field with- Returns:
- The time field or the data argument if there are no times
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
addAttributes
Populate the xml node with attrs- Parameters:
e
- Xml node
-
getTagName
Get xml tag name to use- Returns:
- Xml tag name
-
getTypeName
Get the name of this glyph type- Returns:
- The name
-
getDescription
Get the description- Returns:
- the description
-
getAreaString
get string representation of the area for showing the user- Returns:
- area label
- Throws:
Exception
- on badness
-
getExtraDescription
Get extra description to show in the JTable- Returns:
- extra description
-
getDisplayable
Get the main displayable.- Returns:
- The displayable
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getParent
Get the main displayable.- Returns:
- The displayable
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
addDisplayable
Add the displayable to the main parent displayable- Parameters:
displayable
- The displayable to add- Throws:
RemoteException
- On badnessVisADException
- On badness
-
removeDisplayable
Remove the displayable from the main displayable- Parameters:
displayable
- The displayable to remove- Throws:
RemoteException
- On badnessVisADException
- On badness
-
addTime
Add the time to the list of times- Parameters:
time
- The time
-
setTimeValues
Set the TimeValue property.- Parameters:
value
- The new value for TimeValue
-
getTimeValues
Get the TimeValue property.- Returns:
- The TimeValue
-
checkTimeVisibility
Is this glyph visible in the current time step- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
setVisible
Toggle visiblity of the displayable- Parameters:
visible
- Is visible- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
isVisible
public boolean isVisible()Is this glyph visible- Returns:
- is visible
-
checkVisibility
public void checkVisibility()Make sure the displayable is not visible if this glyph is not visible -
constrainedTo2D
protected boolean constrainedTo2D()Is glyph constrained to 2d- Returns:
- Constrained to 2d
-
setCoordType
public void setCoordType(int value) Set the CoordType property.- Parameters:
value
- The new value for CoordType
-
getCoordType
public int getCoordType()Get the CoordType property.- Returns:
- The CoordType
-
isInXYSpace
public boolean isInXYSpace()Are we drawing in xy or xyz space- Returns:
- Is in xy space
-
isInFlatSpace
public boolean isInFlatSpace()Are we drawing in xy or lat/lon space- Returns:
- Is in 2d space
-
isInLatLonSpace
public boolean isInLatLonSpace()In lat/lon or lat/lon/alt space- Returns:
- Is in latlon space
-
getPoint
Get point to use from the event. This may be an earthlocation if in latlon space or a double array if in x space.- Parameters:
event
- The display event.- Returns:
- The point
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setProperties
public final void setProperties()Set the properties from the dialog -
writePoints
public void writePoints()write out the points as a csv file -
evaluateJython
public void evaluateJython()Evaluate the jython from the properties dialog -
applyProperties
Handle the property apply.- Parameters:
compMap
- Holds property widgets- Returns:
- Success
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
hide
Hide glyph- Throws:
RemoteException
- On badnessVisADException
- On badness
-
show
Show glyph- Throws:
RemoteException
- On badnessVisADException
- On badness
-
shouldShowColorSelector
protected boolean shouldShowColorSelector()Should show color selector in properties- Returns:
- show color selector
-
shouldShowBgColorSelector
protected boolean shouldShowBgColorSelector() -
getPropertiesComponents
Make the properties widgets- Parameters:
comps
- List of componentscompMap
- Map to hold name to widget
-
getTimePropertiesComponents
Add to the comps array the time list for selecting times- Parameters:
comps
- compscompMap
- map
-
getDistance
Calculate the distance along the line- Returns:
- Distance or null if this glyph type cannot calculate it
- Throws:
Exception
- On badness
-
getArea
Get the area in square feet.- Returns:
- area of this shape in square feet
- Throws:
Exception
- On badness
-
canShowDistance
public boolean canShowDistance()Can this glyph type calculate distance- Returns:
- can do distance
-
canShowArea
public boolean canShowArea()Can this glyph type calculate area- Returns:
- can do area
-
getBeingCreated
public boolean getBeingCreated()currently being created- Returns:
- being created
-
doneBeingCreated
public void doneBeingCreated()all done -
handleCreation
Handle the creation event. If it returns this then the DrawingControl keeps routing events to me. If returns null then no more events get routed to me.- Parameters:
event
- The display event.- Returns:
- This or null
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
handleMousePressed
Handle the event. If it returns this then the DrawingControl keeps routing events to me. If returns null then no more events get routed to me.- Parameters:
event
- The display event.- Returns:
- This or null.
- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
handleMouseMoved
Handle the event. If it returns this then the DrawingControl keeps routing events to me. If returns null then no more events get routed to me.- Parameters:
event
- The display event.- Returns:
- This or null
- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
initStretch
Start streth- Parameters:
event
- The display event.- Throws:
RemoteException
- On badnessVisADException
- On badness
-
doStretch
Stretch this glyph- Parameters:
event
- The display event.- Throws:
RemoteException
- On badnessVisADException
- On badness
-
doDeletePoint
delete the point nearest the event- Parameters:
event
- the event- Throws:
RemoteException
- on badnessVisADException
- on badness
-
doMove
Move this glyph- Parameters:
event
- The display event.- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
moveTo
Move this glyph to the location of the event- Parameters:
event
- The display event.- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getPointValues
Convert points list of array of xyz or lat/lon/alt- Returns:
- Location
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getPointValues
Convert points list of array of xyz or lat/lon/alt- Parameters:
convertToXY
- If true, force result to be xyz- Returns:
- Location
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getLatLons
get the points as an array of lat/lons- Returns:
- latlons
- Throws:
Exception
- on badness
-
getLatLons
Convert points list of array of xyz or lat/lon/alt- Parameters:
points
- List of points. Either double array or EarthLocation- Returns:
- lat/lons
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getPointValuesDouble
Convert points list of array of xyz or lat/lon/alt- Returns:
- Location
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getPointValuesDouble
protected double[][] getPointValuesDouble(boolean convertToXY) throws VisADException, RemoteException Convert points list of array of xyz or lat/lon/alt- Parameters:
convertToXY
- If true, force result to be xyz- Returns:
- Location
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
tryToFill
Try to fill the pts array- Parameters:
pts
- The points to filldflt
- The default to return if cannot fill- Returns:
- The filled data or the default if fill is not possible
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
toLatLonAlt
Convert to float array- Parameters:
el
- Location- Returns:
- Converted location
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getFixedAltitude
Get altitude of zposition- Returns:
- Altitude
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
projectionChanged
Handle event- Throws:
RemoteException
- On badnessVisADException
- On badness
-
viewpointChanged
viewpoint changed- Throws:
RemoteException
- On badnessVisADException
- On badness
-
updateLocation
Glyph moved. Update the Displayable location.- Throws:
RemoteException
- On badnessVisADException
- On badness
-
initMove
Started moving- Parameters:
event
- The display event.- Throws:
RemoteException
- On badnessVisADException
- On badness
-
handleKeyPressed
Handle event.- Parameters:
event
- The display event.- Returns:
- This or null
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
handleMouseDragged
Handle event.- Parameters:
event
- The display event.- Returns:
- This or null
- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
handleMouseReleased
Handle event.- Parameters:
event
- The display event.- Returns:
- This or null
- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
setColor
Set the Color property.- Parameters:
value
- The new value for Color
-
setColor
Set color on displayable- Parameters:
displayable
- displayable_c
- color- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getColor
Get the Color property.- Returns:
- The Color
-
setBgcolor
Set the Bgcolor property.- Parameters:
value
- The new value for Bgcolor
-
getBgcolor
Get the Bgcolor property.- Returns:
- The Bgcolor
-
setActualPoints
Set the points list- Parameters:
pts
- Points- Throws:
RemoteException
- On badnessVisADException
- On badness
-
makePoint
protected EarthLocation makePoint(double lat, double lon, double alt) throws VisADException, RemoteException Utility to make a point- Parameters:
lat
- latlon
- lonalt
- alt- Returns:
- point
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
distance
public double distance(double[] location, double[] direction) throws VisADException, RemoteException Calculate distance- Parameters:
location
- fromdirection
- direction- Returns:
- distance
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
distanceBetween
public static double distanceBetween(double[] origin, double[] loc2) Get distance between- Parameters:
origin
- Fromloc2
- To- Returns:
- Distance
-
distanceBetween
public double distanceBetween(double[] loc1, EarthLocation el) throws VisADException, RemoteException Get distance- Parameters:
loc1
- point 1el
- point 2- Returns:
- distance
- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
doInterpolatedStretch
This stretches the current point and also stretches the rest of the points by a linear delta from the initial point.- Parameters:
event
- The mouse move event- Throws:
RemoteException
- On badnessVisADException
- On badness
-
squared
public static double squared(double v1) Square value- Parameters:
v1
- Value- Returns:
- Squared
-
closestPoint
Find index of closest point- Parameters:
location
- Frompoints
- Points- Returns:
- Index
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
smoothCurve
public static double[][] smoothCurve(double[][] curve, int window) Smooth the curve- Parameters:
curve
- The curvewindow
- Smooth window- Returns:
- Smoothed curve
-
setZPosition
public void setZPosition(float value) Set the Zposition property.- Parameters:
value
- The new value for Zposition
-
getZPosition
public float getZPosition()Get the ZPosition property.- Returns:
- The ZPosition
-
setPoints
Set the Points property.- Parameters:
value
- The new value for Points
-
getPoints
Get the Points property.- Returns:
- The Points
-
getBoxPoint
Get xyz of point at given index- Parameters:
i
- Index- Returns:
- xyz
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getBoxPoint
Get xyz of point at given index- Parameters:
i
- Indexl
- Points- Returns:
- xyz
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getBoxPoint
Convert point (either latlonalt or xyz) to xyz- Parameters:
point
- Point- Returns:
- xyz
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
swap
protected void swap(double[] a1, double[] a2, int index) Swap array values at index- Parameters:
a1
- Array 1a2
- Array 2index
- Index
-
swap
protected void swap(float[] a1, float[] a2, int index) Swap array values at index- Parameters:
a1
- Array 1a2
- Array 2index
- Index
-
getBoundingBox
Find bounding box of points- Parameters:
points
- Points- Returns:
- bbox
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setFilled
public void setFilled(boolean value) Set the Filled property.- Parameters:
value
- The new value for Filled
-
getFilled
public boolean getFilled()Get the Filled property.- Returns:
- The Filled
-
setPickable
public void setPickable(boolean value) Set the Pickable property.- Parameters:
value
- The new value for Pickable
-
getPickable
public boolean getPickable()Get the Pickable property.- Returns:
- The Pickable
-
setFullLatLon
public void setFullLatLon(boolean value) Set the Fulllatlon property.- Parameters:
value
- The new value for Fulllatlon
-
getFullLatLon
public boolean getFullLatLon()Get the FullLatLon property.- Returns:
- The FullLatLon
-
setBeenRemoved
public void setBeenRemoved(boolean value) Set the BeenRemoved property.- Parameters:
value
- The new value for BeenRemoved
-
getBeenRemoved
public boolean getBeenRemoved()Get the BeenRemoved property.- Returns:
- The BeenRemoved
-
setName
Set the Name property.- Parameters:
value
- The new value for Name
-
getName
Get the Name property.- Returns:
- The Name
-
toString
to string -
setEditable
public void setEditable(boolean value) Set the Editable property.- Parameters:
value
- The new value for Editable
-
getEditable
public boolean getEditable()Get the Editable property.- Returns:
- The Editable
-
setVisibleFlag
Set the VisibleFlag property.- Parameters:
value
- The new value for VisibleFlag- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getVisibleFlag
public boolean getVisibleFlag()Get the VisibleFlag property.- Returns:
- The VisibleFlag
-
getIsRaster
public boolean getIsRaster()is this glyph a raster thing- Returns:
- is raster
-
setCreatedByUser
public void setCreatedByUser(boolean value) Set the CreatedByUser property.- Parameters:
value
- The new value for CreatedByUser
-
getCreatedByUser
public boolean getCreatedByUser()Get the CreatedByUser property.- Returns:
- The CreatedByUser
-