ru.igis.omtab
Class Field

java.lang.Object
  extended by com.bbn.openmap.omGraphics.geom.BasicGeometry
      extended by com.bbn.openmap.omGraphics.OMGraphicAdapter
          extended by com.bbn.openmap.layer.location.Location
              extended by com.bbn.openmap.layer.location.BasicLocation
                  extended by ru.igis.omtab.MapOb
                      extended by ru.igis.omtab.OMTRect
                          extended by ru.igis.omtab.Field
All Implemented Interfaces:
com.bbn.openmap.omGraphics.OMGeometry, com.bbn.openmap.omGraphics.OMGraphic, com.bbn.openmap.omGraphics.OMGraphicConstants, java.io.Serializable, java.lang.Cloneable, Protegian

public class Field
extends OMTRect

Class for simulation of extensive objects arbitrary movements. Represented by list of named matrices each of wich representing distribution of some parameter along the one rectangular area in space descibed by latitude and longitude coordinates of points in witch values of parameters are known. Coordinates must go through equal intervals. (For example, distributions of sea current speed and direction)

Author:
Ru
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ru.igis.omtab.MapOb
df
 
Fields inherited from class com.bbn.openmap.layer.location.Location
DECLUTTER_ANYWHERE, DECLUTTER_LOCALLY, DEFAULT_SPACING, handler, lat, lon, name, origXLabelOffset, origYLabelOffset, x, xOffset, y, yOffset
 
Fields inherited from interface com.bbn.openmap.omGraphics.OMGraphicConstants
ADD_GRAPHIC_MASK, BASIC_STROKE, CHANGE_APPEARANCE, clear, DECIMAL_DEGREES, DECLUTTERTYPE_LINE, DECLUTTERTYPE_MOVE, DECLUTTERTYPE_NONE, DECLUTTERTYPE_SPACE, DEFAULT_ROTATIONANGLE, DELETE_GRAPHIC_MASK, DESELECT_GRAPHIC_MASK, DESELECTALL_GRAPHIC_MASK, GRAPHICTYPE_ARC, GRAPHICTYPE_BITMAP, GRAPHICTYPE_CIRCLE, GRAPHICTYPE_ELLIPSE, GRAPHICTYPE_GRAPHIC, GRAPHICTYPE_GRID, GRAPHICTYPE_LINE, GRAPHICTYPE_POINT, GRAPHICTYPE_POLY, GRAPHICTYPE_RASTER, GRAPHICTYPE_RECTANGLE, GRAPHICTYPE_TEXT, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, OMGRAPHIC_ELT, OMGRAPHIC_TYPE_ATTR, RADIANS, RAISE_GRAPHIC_MASK, RAISE_TO_TOP_GRAPHIC_MASK, REMOVABLE, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, RENDERTYPE_UNKNOWN, RENDERTYPE_XY, SELECT_GRAPHIC_MASK, SORT_GRAPHICS_MASK, TOOLTIP, UPDATE_GRAPHIC_MASK, UPDATED
 
Constructor Summary
Field()
          Creates a new instance of MapOb
Field(edu.stanford.smi.protege.model.Instance instance)
          Constructor of Spill object from Protege instance
 
Method Summary
static Field createField(java.lang.String label, java.lang.String latitude, java.lang.String longitude, java.lang.String lcolor, java.lang.String fcolor, java.lang.String north, java.lang.String south, java.lang.String east, java.lang.String west, java.lang.String[] params)
          Factory method for creating Drift object from string parameters.
 double getDLat()
          Latitude step
 double getDLon()
          Longitude step
 double getLat0()
          Starting lataitude
 int getLatCount()
          Number of latitudes
 double getLon0()
          Startin longitude
 int getLonCount()
          Number of longitudes
 double[][] getParameter(java.lang.String param)
          Return Data array for specific parameter
 java.util.Hashtable<java.lang.String,?> getParameters()
          Hashtable with all parameters
 void mapFromProtege(edu.stanford.smi.protege.model.Instance instance)
          Rewrite information from Protege Instance to this object.
 double[] moveLLPArray(double[] llp, long time)
          Moves Array of LatLonPoints with a help of this Field object on one step along the time
static double[] moveLLPArray(double[] llp, long time, double[][] speed, double[][] course, int nfi, int nla, double fi0, double la0, double dfi, double dla)
          Moves Array of LatLonPoints in radians
 void setParameters(java.util.Collection params, java.lang.String delim)
          Read data from cvs files and put them in Hashtable
 java.lang.String toString()
          Pretty print representation of this object
 
Methods inherited from class ru.igis.omtab.OMTRect
contains, contains, createOMTRect, setLine
 
Methods inherited from class ru.igis.omtab.MapOb
addLinkToMe, bearingsDeg, bearingsDeg, bearingsDeg, bearingsRad, coordFromProtege, createMapOb, distanceNM, distanceNM, distanceNM, getDeg, getDegMin, getDescription, getInstance, getLatitude, getLatitudeDM, getLeftPanel, getLinksToMe, getLongitude, getLongitudeDM, getToolTip, getWhoTows, hideLabel, mapToProtege, offTow, position, removeLinkToMe, setCourse, setDescription, setGraphicLocations, setLabelText, setLeftPanel, setLocation, setSpeed, setToolTip, setWhoTows, showLabel, showLeftPanel
 
