Class SnapToRoadSegment
java.lang.Object
com.cercalia.sdk.model.snaptoroad.SnapToRoadSegment
Represents a road segment from snap-to-road map matching.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for SnapToRoadSegment. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull SnapToRoadSegment.Builderbuilder()Creates a new builder for SnapToRoadSegment.@Nullable StringReturns the grouping attribute for this segment.doubleReturns the distance of this segment in kilometers.@Nullable BooleanReturns whether speeding was detected in this segment.@Nullable IntegerReturns the speeding level (severity) for this segment.@NotNull StringgetWkt()Returns the WKT geometry of the matched road segment.toString()
-
Method Details
-
getWkt
Returns the WKT geometry of the matched road segment.- Returns:
- the WKT geometry (never null)
-
getDistance
public double getDistance()Returns the distance of this segment in kilometers.- Returns:
- the distance in km
-
getAttribute
Returns the grouping attribute for this segment.- Returns:
- the attribute, or null if not set
-
getSpeeding
Returns whether speeding was detected in this segment.- Returns:
- true if speeding, false if not, null if speeding detection was not enabled
-
getSpeedingLevel
Returns the speeding level (severity) for this segment.- Returns:
- the speeding level (0-3+), or null if no speeding
-
builder
Creates a new builder for SnapToRoadSegment.- Returns:
- a new Builder instance
-
toString
-