Class GtfsZoningHandlerTransferZoneData
- java.lang.Object
-
- org.goplanit.gtfs.converter.GtfsConverterHandlerData
-
- org.goplanit.gtfs.converter.zoning.handler.GtfsZoningHandlerTransferZoneData
-
public class GtfsZoningHandlerTransferZoneData extends GtfsConverterHandlerData
Zoning handler data specifically tailored towards transfer zones- Author:
- markr
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
GtfsZoningHandlerTransferZoneData.GtfsStopIdToTransferZone
Function to hide implementation of mapping between GTFS Stop id and transfer zone
-
Constructor Summary
Constructors Constructor Description GtfsZoningHandlerTransferZoneData(ServiceNetwork serviceNetwork, GtfsZoningReaderSettings settings, Zoning referenceZoning)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<String,TransferZone>
createGtfsStopToTransferZonesMappingFunction()
Create mapping function while hiding how the mapping is storedorg.locationtech.jts.index.quadtree.Quadtree
getGeoIndexedPreExistingTransferZones()
Get all the geo indexed transfer zones as a quad treeGtfsStop
getMappedGtfsStop(String gtfsStopId)
Retrieve a GTFS stop that has been mapped to a pre-existing PLANit transfer zoneTransferZone
getMappedTransferZone(GtfsStop gtfsStop)
Get the transfer zone that the GTFS stop was already mapped to (if any)Map<String,TransferZone>
getPreExistingTransferZonesByExternalId()
Get all the existing transfer zones by their external idSet<Mode>
getSupportedPtModesIn(TransferZone planitTransferZone, Set<Mode> modesFilter)
The pt services modes supported on the given transfer zoneSet<DirectedConnectoid>
getTransferZoneConnectoids(TransferZone transferZone)
Connectoids related to Pt activated modes available for this transfer zoneboolean
hasMappedGtfsStop(TransferZone transferZone)
Check if transfer zone already has a mapped GTFS stopvoid
registerMappedGtfsStop(GtfsStop gtfsStop, TransferZone transferZone)
Register transfer as mapped to a GTFS stop, index it by its GtfsStopId, and register the stops as mappedvoid
registerTransferZoneToConnectoidModes(TransferZone transferZone, DirectedConnectoid directedConnectoid, Collection<Mode> activatedPlanitModes)
Update registered and activated pt modes and their access information on transfer zonevoid
reset()
Reset the PLANit data tracking containers-
Methods inherited from class org.goplanit.gtfs.converter.GtfsConverterHandlerData
expandWithCompatibleModes, getActivatedPlanitModesByGtfsMode, getCompatiblePlanitModesIfActivated, getCompatiblePlanitModesIfActivated, getPrimaryPlanitModeIfActivated, getServiceNetwork, getSettings
-
-
-
-
Constructor Detail
-
GtfsZoningHandlerTransferZoneData
public GtfsZoningHandlerTransferZoneData(ServiceNetwork serviceNetwork, GtfsZoningReaderSettings settings, Zoning referenceZoning)
Constructor- Parameters:
serviceNetwork
- to usesettings
- to usereferenceZoning
- to use
-
-
Method Detail
-
reset
public void reset()
Reset the PLANit data tracking containers
-
registerMappedGtfsStop
public void registerMappedGtfsStop(GtfsStop gtfsStop, TransferZone transferZone)
Register transfer as mapped to a GTFS stop, index it by its GtfsStopId, and register the stops as mapped- Parameters:
gtfsStop
- to register on PLANit transfer zonetransferZone
- to register one
-
getMappedTransferZone
public TransferZone getMappedTransferZone(GtfsStop gtfsStop)
Get the transfer zone that the GTFS stop was already mapped to (if any)- Parameters:
gtfsStop
- to use- Returns:
- PLANit transfer zone it is mapped to, null if no mapping exists yet
-
hasMappedGtfsStop
public boolean hasMappedGtfsStop(TransferZone transferZone)
Check if transfer zone already has a mapped GTFS stop- Parameters:
transferZone
- to check- Returns:
- true when already mapped by GTFS stop, false otherwise
-
getMappedGtfsStop
public GtfsStop getMappedGtfsStop(String gtfsStopId)
Retrieve a GTFS stop that has been mapped to a pre-existing PLANit transfer zone- Parameters:
gtfsStopId
- to use- Returns:
- found GTFS stop (if any)
-
getSupportedPtModesIn
public Set<Mode> getSupportedPtModesIn(TransferZone planitTransferZone, Set<Mode> modesFilter)
The pt services modes supported on the given transfer zone- Parameters:
planitTransferZone
- to get supported pt service modes formodesFilter
- to select from- Returns:
- found PLANit modes
-
registerTransferZoneToConnectoidModes
public void registerTransferZoneToConnectoidModes(TransferZone transferZone, DirectedConnectoid directedConnectoid, Collection<Mode> activatedPlanitModes)
Update registered and activated pt modes and their access information on transfer zone- Parameters:
transferZone
- to update fordirectedConnectoid
- to extract access information fromactivatedPlanitModes
- supported modes
-
getTransferZoneConnectoids
public Set<DirectedConnectoid> getTransferZoneConnectoids(TransferZone transferZone)
Connectoids related to Pt activated modes available for this transfer zone- Parameters:
transferZone
- to extract for- Returns:
- known connectoids
-
getGeoIndexedPreExistingTransferZones
public org.locationtech.jts.index.quadtree.Quadtree getGeoIndexedPreExistingTransferZones()
Get all the geo indexed transfer zones as a quad tree- Returns:
- registered geo indexed transfer zones
-
getPreExistingTransferZonesByExternalId
public Map<String,TransferZone> getPreExistingTransferZonesByExternalId()
Get all the existing transfer zones by their external id- Returns:
- existing transfer zones by external id
-
createGtfsStopToTransferZonesMappingFunction
public Function<String,TransferZone> createGtfsStopToTransferZonesMappingFunction()
Create mapping function while hiding how the mapping is stored- Returns:
- function that can map GTFS stop ids to transfer zones based on internal state of this data tracker
-
-