Class SnapToRoadPoint

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

public final class SnapToRoadPoint extends Object
Represents a GPS track point for snap-to-road map matching.
  • Method Details

    • getCoord

      @NotNull public @NotNull Coordinate getCoord()
      Returns the geographic coordinate.
      Returns:
      the coordinate (never null)
    • getCompass

      @Nullable public @Nullable Integer getCompass()
      Returns the compass direction (0-360 degrees).
      Returns:
      the compass direction, or null if not set
    • getAngle

      @Nullable public @Nullable Integer getAngle()
      Returns the angle/heading.
      Returns:
      the angle, or null if not set
    • getSpeed

      @Nullable public @Nullable Integer getSpeed()
      Returns the speed in km/h.
      Returns:
      the speed, or null if not set
    • getAttribute

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

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

      @NotNull public static @NotNull SnapToRoadPoint of(double lat, double lng)
      Creates a simple point with only coordinates.
      Parameters:
      lat - the latitude
      lng - the longitude
      Returns:
      a new SnapToRoadPoint
    • of

      @NotNull public static @NotNull SnapToRoadPoint of(double lat, double lng, int speed)
      Creates a point with coordinates and speed.
      Parameters:
      lat - the latitude
      lng - the longitude
      speed - the speed in km/h
      Returns:
      a new SnapToRoadPoint
    • toString

      public String toString()
      Overrides:
      toString in class Object