Package org.goplanit.gtfs.entity
Class GtfsStop
- java.lang.Object
-
- org.goplanit.gtfs.entity.GtfsObject
-
- org.goplanit.gtfs.entity.GtfsStop
-
public class GtfsStop extends GtfsObject
In memory representation of a GTFS entry in stops.txt.- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static EnumSet<GtfsKeyType>
SUPPORTED_KEYS
Supported keys for a GTFS stop instance
-
Constructor Summary
Constructors Constructor Description GtfsStop()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.locationtech.jts.geom.Coordinate
getLocationAsCoord()
Collect long (x), lat (y) as JTS coordinateorg.locationtech.jts.geom.Point
getLocationAsPoint()
Collect long (x), lat (y) as JTS PointStopLocationType
getLocationType()
Collect as StopLocationType enum directlyString
getLocationTypeRaw()
Collect raw location type dataString
getPlatformCode()
Collect platform codeString
getStopId()
Get the stop idString
getStopLatitude()
Latitude of the stop location if presentString
getStopLongitude()
Longitude of the stop location if presentString
getStopName()
EnumSet<GtfsKeyType>
getSupportedKeys()
All supported keys for this GTFS objectboolean
hasPlatformCode()
Check for populated platform codeboolean
hasStopName()
void
setLocationAsCoord(org.locationtech.jts.geom.Coordinate locationAsCoord)
update long (x), lat (y) based on JTS coordinateString
toString()
String of all key value pairs of this GTFS entity-
Methods inherited from class org.goplanit.gtfs.entity.GtfsObject
appendKeyValues, containsKey, get, put
-
-
-
-
Field Detail
-
SUPPORTED_KEYS
public static final EnumSet<GtfsKeyType> SUPPORTED_KEYS
Supported keys for a GTFS stop instance
-
-
Method Detail
-
getSupportedKeys
public EnumSet<GtfsKeyType> getSupportedKeys()
All supported keys for this GTFS object- Specified by:
getSupportedKeys
in classGtfsObject
- Returns:
- supported keys
-
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
-
-