AnyLogic
Expand
Font size
All Implemented Interfaces:
IMarkupSegment, Serializable
Direct Known Subclasses:
GISMarkupSegmentLine

public abstract class GISMarkupSegment
extends AbstractMarkupSegment
Markup segment for GIS space.
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Method Summary

Modifier and TypeMethodDescription
doublelength()
Returns the length of the path segment
final voidsetEnd(double lat, double lon)
Sets the end point of this GIS segment.
voidsetEnd(Point endPoint)
Sets end point of this segment.
final voidsetStart(double lat, double lon)
Sets the starting point of this GIS segment.
voidsetStart(Point startPoint)
Sets start point of this segment.
final voidsetStartNextTo(IMarkupSegment previousSegment)
Sets coordinates of the end of the specified segment as start coordinates of this segment.

Methods inherited from class com.anylogic.engine.markup.AbstractMarkupSegment

getAngle, getEnd, getStart, is2D, length2D

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.IMarkupSegment

addTo, getDistanceSq, getEnd, getNearestPoint, getNearestPointOnRay2D, getOffsetOfPoint, getStart

Method Details

setStartNextTo

public final void setStartNextTo(IMarkupSegment previousSegment)
Description copied from interface: IMarkupSegment
Sets coordinates of the end of the specified segment as start coordinates of this segment.
Parameters:
previousSegment - implementation of IMarkupSegment

setStart

public final void setStart(double lat,
 double lon)
Sets the starting point of this GIS segment. The segment should be uninitialized
Parameters:
lat - latitude
lon - longitude

setEnd

public final void setEnd(double lat,
 double lon)
Sets the end point of this GIS segment. The segment should be uninitialized
Parameters:
lat - latitude
lon - longitude

setStart

public void setStart(Point startPoint)
Description copied from interface: IMarkupSegment
Sets start point of this segment.
Parameters:
startPoint - the point to set as start point of this segment

setEnd

public void setEnd(Point endPoint)
Description copied from interface: IMarkupSegment
Sets end point of this segment.
Parameters:
endPoint - the point to set as end point of this segment

length

public double length()
Description copied from class: AbstractMarkupSegment
Returns the length of the path segment
Specified by:
length in interface IMarkupSegment
Overrides:
length in class AbstractMarkupSegment
Returns:
the length of the path segment, a positive number