Class GtfsZoningReader
- java.lang.Object
-
- org.goplanit.gtfs.converter.zoning.GtfsZoningReader
-
- All Implemented Interfaces:
ConverterEntity
,ConverterReader<Zoning>
,ZoningReader
public class GtfsZoningReader extends Object implements ZoningReader
Parse GTFS input in supplement or populate a PLANit zoning instance with the parsed/matched GTFS entities. In case an existing zoning instance is provided, the GTFS will supplement the existing public transport infrastructure where possible, while if the zoning is empty it will create new entries for each of the found transfer zones (pt stops etc).- Author:
- markr
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GtfsZoningReader(GtfsZoningReaderSettings settings, Zoning zoningToPopulate)
Constructor.protected
GtfsZoningReader(GtfsZoningReaderSettings settings, Zoning zoningToPopulate, ServiceNetwork serviceNetwork, RoutedServices routedServices)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<String,TransferZone>
getGtfsStopIdToTransferZoneMapping()
Provide mapping between GTFS Stop id and its found/created PLANit transfer zone (if any)GtfsZoningReaderSettings
getSettings()
Collect the settings which can be used to configure the readerZoning
read()
Parse a GTFS files and convert it into a PLANit Zoning instance, or supplement the transfer zones of an already existing instance given the configuration options that have been setvoid
reset()
reset the reader to allow for marking unnecessary resources for garbage collection-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.converter.zoning.ZoningReader
getTypeDescription
-
-
-
-
Constructor Detail
-
GtfsZoningReader
protected GtfsZoningReader(GtfsZoningReaderSettings settings, Zoning zoningToPopulate)
Constructor. Requires user to set reference network and networkToZoning data manually afterwards- Parameters:
settings
- to usezoningToPopulate
- zoning to populate
-
GtfsZoningReader
protected GtfsZoningReader(GtfsZoningReaderSettings settings, Zoning zoningToPopulate, ServiceNetwork serviceNetwork, RoutedServices routedServices)
Constructor.- Parameters:
settings
- to usezoningToPopulate
- zoning to populateserviceNetwork
- the compatible PLANit service network that is assumed to have been constructed from the same GTFS source files as this zoning reader will useroutedServices
- the compatible PLANit routed services that is assumed to have been constructed from the same GTFS source files as this zoning reader will use
-
-
Method Detail
-
read
public Zoning read()
Parse a GTFS files and convert it into a PLANit Zoning instance, or supplement the transfer zones of an already existing instance given the configuration options that have been set- Specified by:
read
in interfaceConverterReader<Zoning>
- Returns:
- macroscopic zoning that has been parsed or supplemented
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
reset
in interfaceConverterEntity
-
getSettings
public GtfsZoningReaderSettings getSettings()
Collect the settings which can be used to configure the reader- Specified by:
getSettings
in interfaceConverterReader<Zoning>
- Returns:
- the settings
-
getGtfsStopIdToTransferZoneMapping
public Function<String,TransferZone> getGtfsStopIdToTransferZoneMapping()
Provide mapping between GTFS Stop id and its found/created PLANit transfer zone (if any)- Returns:
- function that takes a GTFS stop id (String) and produces the PLANit transfer zone that goes with it if any)
-
-