Class GtfsStop


  • public class GtfsStop
    extends GtfsObject
    In memory representation of a GTFS entry in stops.txt.
    Author:
    markr
    • Field Detail

      • SUPPORTED_KEYS

        public static final EnumSet<GtfsKeyType> SUPPORTED_KEYS
        Supported keys for a GTFS stop instance
    • Constructor Detail

      • GtfsStop

        public GtfsStop()
    • Method Detail

      • getStopId

        public String getStopId()
        Get the stop id
        Returns:
        stop id
      • getStopName

        public String getStopName()
      • hasStopName

        public boolean hasStopName()
        Returns:
        true when stop name is not null or blank, false otherwise
      • hasPlatformCode

        public boolean hasPlatformCode()
        Check for populated platform code
        Returns:
        true when present false otherwise
      • getPlatformCode

        public String getPlatformCode()
        Collect platform code
        Returns:
        platform code
      • getLocationType

        public StopLocationType getLocationType()
        Collect as StopLocationType enum directly
        Returns:
        extracted stop location type if valid, null otherwise
      • getLocationTypeRaw

        public String getLocationTypeRaw()
        Collect raw location type data
        Returns:
        location type value
      • getStopLatitude

        public String getStopLatitude()
        Latitude of the stop location if present
        Returns:
        latitude
      • getStopLongitude

        public String getStopLongitude()
        Longitude of the stop location if present
        Returns:
        latitude
      • getLocationAsCoord

        public org.locationtech.jts.geom.Coordinate getLocationAsCoord()
        Collect long (x), lat (y) as JTS coordinate
        Returns:
        coordinate
      • setLocationAsCoord

        public void setLocationAsCoord​(org.locationtech.jts.geom.Coordinate locationAsCoord)
        update long (x), lat (y) based on JTS coordinate
        Parameters:
        locationAsCoord - to use
      • getLocationAsPoint

        public org.locationtech.jts.geom.Point getLocationAsPoint()
        Collect long (x), lat (y) as JTS Point
        Returns:
        point
      • toString

        public String toString()
        String of all key value pairs of this GTFS entity
        Overrides:
        toString in class Object
        Returns:
        string