public class MapOb extends com.bbn.openmap.layer.location.BasicLocation implements Protegian
Modifier and Type | Field and Description |
---|---|
static java.text.DecimalFormat |
df
Decimal format for representation of minutes
|
DECLUTTER_ANYWHERE, DECLUTTER_LOCALLY, DEFAULT_SPACING, handler, lat, lon, name, origXLabelOffset, origYLabelOffset, x, xOffset, y, yOffset
ADD_GRAPHIC_MASK, APP_OBJECT, 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, INDEX, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, NO_ROTATE, 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 and Description |
---|
MapOb()
Creates a new instance of MapOb
|
MapOb(edu.stanford.smi.protege.model.Instance instance)
Creates Map Object from the Protege Instance
|
Modifier and Type | Method and Description |
---|---|
void |
addLinkToMe(Link link) |
double |
bearingsDeg(double lat,
double lon)
Bearings from this Map object on the some point
|
static double |
bearingsDeg(double lat1,
double lon1,
double lat2,
double lon2)
Bearings from the first point onto the second point in degrees
|
double |
bearingsDeg(MapOb mo)
Bearings in degrees from this Map Object on the other Map Object
|
static double |
bearingsRad(double lat1,
double lon1,
double lat2,
double lon2)
Bearings from the first point onto the second point in radians
|
void |
coordFromProtege(edu.stanford.smi.protege.model.Instance instance)
Set location of this Map Object to coordinates from Protege Instance
|
static MapOb |
createMapOb(java.lang.String label,
java.lang.String latitude,
java.lang.String longitude)
Fabric method for the Map Object creation
|
double |
distanceNM(double lat,
double lon)
Distance from this Map Object to the some point
|
static double |
distanceNM(double lat1,
double lon1,
double lat2,
double lon2)
Distance in nautical miles beetwin to points
|
double |
distanceNM(MapOb mo)
Distance in nautical miles from this Map Object on the other Map Object
|
static double |
getDeg(java.lang.String degmin)
Convert string "deg min" in double degrees
|
static java.lang.String |
getDegMin(double deg)
Convert double degrees to "deg min" representation
|
java.lang.String |
getDescription() |
edu.stanford.smi.protege.model.Instance |
getDescriptionInstance() |
edu.stanford.smi.protege.model.Instance |
getInstance()
Corresponding to this Map Object Protege Instance
|
double |
getLatitude()
Latitude of this Map Object as double value
|
java.lang.String |
getLatitudeDM()
Get string representation of Latitude in degrees and minutes
|
java.util.Collection<Link> |
getLinksToMe() |
double |
getLongitude()
Longitude of this Map Object as double value
|
java.lang.String |
getLongitudeDM()
Get string representation of Longitude in degrees and minutes
|
int |
getPgid() |
java.lang.String |
getToolTip() |
NavOb |
getWhoTows() |
void |
hideLabel() |
void |
mapFromProtege(edu.stanford.smi.protege.model.Instance instance)
Rewrite information from Protege Instance to this object.
|
void |
mapToProtege(edu.stanford.smi.protege.model.Instance instance)
Send back to Protege Instance information from this Map Object
|
void |
offTow() |
double[] |
position(double az,
double dist)
Position near (or far) from this Map Object
|
void |
removeLinkToMe(Link link) |
void |
setDescription(java.lang.String d) |
void |
setDescriptionInstance(edu.stanford.smi.protege.model.Instance d) |
void |
setGraphicLocations(double latitude,
double longitude)
Standard Openmap method for setting location of this Map Object
|
void |
setLabelText(java.lang.String text) |
void |
setLocation(java.lang.String dmlat,
java.lang.String dmlon)
Change coordinates of this Map object from the string representation in degrees and minutes:
"deg min"
|
void |
setToolTip(java.lang.String d) |
void |
setWhoTows(NavOb whoTows) |
void |
showLabel() |
setGraphicLocations, setGraphicLocations
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
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, setLabelLocation, setLineColor, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelectColor, setSelected, setSelectPaint, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill
appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, clearAttributes, contains, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearAttributes, contains, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible
public static java.text.DecimalFormat df
public MapOb()
public MapOb(edu.stanford.smi.protege.model.Instance instance) throws java.lang.Exception
instance
- - Protege instancejava.lang.Exception
- -public int getPgid()
public void setLabelText(java.lang.String text)
public static MapOb createMapOb(java.lang.String label, java.lang.String latitude, java.lang.String longitude) throws java.lang.Exception
label
- - name of Map Objectlatitude
- -longitude
- -java.lang.Exception
- -public edu.stanford.smi.protege.model.Instance getInstance()
public void coordFromProtege(edu.stanford.smi.protege.model.Instance instance) throws java.lang.Exception
instance
- - Protege Instancejava.lang.Exception
- - plainpublic void mapFromProtege(edu.stanford.smi.protege.model.Instance instance)
mapFromProtege
in interface Protegian
instance
- - Protege Instancepublic void mapToProtege(edu.stanford.smi.protege.model.Instance instance)
mapToProtege
in interface Protegian
instance
- - Protege Instancepublic double getLatitude()
public double getLongitude()
public void setLocation(java.lang.String dmlat, java.lang.String dmlon) throws java.lang.Exception
dmlat
- - Latitude as "deg min"dmlon
- - Longitude as "deg min"java.lang.Exception
- - plainpublic java.lang.String getLatitudeDM()
public java.lang.String getLongitudeDM()
public static double distanceNM(double lat1, double lon1, double lat2, double lon2)
lat1
- - Latitude 1 in degreeslon1
- - Longitude 1 in degreeslat2
- - Latitude 2 in degreeslon2
- - Longitude 2 in degreespublic static double bearingsRad(double lat1, double lon1, double lat2, double lon2)
lat1
- - Latitude 1 in degreeslon1
- - Longitude 1 in degreeslat2
- - Latitude 2 in degreeslon2
- - Longitude 2 in degreespublic static double bearingsDeg(double lat1, double lon1, double lat2, double lon2)
lat1
- - Latitude 1 in degreeslon1
- - Longitude 1 in degreeslat2
- - Latitude 2 in degreeslon2
- - Longitude 2 in degreespublic double distanceNM(MapOb mo)
mo
- - other Map Objectpublic double bearingsDeg(MapOb mo)
mo
- - other Map Objectpublic double distanceNM(double lat, double lon)
lat
- - Latitude of thr point in degreeslon
- - Longitude of thr point in degreespublic double bearingsDeg(double lat, double lon)
lat
- - Latitude of the point in degreeslon
- - Longitude of the point in degreespublic double[] position(double az, double dist)
az
- - azimuth of the position in degreesdist
- - Distance of the position in NMpublic static double getDeg(java.lang.String degmin) throws java.lang.Exception
degmin
- - "deg min"java.lang.Exception
- - if format is'nt correctpublic static java.lang.String getDegMin(double deg)
deg
- - degreespublic void setGraphicLocations(double latitude, double longitude)
setGraphicLocations
in class com.bbn.openmap.layer.location.BasicLocation
latitude
- - Latitude in degreeslongitude
- - Longitude in degreespublic void hideLabel()
public void showLabel()
public java.lang.String getDescription()
getDescription
in interface com.bbn.openmap.omGraphics.OMGeometry
getDescription
in class com.bbn.openmap.omGraphics.geom.BasicGeometry
public void setDescription(java.lang.String d)
public edu.stanford.smi.protege.model.Instance getDescriptionInstance()
public void setDescriptionInstance(edu.stanford.smi.protege.model.Instance d)
public NavOb getWhoTows()
public void setWhoTows(NavOb whoTows)
public void offTow()
public void addLinkToMe(Link link)
public void removeLinkToMe(Link link)
public java.util.Collection<Link> getLinksToMe()
public java.lang.String getToolTip()
public void setToolTip(java.lang.String d)