Package com.anylogic.engine.markup
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.GISNode
- Methods inherited from class com.anylogic.engine.markup.GISMarkupElement
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkup
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.markup.AnimationStaticLocationProvider
- Methods inherited from interface com.anylogic.engine.markup.INetworkMarkupElement
- Methods inherited from interface com.anylogic.engine.markup.INode
- Constructor Details
- Method Details
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.GISMarkupElement
- com.anylogic.engine.markup.GISNode
- com.anylogic.engine.markup.GISPoint
- All Implemented Interfaces:
IGeographicSearchEntry
,AggregatableAnimationElement
,AnimationStaticLocationProvider
,INetworkMarkupElement
,INode<GISNode,
,GISRoute> SVGElement
,UsdElement
,Serializable
public class GISPoint extends GISNode
- See Also:
- Serialized Form
Constructor | Description |
---|---|
GISPoint | |
GISPoint | |
GISPoint |
Modifier and Type | Method | Description |
---|---|---|
boolean | contains |
Check this element contains a point with given coordinates.
|
com.bbn.openmap.omGraphics.OMGraphic | createOMGraphicObject() |
Deprecated.
|
double | distance |
Calculates distance from this point to another.
|
double | distance |
Calculates distance from this point to another.
|
double | distance |
Calculates distance from this point to another.
|
double | distance |
Calculates distance from this point to another.
|
double | getLatitude() |
Returns the latitude of this gis point
|
Point | getLocation() |
Returns the (latitude, longidute) of this GIS point
|
Point | getLocation |
Returns the (latitude, longidute) of this GIS point, uses the given
out instance, if not null |
double | getLongitude() |
Returns the longitude of this gis point
|
double | getNearestPoint | |
double | getNearestPoint |
Calculates (using the
output object) the point in this space markup element
nearest to the given point. |
Position | getPosition |
Returns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1). |
double | getRadius() |
Returns radius of the circle of this GIS point
|
Point | randomPointInside |
Returns the randomly chosen point inside/along the given space markup element.
|
void | setRadius |
Dynamically changes radius of GISPoint
|
String | toString() |
addConnection, getCompatibleAgentExtensionClass, getConnection, getConnectionsCount, getFillColor, getFillTexture, getTitle, getTransferDistance, getTransferPositionByPercent, setFillColor, setTitle
discardOwner, error, getFromOMGraphic, getLineColor, getLineStyle, getLineTexture, getLineWidth, getNetwork, getOmGraphic, getSpace, initialize, onAggregatorVisibilityChanged, remove, setLineColor, setLineStyle, setLineWidth, setOwner, setVisible
executeUserAction, findSVGElement, getDrawMode, getName, getOrGenerateUSDId, getSVGId, initializeInternal, isPublic, isVisible, onAggregatorInitialized, removeSVGFromOwner, resetSVGState, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
public GISPoint(ShapeGISMap map, boolean isPermanent, double latitude, double longitude)
public GISPoint(ShapeGISMap map, double latitude, double longitude)
public GISPoint(ShapeGISMap map, boolean isPermanent, double latitude, double longitude, double radius, Paint fillColor, Paint lineColor, double linewidth, LineStyle lineStyle, String title)
public double getLatitude()
Returns the latitude of this gis point
- Returns:
- point latitude
public double getLongitude()
Returns the longitude of this gis point
- Returns:
- point longitude
public double getNearestPoint(double lat, double lon, Point out)
- Parameters:
latitude
-longitude
-out
-- Returns:
- distance, in meters.
public double getNearestPoint(Point givenPoint, Point out)
Description copied from interface:
INetworkMarkupElement
Calculates (using the
output
object) the point in this space markup element
nearest to the given point. Returns the square of distance to the point.- Parameters:
givenPoint
- given pointout
- the output point to write result to.- Returns:
- the square of distance to the nearest point
public boolean contains(double lat, double lon)
Description copied from interface:
INetworkMarkupElement
Check this element contains a point with given coordinates.
measured in degrees (-90 ... (South) ... 0 ... (North) ... +90),
y
coordinate is the longitude of the current location,
measured in degrees (-180 ... (West) ... 0 ... (East) ... +180),- Parameters:
lat
- the x coordinate of the given point.
In case of GIS environment this is the longitude of the given point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)- Returns:
@AnyLogicInternalAPI @Deprecated public com.bbn.openmap.omGraphics.OMGraphic createOMGraphicObject()
Deprecated.
- Specified by:
createOMGraphicObject
in classGISMarkupElement
public Point getLocation()
Returns the (latitude, longidute) of this GIS point
- Returns:
- the (latitude, longidute) of this GIS point
public Point getLocation(Point out)
Returns the (latitude, longidute) of this GIS point, uses the given
out
instance, if not null
- Parameters:
out
- the Point object to write to, may benull
- Returns:
- the (latitude, longidute) of this GIS point
public Position getPosition(int index, int totalNumber, Position out)
Description copied from interface:
AnimationStaticLocationProvider
Returns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
- Parameters:
index
- the index of some item positions, should be not negative and less thantotalNumber
totalNumber
- the total number of item positions, should be positiveout
- output object to write to, may benull
- Returns:
- the Position object with coordinates of the requested item position
public void setRadius(double radius)
Dynamically changes radius of GISPoint
- Parameters:
radius
- measured in pixels
public double getRadius()
Returns radius of the circle of this GIS point
- Returns:
- radius measured in pixels
public Point randomPointInside(Random rng, Point out)
Description copied from interface:
INetworkMarkupElement
Returns the randomly chosen point inside/along the given space markup element.
This method utilises the given Random Number Generator.
- Parameters:
rng
- the random number generator.out
- output object to write to, may benull
- Returns:
- the randomly chosen point
public double distance(double latitude, double longitude)
Calculates distance from this point to another.
- Parameters:
latitude
-longitude
-- Returns:
- distance in meters
public double distance(double latitude, double longitude, LengthUnits units)
Calculates distance from this point to another.
- Parameters:
latitude
-longitude
-units
- the units of length- Returns:
- distance in given length units
public double distance(GISPoint givenPoint)
Calculates distance from this point to another.
- Parameters:
givenPoint
-- Returns:
- distance in meters
public double distance(GISPoint givenPoint, LengthUnits units)
Calculates distance from this point to another.
- Parameters:
givenPoint
-units
- the units of length- Returns:
- distance in given length units
public String toString()