GTFS to NeTEx Conversion

GTFS Agencies

For each GTFS Agency, Chouette Convert creates a NeTEx Operator with the following information:

GTFS Agency

Details

NeTex Operation

GTFS Agency

Details

NeTex Operation

agency_id

GTFS Agency ID

id

agency_name

Name

Name

1 2 3 <Operator id="DTA" version="any"> <Name>Demo Transit Authority</Name> </Operator>

GTFS Stops

For each GTFS Stations (location_type = 1), Chouette Convert creates a NeTEx StopPlace with the following information:

GTFS Stop

Details

NeTex StopPlace

GTFS Stop

Details

NeTex StopPlace

stop_id

GTFS Stop ID

id

stop_name

Name

Name

For each GTFS Stops (location_type = 0) with a GTFS Parent Station, Chouette Convert a NeTEx Quay with the following information:

GTFS Stop

Details

NeTex Quay

GTFS Stop

Details

NeTex Quay

stop_id

GTFS Stop ID

id

stop_name

Name

Name

1 2 3 4 5 6 7 8 9 10 11 <StopPlace id="BEATTY_AIRPORT" version="any"> <Name>Nye County Airport</Name> <quays> <Quay id="BEATTY_AIRPORT_1" version="any"> <Name>Nye County Airport</Name> </Quay> <Quay id="BEATTY_AIRPORT_2" version="any"> <Name>Nye County Airport</Name> </Quay> <quays> </StopPlace>

According to the selected NeTEx Profile, NeTEx Quays will be embbeded into the Parent StopPlace or included directly into a dedicated Frame. See the NeTEx profile document for details.

 

For each GTFS Stops (location_type = 0) without a GTFS Parent Station, Chouette Convert a NeTEx StopPlace with the following information:

GTFS Stop

Details

NeTex StopPlace

GTFS Stop

Details

NeTex StopPlace

stop_id

GTFS Stop ID

id

stop_name

Name

Name

1 2 3 <StopPlace id="FUR_CREEK_RES" version="any"> <Name>Furnace Creek Resort (Demo)</Name> </StopPlace>

GTFS Route

For each GTFS Route, Chouette Convert creates a NeTEx Line with the following information:

GTFS Route

Details

NeTex Line

GTFS Route

Details

NeTex Line

route_id

GTFS Route ID

id

route_name

Name

Name

route_short_name

Short name of a route

ShortName

1 2 3 4 <Line id="AB" version="any"> <Name>Airport - Bullfrog</Name> <ShortName>10</ShortName> </Line>

GTFS Calendars

For each GTFS Calendars, Chouette Convert creates a NeTEx DayType with the following information:

GTFS Calendar

Details

NeTex DayType

GTFS Calendar

Details

NeTex DayType

service_id

GTFS Calendar ID

id

monday

if monday is selected

PropertyOfDays/DaysOfWeek

tuesday

if tuesday is selected

wednesday

if wednesday is selected

thursday

if thursday is selected

friday

if friday is selected

saturday

if saturday is selected

sunday

if sunday is selected

For each GTFS Calendars, Chouette Convert creates a NeTEx OperatingPeriod with the following information:

GTFS Calendar

Details

NeTex OperatingPeriod

GTFS Calendar

Details

NeTex OperatingPeriod

service_id

GTFS Calendar ID

id

start_date

Start service day

FromDate

end_date

End service day

ToDate

For each GTFS Calendars, Chouette Convert creates a NeTEx DayTypeAssignment with the following information:

GTFS Calendar

Details

NeTex DayTypeAssignment

GTFS Calendar

Details

NeTex DayTypeAssignment

service_id

GTFS Calendar ID

id

DayTypeRef

