public abstract class SurfaceSegment extends DefinitionalObject
RouteSegment
.Modifier  Constructor and Description 

protected 
SurfaceSegment()
Initializes a new instance.

protected 
SurfaceSegment(Ellipsoid shape,
double surfaceDistance)
Create a new instance with the given surface shape and total distance.

protected 
SurfaceSegment(SurfaceSegment otherInstance)
Create a new instance based on an existing one.

protected 
SurfaceSegment(SurfaceSegment existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.

Modifier and Type  Method and Description 

protected boolean 
checkForSameDefinition(DefinitionalObject other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. 
protected abstract boolean 
checkForSameDefinition(SurfaceSegment other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. 
protected CartographicExtent 
computeCartographicExtent()
Computes the latitude and longitude boundary surrounding this segment.

protected int 
computeCurrentDefinitionHashCode()
Computes a hash code based on the current properties of this object.

EllipsoidSurfaceCurve 
createSurfaceCurve()
Create an
EllipsoidSurfaceCurve which represents this segment of a route along the surface. 
double 
getFinalHeading()
Gets the final heading measured eastward from north, in radians.

Cartographic 
getFinalSurfacePoint()
Gets the final position at the end of the surface segment.

double 
getHeading(double distanceAlongPath)
Get the heading measured clockwise from local north, in radians.

abstract Motion1<Double> 
getHeading(Motion1<Double> distanceAlongPath,
int order)
Get the heading and its derivatives, in radians and radians/meter.

double 
getInitialHeading()
Gets the initial heading measured eastward from north, in radians.

Cartographic 
getInitialSurfacePoint()
Gets the initial position at the start of the surface segment.

double 
getSurfaceDistance()
Gets the total arc length along the surface path, in meters.

Ellipsoid 
getSurfaceShape()
Gets the shape of the surface upon which the path is defined.

abstract double[] 
getTransitionPoints()
Gets the arc lengths, in meters, at which the geometry changes behavior.

boolean 
isSameDefinition(SurfaceSegment other)
Determines if this object has the same definition as another object.

protected void 
setSurfaceDistance(double value)
Sets the total arc length along the surface path, in meters.

protected void 
setSurfaceShape(Ellipsoid value)
Sets the shape of the surface upon which the path is defined.

Cartesian 
traverseFixed(double distanceAlongPath)

abstract Cartographic 
traverseSurface(double distanceAlongPath)
Get the surface position at the specified distance along the surface path.

areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, clone, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, enumerateDependencies, freeze, freezeAggregatedObjects, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozen
protected SurfaceSegment()
protected SurfaceSegment(Ellipsoid shape, double surfaceDistance)
shape
 The shape of the surface upon which this segment is defined.surfaceDistance
 The total distance along the surface path, in meters.protected SurfaceSegment(@Nonnull SurfaceSegment otherInstance)
otherInstance
 The other instance to copy.protected SurfaceSegment(@Nonnull SurfaceSegment existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext)
for more information about how to implement this constructor
in a derived class.
existingInstance
 The existing instance to copy.context
 A CopyContext
that controls the depth of the copy.ArgumentNullException
 Thrown when existingInstance
or context
is null
.protected final boolean checkForSameDefinition(DefinitionalObject other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derivedclass instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.checkForSameDefinition
in class DefinitionalObject
other
 The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected abstract boolean checkForSameDefinition(SurfaceSegment other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derivedclass instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.other
 The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected int computeCurrentDefinitionHashCode()
SurfaceSegment.checkForSameDefinition(agi.foundation.infrastructure.DefinitionalObject)
method.computeCurrentDefinitionHashCode
in class DefinitionalObject
public final boolean isSameDefinition(SurfaceSegment other)
This method is very similar to Object.equals(Object)
except that it explicitly considers
the "definitions" of the two objects for objects that do not typically act like values. The definition of
an object typically includes all of the fields of the object.
other
 The other instance to compare to this one.true
if this object has the same definition as the specified one.
false
if the other object is null
, a different type
than this one, or if this object and the specified one have different definitions.@Nonnull public Cartesian traverseFixed(double distanceAlongPath)
SurfaceShape
(get
/ set
) at the
specified distance along the surface path.distanceAlongPath
 The distance along the path, in meters.@Nonnull public abstract Cartographic traverseSurface(double distanceAlongPath)
distanceAlongPath
 The distance along the surface path, in meters.Cartographic
position at the given distance along the path.public double getHeading(double distanceAlongPath)
distanceAlongPath
 The distance along the surface path, in meters.@Nonnull public abstract Motion1<Double> getHeading(@Nonnull Motion1<Double> distanceAlongPath, int order)
Note that the units for the derivatives here are in radians and meters. To get the time rates of change of heading, use the chain rule with the time rate of change of the arc length parameter.
distanceAlongPath
 The distance along the surface path, in meters.order
 The requested order indicating the number of derivatives to compute.public final Ellipsoid getSurfaceShape()
protected final void setSurfaceShape(Ellipsoid value)
public final double getSurfaceDistance()
protected final void setSurfaceDistance(double value)
@Nonnull public abstract double[] getTransitionPoints()
@Nonnull public Cartographic getInitialSurfacePoint()
@Nonnull public Cartographic getFinalSurfacePoint()
public double getInitialHeading()
public double getFinalHeading()
@Nonnull public EllipsoidSurfaceCurve createSurfaceCurve()
EllipsoidSurfaceCurve
which represents this segment of a route along the surface.@Nonnull protected CartographicExtent computeCartographicExtent()
CartographicExtent
that bounds this surface segment.