public class GISRegion extends GISNode
Constructor and Description |
---|
GISRegion(ShapeGISMap map,
boolean isPermanent,
double[] latitudes,
double[] longitudes,
java.awt.Paint fillColor,
java.awt.Paint lineColor,
double lineWidth,
LineStyle linestyle,
java.lang.String title,
double realArea) |
GISRegion(ShapeGISMap map,
boolean isPermanent,
double[] latLonPairs,
java.awt.Paint fillColor,
java.awt.Paint lineColor,
double lineWidth,
LineStyle linestyle,
java.lang.String title,
double realArea) |
GISRegion(ShapeGISMap map,
double[] latLonPairs)
Geographical region defined by a list of latitude-longitude coordinate pairs.
|
Modifier and Type | Method and Description |
---|---|
double |
area()
Returns the area of this region (measured in m2)
|
double |
area(AreaUnits units)
Returns the area of this region (measured in @units)
|
boolean |
contains(double lat,
double lon)
Check this element contains a point with given coordinates.
|
com.bbn.openmap.omGraphics.OMGraphic |
createOMGraphicObject()
Deprecated.
|
void |
doInitialize() |
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. |
double |
getNearestPoint(Point givenPoint,
Point out)
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, ... , latN, lonN]
where N is amount of points in this region.
|
Position |
getPosition(int index,
int totalNumber,
Position out)
Returns the item position with the given index.
|
Point |
randomPointInside(java.util.Random rng,
Point out)
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, getSVGId, initializeInternal, isPublic, isVisible, onAggregatorInitialized, removeSVGFromOwner, resetSVGState, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLineColor, getLineTexture, getName, setLineColor
getNetwork, getSpace, randomPointInside, randomPointInside, randomPointInside
getSpace
postInitialize
public GISRegion(ShapeGISMap map, double[] latLonPairs)
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, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle linestyle, java.lang.String title, double realArea)
public GISRegion(ShapeGISMap map, boolean isPermanent, double[] latLonPairs, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle linestyle, java.lang.String title, double realArea)
public void doInitialize()
public boolean contains(double lat, double lon)
INetworkMarkupElement
y
coordinate is the longitude of the current location,
measured in degrees (-180 ... (West) ... 0 ... (East) ... +180),lat
- the x coordinate of the given point.public double getNearestPoint(double lat, double lon, Point out)
output
object) the point in this space markup element
nearest to the given point. Returns the square of distance to the point.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 regionpublic double getNearestPoint(Point givenPoint, Point out)
INetworkMarkupElement
output
object) the point in this space markup element
nearest to the given point. Returns the square of distance to the point.givenPoint
- given pointout
- the output point to write result to.@AnyLogicInternalAPI @Deprecated public com.bbn.openmap.omGraphics.OMGraphic createOMGraphicObject()
createOMGraphicObject
in class GISMarkupElement
public Position getPosition(int index, int totalNumber, Position out)
AnimationStaticLocationProvider
index
- the index of some item positions, should be not negative and less than totalNumber
totalNumber
- the total number of item positions, should be positiveout
- output object to write to, may be null
public double area()
public double area(AreaUnits units)
public Point randomPointInside(java.util.Random rng, Point out)
INetworkMarkupElement
rng
- the random number generator.out
- output object to write to, may be null
public double[] getPoints()
Copyright © AnyLogic North America, LLC. All Rights Reserved.