OperatingPeriodRef

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <DayType id="WE" version="any"> <properties> <PropertyOfDay> <DaysOfWeek>Saturday Sunday</DaysOfWeek> </PropertyOfDay> </properties> </DayType> <OperatingPeriod id="WE" version="any"> <FromDate>2006-12-31T23:00:00.0Z</FromDate> <ToDate>2019-12-30T23:00:00.0Z</ToDate> </OperatingPeriod> <DayTypeAssignment id="WE" version="any" order="0"> <OperatingPeriodRef ref="WE"/> <DayTypeRef ref="WE"/> </DayTypeAssignment>

GTFS Calendar Dates

For each GTFS Calendar Dates, Chouette Convert creates a NeTEx DayTypeAssignment with the following information:

GTFS Calendar

Details

NeTex DayTypeAssignment

GTFS Calendar

Details

NeTex DayTypeAssignment

service_id + order

GTFS Service ID concatenated with order

id

 

Incremental positive integer

order

service_id

GTFS Calendar Date ID

DayTypeRef

date

Date when service exception occurs

Date

exception_type

Indicates whether service is available

isAvailable

(true when exception_type = 1)

1 2 3 4 5 <DayTypeAssignment id="FULLW" version="any" order="1"> <Date>2007-06-04</Date> <DayTypeRef ref="FULLW"/> <isAvailable>false</isAvailable> </DayTypeAssignment>

GTFS Trips

For each GTFS Trip, Chouette Convert creates a NeTEx ServiceJourney with the following information:

GTFS Trip

Details

NeTex ServiceJourney

GTFS Trip

Details

NeTex ServiceJourney

trip_id

GTFS Trip ID

id

service_id

Identifies when service is available

dayTypes/DayTypeRef

GTFS Stop Sequence identifier

 

JourneyPatternRef

For each GTFS Stop Times associated to the Trip, Chouette Convert creates an embedded NeTEx TimetabledPassingTime with the following information:

GTFS StopTime

Details

NeTex TimetabledPassingTime

GTFS StopTime

Details

NeTex TimetabledPassingTime

departure_time

Departure time from a specific stop for a specific trip on a route

DepartureTime

DepartureDayOffset

arrival_time

Arrival time at a specific stop for a specific trip on a route

ArrivalTime

ArrivalDayOffset

stop_sequence

Suffixed with GTFS Stop Sequence identifier

StopPointInJourneyPatternRef

1 2 3 4 5 6 7 8 9 10 11 <ServiceJourneyPattern id="ServiceJourneyPattern:BEATTY_AIRPORT-AMV" version="any"> <RouteRef ref="Route:BEATTY_AIRPORT-AMV"/> <pointsInSequence> <StopPointInJourneyPattern id="BEATTY_AIRPORT-AMV-1" version="any" order="1"> <ScheduledStopPointRef ref="BEATTY_AIRPORT"/> </StopPointInJourneyPattern> <StopPointInJourneyPattern id="BEATTY_AIRPORT-AMV-2" version="any" order="2"> <ScheduledStopPointRef ref="AMV"/> </StopPointInJourneyPattern> </pointsInSequence> </ServiceJourneyPattern>

For each GTFS Stop associated to a GTFS Stop Time, Chouette Convert creates an NeTEx ScheduledStopPoint with the following information:

GTFS Stop

Details

NeTex TimetabledPassingTime

GTFS Stop

Details

NeTex TimetabledPassingTime

stop_id

 

id

For each GTFS Stop associated to a GTFS Stop Time, Chouette Convert creates an NeTEx PassengerStopAssignment with the following information:

GTFS Stop

Details

NeTex TimetabledPassingTime

GTFS Stop

Details

NeTex TimetabledPassingTime

stop_id

 

id

ScheduledStopPointRef

StopPlaceRef or QuayRef

(according to the NeTEx resource created for GTFS Stop)

0

 

order

1 2 3 4 5 6 <ScheduledStopPoint id="BEATTY_AIRPORT" version="any"/> <PassengerStopAssignment id="BEATTY_AIRPORT" version="any" order="0"> <ScheduledStopPointRef ref="BEATTY_AIRPORT"/> <StopPlaceRef ref="BEATTY_AIRPORT"/> </PassengerStopAssignment>

