Generate GTFS shapes with network analyst just generate straight lines

1012
5
06-15-2021 05:55 AM
Kjell_MortenHaavet
New Contributor II

When generating GTGS shape with network analyst almost all routs are made with rout_type 100 and are drawn as a straight line. i dont get any error messages.

In the gtfs file route  the route_type is coded like in the example under, but when i use the tool it changes to ypye 100 (other).

 

route_id,agency_id,route_short_name,route_long_name,route_desc,route_type,route_url,route_color,route_text_color
ATB:Line:2_5101,ATB:Authority:2,5101,Løften/Slupphaugen - Grøtte skole,,712,,,
ATB:Line:2_5100,ATB:Authority:2,5100,Meldal - Storås - Orkanger,,712,,,
ATB:Line:2_510,ATB:Authority:2,510,Orkanger skysstasjon - Hovsbak,,701,,,
ATB:Line:2_51,ATB:Authority:2,51,Sandmoen - Tillerringen - Kroppa,,704,,,
ATB:Line:2_505,ATB:Authority:2,505,Melhus - Skaun - Børsa,,701,,,
ATB:Line:2_504,ATB:Authority:2,504,Melhus - Hølonda,,701,,,

 

any idea what is wrong?

0 Kudos
5 Replies
MelindaMorang
Esri Regular Contributor

The values for route_type in your data above are 712, 701, and 704. Those do not correspond to any of the official GTFS route_type enum values, which are 0-7, 11, and 12. (See https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#routestxt)

If you want to use the network to generate shapes for these modes, you need to configure the checkboxes in the UI like this because all these modes fall into the "Other / Type not specified" category.

MelindaMorang_0-1623775076234.png

(Note that this tool has not been updated since route_type 11 and 12 were added to the specification, so currently those supported types also fall into the "Other / Type not specified" category.

Please note that this downloadable version of Generate GTFS Shapes is now deprecated. I will not be making further updates and cannot provide extensive tech support.  To create a shapes.txt file for your GTFS dataset in ArcGIS Pro 2.6 and higher, please use the Generate Shapes Feature From GTFS and Features To GTFS Shapes tools.

The new core tool in Pro has essentially the same behavior for unrecognized modes. You can select the "Other transit mode" box to use the network to generate shapes for all modes not recognized by the GTFS specification.

MelindaMorang_1-1623775385060.png

 

0 Kudos
Kjell_MortenHaavet
New Contributor II

ok, thanks for the answer. 

I think the GTFS data i downloaded is using "extended route types"(https://developers.google.com/transit/gtfs/reference/extended-route-types)

 

ill try with a different gtfs dataset.

 

 

 

 

0 Kudos
Kjell_MortenHaavet
New Contributor II

followup question: 7 hours in and still on step 1 of 28... Are something wrong or is it normal to take so long time to finish?

 

Executing: Step1GenerateShapeswithNetworkAnalyst "C:\DATA\Prosjekt\GTFS testsenter\access\atb\rb_atb-aggregated-gtfs" "C:\DATA\Prosjekt\GTFS testsenter\access\atb\rb_atb-aggregated-gtfs\AtB Output" AtB '0 - Tram, Streetcar, Light rail';'3 - Bus';'5 - Cable car' '2 - Rail';'4 - Ferry';'100 - Other / Type not specified' ERFKPS_ND "Minutes (Units: Minutes)" Right "Allowed only at intersections and dead ends" # 30 65
Start Time: Wed Jun 16 12:43:25 2021
Running script Step1GenerateShapeswithNetworkAnalyst...
SQLizing the GTFS data...
(This step might take a while for large datasets.)
Collecting and processing GTFS stop information...
Collecting GTFS route information...
Collecting GTFS trip information...
Calculating unique sequences of stops...
Your GTFS data contains 2846 unique shapes.
Generating on-street route shapes for routes of the following types, if they exist in your data:
'0 - Tram, Streetcar, Light rail'
'3 - Bus'
'5 - Cable car'
(This step may take a while for large GTFS datasets.)
- Preparing stops
- Calculating Routes part 1 of 28.

0 Kudos
MelindaMorang
Esri Regular Contributor

That definitely seems too long.

It's possible that there could be an issue with the locations of the stops or with your network dataset, or the relationship between the two. The tool uses the Network Analyst Route solver, and that solver will try to find a path through the network from each stop to the next stop in the sequence. If something is wrong with the network or the stop locations, it's possible that it could be searching the entire network dataset trying to find a path. If the network is large (like all of Europe, for example), that could take a really long time. 

Have you tested or used this network dataset outside of this tool? If not, that's my next recommended step. Run some standard Network Analyst workflows to make sure it's working properly.

If you find out there's something wrong with the network, I can probably give you some tips on how to fix it. However, I cannot provide any more detailed help with the Generate GTFS Shapes tool because it is deprecated and no longer supported. You should switch to ArcGIS Pro and use the tools there. They are more thoroughly tested, probably run faster, and you can get full tech support on them.

0 Kudos
Kjell_MortenHaavet
New Contributor II

thanks for the reply.

The network dataset is delivered by the Norwegian public road adminstration and i think its working fine. It is big (the whole of Norway) but 7-8 hours is still a long time... 

My organization are switching from Arcmap to ArcGis Pro, so maby i just put the further work with GTFS files on pause until the upgrade is complete.

0 Kudos