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_KEYSSupported 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.CoordinategetLocationAsCoord()Collect long (x), lat (y) as JTS coordinateorg.locationtech.jts.geom.PointgetLocationAsPoint()Collect long (x), lat (y) as JTS PointStopLocationTypegetLocationType()Collect as StopLocationType enum directlyStringgetLocationTypeRaw()Collect raw location type dataStringgetPlatformCode()Collect platform codeStringgetStopId()Get the stop idStringgetStopLatitude()Latitude of the stop location if presentStringgetStopLongitude()Longitude of the stop location if presentStringgetStopName()EnumSet<GtfsKeyType>getSupportedKeys()All supported keys for this GTFS objectbooleanhasPlatformCode()Check for populated platform codebooleanhasStopName()voidsetLocationAsCoord(org.locationtech.jts.geom.Coordinate locationAsCoord)update long (x), lat (y) based on JTS coordinateStringtoString()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:
getSupportedKeysin 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
-
-