Unique GTFS Stop Sequence

To create NeTEx Route and JourneyPattern, Chouette Convert identifies each unique Stop sequence defined by GTFS Trip and their Stop Times.

For example, these GTFS Stop Times:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 trip_id,stop_id,stop_sequence STBA,STAGECOACH,1 STBA,BEATTY_AIRPORT,2 CITY1,STAGECOACH,1 CITY1,NANAA,2 CITY1,NADAV,3 CITY1,DADAN,4 CITY1,EMSI,5 CITY2,EMSI,1 CITY2,DADAN,2 CITY2,NADAV,3 CITY2,NANAA,4 CITY2,STAGECOACH,5 AB1,BEATTY_AIRPORT,1 AB1,BULLFROG,2 AB2,BULLFROG,1 AB2,BEATTY_AIRPORT,2 BFC1,BULLFROG,1 BFC1,FUR_CREEK_RES,2 BFC2,FUR_CREEK_RES,1 BFC2,BULLFROG,2 AAMV1,BEATTY_AIRPORT,1 AAMV1,AMV,2 AAMV2,AMV,1 AAMV2,BEATTY_AIRPORT,2 AAMV3,BEATTY_AIRPORT,1 AAMV3,AMV,2 AAMV4,AMV,1 AAMV4,BEATTY_AIRPORT,2

Chouette Concert will identify the following Stop sequences:

  • STAGECOACH,BEATTY_AIRPORT

  • STAGECOACH,NANAA,NADAV,DADAN,EMSI

  • EMSI,DADAN,NADAV,NANAA,STAGECOACH

  • BEATTY_AIRPORT,BULLFROG

  • BULLFROG,BEATTY_AIRPORT

  • BULLFROG,FUR_CREEK_RES

  • FUR_CREEK_RES,BULLFROG

  • BEATTY_AIRPORT,AMV

  • AMV,BEATTY_AIRPORT

The GTFS Stop sequence identifier is created from this list of GTFS Stop Identifiers.

For each GTFS Stop Sequence, Chouette Convert creates a NeTEx Route with the following information:

GTFS Stop Sequence

NeTex ServiceJourney

GTFS Stop Sequence

NeTex ServiceJourney

GTFS Stop Sequence identifier prefixed with Route:

id

route_id

LineRef

1 2 3 <Route id="Route:BEATTY_AIRPORT-AMV" version="any"> <LineRef ref="AAMV"/> </Route>

For each unique GTFS Stop Sequence, Chouette Convert creates a NeTEx ServiceJourneyPattern with the following information:

GTFS Stop Sequence

NeTex ServiceJourney

GTFS Stop Sequence

NeTex ServiceJourney

GTFS Stop Sequence identifier prefixed with ServiceJourneyPattern:

id

GTFS Stop Sequence identifier prefixed with Route:

RouteRef

1 2 3 4 5 6 7 8 9 10 11 <ServiceJourneyPattern id="ServiceJourneyPattern:BEATTY_AIRPORT-AMV" version="any"> <RouteRef ref="Route:BEATTY_AIRPORT-AMV"/> <pointsInSequence> <StopPointInJourneyPattern id="BEATTY_AIRPORT-AMV-1" version="any" order="1"> <ScheduledStopPointRef ref="BEATTY_AIRPORT"/> </StopPointInJourneyPattern> <StopPointInJourneyPattern id="BEATTY_AIRPORT-AMV-2" version="any" order="2"> <ScheduledStopPointRef ref="AMV"/> </StopPointInJourneyPattern> </pointsInSequence> </ServiceJourneyPattern>

For each Stop in the Sequence, Chouette Convert creates a NeTEx StopPointInJourneyPattern with the following information:

GTFS Stop in Sequence

NeTex StopPointInJourneyPattern

GTFS Stop in Sequence

NeTex StopPointInJourneyPattern

GTFS Stop Sequence identifier + order

id

order in sequence

order

stop_id

ScheduledStopPointRef