SegmentReference (API Reference)
Class SegmentReference
Reference to a segment id with a travel direction.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
Field Summary
FieldsModifier and TypeFieldDescriptionLocal ID of the segment inside the OCM tile.doubleThe end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment.doubleThe start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment.Topology segment id representing a unique identifier within the HERE platform catalogs.longHERE tile partition id (Morton-encoding + level indicator) of the segment.Travel direction of the segment. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance.SegmentReference(String segmentId) Creates a new instance.SegmentReference(String segmentId, TravelDirection travelDirection) Creates a new instance.SegmentReference(String segmentId, TravelDirection travelDirection, double offsetStart) Creates a new instance.SegmentReference(String segmentId, TravelDirection travelDirection, double offsetStart, double offsetEnd) Creates a new instance.SegmentReference(String segmentId, TravelDirection travelDirection, double offsetStart, double offsetEnd, long tilePartitionId) Creates a new instance.SegmentReference(String segmentId, TravelDirection travelDirection, double offsetStart, double offsetEnd, long tilePartitionId, Long localId) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic SegmentReferencefromString(String segmentRef) Returns an instance of this struct from a string if it's well-formatted,nullotherwise.inthashCode()
-
Field Details
-
segmentId
Topology segment id representing a unique identifier within the HERE platform catalogs.
-
travelDirection
Travel direction of the segment.
-
offsetStart
public double offsetStartThe start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
-
offsetEnd
public double offsetEndThe end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
-
tilePartitionId
public long tilePartitionIdHERE tile partition id (Morton-encoding + level indicator) of the segment. As in HERE Map Content.
-
localId
Local ID of the segment inside the OCM tile.
-
-
Constructor Details
-
SegmentReference
public SegmentReference()Creates a new instance.
-
SegmentReference
Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
-
SegmentReference
Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
-
SegmentReference
public SegmentReference(@NonNull String segmentId, @NonNull TravelDirection travelDirection, double offsetStart) Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
offsetStart-The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
-
SegmentReference
public SegmentReference(@NonNull String segmentId, @NonNull TravelDirection travelDirection, double offsetStart, double offsetEnd) Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
offsetStart-The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
offsetEnd-The end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
-
SegmentReference
public SegmentReference(@NonNull String segmentId, @NonNull TravelDirection travelDirection, double offsetStart, double offsetEnd, long tilePartitionId) Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
offsetStart-The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
offsetEnd-The end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
tilePartitionId-HERE tile partition id (Morton-encoding + level indicator) of the segment. As in HERE Map Content.
-
SegmentReference
public SegmentReference(@NonNull String segmentId, @NonNull TravelDirection travelDirection, double offsetStart, double offsetEnd, long tilePartitionId, @Nullable Long localId) Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
offsetStart-The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
offsetEnd-The end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
tilePartitionId-HERE tile partition id (Morton-encoding + level indicator) of the segment. As in HERE Map Content.
localId-Local ID of the segment inside the OCM tile.
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
fromString
Returns an instance of this struct from a string if it's well-formatted,
nullotherwise.- Parameters:
segmentRef-The string to parse
- Returns:
An instance of
SegmentReferencefrom a string if it's well-formatted,nullotherwise.
-