Class SnapToRoadSegment

java.lang.Object
com.cercalia.sdk.model.snaptoroad.SnapToRoadSegment

public final class SnapToRoadSegment extends Object
Represents a road segment from snap-to-road map matching.
  • Method Details

    • getWkt

      @NotNull public @NotNull String 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

      @Nullable public @Nullable String getAttribute()
      Returns the grouping attribute for this segment.
      Returns:
      the attribute, or null if not set
    • getSpeeding

      @Nullable public @Nullable Boolean getSpeeding()
      Returns whether speeding was detected in this segment.
      Returns:
      true if speeding, false if not, null if speeding detection was not enabled
    • getSpeedingLevel

      @Nullable public @Nullable Integer getSpeedingLevel()
      Returns the speeding level (severity) for this segment.
      Returns:
      the speeding level (0-3+), or null if no speeding
    • builder

      @NotNull public static @NotNull SnapToRoadSegment.Builder builder()
      Creates a new builder for SnapToRoadSegment.
      Returns:
      a new Builder instance
    • toString

      public String toString()
      Overrides:
      toString in class Object