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.GISRegion
- All Implemented Interfaces:
IGeographicSearchEntry
,AggregatableAnimationElement
,AnimationStaticLocationProvider
,INetworkMarkupElement
,INode<GISNode,
,GISRoute> SVGElement
,UsdElement
,Serializable
public class GISRegion extends GISNode
Geographic region in GIS space. Could be a part of a network.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
GISRegion | |
GISRegion | |
GISRegion |
Geographical region defined by a list of latitude-longitude coordinate pairs.
|
Modifier and Type | Method | Description |
---|---|---|
double | area() |
Returns the area of this region (measured in m2)
|
double | area |
Returns the area of this region (measured in @units)
|
boolean | contains |
Check this element contains a point with given coordinates.
|
com.bbn.openmap.omGraphics.OMGraphic | createOMGraphicObject() |
Deprecated.
|
void | doInitialize() | |
double | getNearestPoint |
Calculates (using the
output object) the point in this space markup element
nearest to the given point. |
double | getNearestPoint |
Calculates (using the
output object) the point in this space markup element
nearest to the given point. |
double[] | getPoints() |
Returns an array of decimal degree values
in format [lat1, lon1, lat2, lon2, ...
|
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). |
Point | randomPointInside |
Returns the randomly chosen point inside/along the given space markup element.
|
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 GISRegion(ShapeGISMap map, double[] latLonPairs)
Geographical region defined by a list of latitude-longitude coordinate pairs.
- Parameters:
map
- ShapeGISMap object for drawing elementlatLonPairs
- array of latitude-longitude coordinate pairs [latitude1, longitude1, latitude2, longitude2, ...]
public GISRegion(ShapeGISMap map, boolean isPermanent, double[] latitudes, double[] longitudes, Paint fillColor, Paint lineColor, double lineWidth, LineStyle linestyle, String title, double realArea)
public GISRegion(ShapeGISMap map, boolean isPermanent, double[] latLonPairs, Paint fillColor, Paint lineColor, double lineWidth, LineStyle linestyle, String title, double realArea)
public void doInitialize()
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:
public double getNearestPoint(double lat, double lon, Point out)
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:
lat
- latitude measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)lon
- longitude measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)out
- nearest point to given point in GIS region- Returns:
- the square of distance in meters to the nearest point
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
@AnyLogicInternalAPI @Deprecated public com.bbn.openmap.omGraphics.OMGraphic createOMGraphicObject()
Deprecated.
- Specified by:
createOMGraphicObject
in classGISMarkupElement
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 double area()
Returns the area of this region (measured in m2)
- Returns:
- the area of this region
public double area(AreaUnits units)
Returns the area of this region (measured in @units)
- Returns:
- the area of this region
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[] getPoints()
Returns an array of decimal degree values
in format [lat1, lon1, lat2, lon2, ... , latN, lonN]
where N is amount of points in this region.
- Returns:
- lat,lon array representing decimal degrees of points.