Methods inherited from class com.bbn.openmap.layer.location.BasicLocation
setGraphicLocations, setGraphicLocations
 
Methods inherited from class com.bbn.openmap.layer.location.Location
convertCoordinateString, distance, generate, generate, getDeclutterLimit, getDetails, getHorizontalLabelBuffer, getLabel, getLocationHandler, getLocationMarker, getName, isAllowDecluttering, isShowLocation, isShowName, main, render, renderLocation, renderName, setAllowDecluttering, setDeclutterLimit, setDetails, setHorizontalLabelBuffer, setLabel, setLocation, setLocation, setLocation, setLocation, setLocationHandler, setLocationMarker, setLocationPaint, setName, setShowLocation, setShowName, showDetails
 
Methods inherited from class com.bbn.openmap.omGraphics.OMGraphicAdapter
clone, deselect, getDeclutterType, getDisplayColor, getDisplayPaint, getEdgeMatchesFill, getFillColor, getFillPaint, getHasLabel, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, isClear, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, restore, select, setDeclutterType, setFillColor, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLineColor, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelectColor, setSelected, setSelectPaint, setShape, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill
 
Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry
appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, clearAttributes, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, draw, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry
clearAttributes, distanceToEdge, draw, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setVisible
 

Constructor Detail

Field

public Field()
Creates a new instance of MapOb


Field

public Field(edu.stanford.smi.protege.model.Instance instance)
      throws java.lang.Exception
Constructor of Spill object from Protege instance

Parameters:
instance - - Protege Instance
Throws:
java.lang.Exception - -
Method Detail

createField

public static Field createField(java.lang.String label,
                                java.lang.String latitude,
                                java.lang.String longitude,
                                java.lang.String lcolor,
                                java.lang.String fcolor,
                                java.lang.String north,
                                java.lang.String south,
                                java.lang.String east,
                                java.lang.String west,
                                java.lang.String[] params)
                         throws java.lang.Exception
Factory method for creating Drift object from string parameters. Data for parameters must be in cvs files pointed by URLs.

Parameters:
label - - name of Field object
latitude - - latitude in form "DD MM.M"
longitude - - longitude in form "DD MM.M"
lcolor - - border line color in form "AARRGGBB"
fcolor - - fill color in form "AARRGGBB"
north - - bounding north latitude in form "DD MM.M"
south - - bounding south latitude in form "DD MM.M"
east - - bounding east longitude in form "DD MM.M"
west - - bounding west longitude in form "DD MM.M"
params - - each parameter in form "paramname paramURL"
Returns:
- new Field object
Throws:
java.lang.Exception - -

mapFromProtege

public void mapFromProtege(edu.stanford.smi.protege.model.Instance instance)
Rewrite information from Protege Instance to this object.

Specified by:
mapFromProtege in interface Protegian
Overrides:
mapFromProtege in class OMTRect
Parameters:
instance - - Protege instance

setParameters

public void setParameters(java.util.Collection params,
                          java.lang.String delim)
Read data from cvs files and put them in Hashtable

Parameters:
params - - Collection of parameters names
delim - - cvs-delimiter in parameters files (" " or "," or ":" or ";")

getParameters

public java.util.Hashtable<java.lang.String,?> getParameters()
Hashtable with all parameters

Returns:
- Hashtable with all parameters

getParameter

public double[][] getParameter(java.lang.String param)
Return Data array for specific parameter

Parameters:
param - - Name of parameter
Returns:
- Data array

getLat0

public double getLat0()
Starting lataitude

Returns:
- Latitude in degrees

getLon0

public double getLon0()
Startin longitude

Returns:
- Longitude in degrees

getDLat

public double getDLat()
Latitude step

Returns:
- step in degrees

getDLon

public double getDLon()
Longitude step

Returns:
- step in degrees

getLatCount

public int getLatCount()
Number of latitudes

Returns:
- number of latitudes

getLonCount

public int getLonCount()
Number of longitudes

Returns:
- number of longitudes

moveLLPArray

public static double[] moveLLPArray(double[] llp,
                                    long time,
                                    double[][] speed,
                                    double[][] course,
                                    int nfi,
                                    int nla,
                                    double fi0,
                                    double la0,
                                    double dfi,
                                    double dla)
Moves Array of LatLonPoints in radians

Parameters:
llp - -Array of latLonPoints (radians)
time - - time in hours
speed - -Matrix of speed (nfi X nla) (knots)
course - -Matrix of course (nfi X nla) (degrees)
nfi - -Dimension of matrix along Latitude
nla - -Dimension of matrix along Longitude
fi0 - -Begin (bottommost) Latitude (radians)
la0 - -Begin (leftmost) Longitude (radians)
dfi - -Step along Latitude (radians)
dla - -Step along Longitude (radians) -@return Array of LatLonPoints for new Location
Returns:
- array of data

moveLLPArray

public double[] moveLLPArray(double[] llp,
                             long time)
Moves Array of LatLonPoints with a help of this Field object on one step along the time

Parameters:
llp - - array of points
time - - time in hours
Returns:
- same array with new coordinates

toString

public java.lang.String toString()
Pretty print representation of this object

Overrides:
toString in class java.lang.Object
Returns:
- representation of this object