Skip to main content

Hello everybody. The problem is the following. From a httpCaller and a featureReader I open a GTFS, but some attributes (stop_sequence in stopTimes.txt and end_date in calendar.txt) appear as missing. However, if I examine the downloaded zip with a text editor, the missing attributes appear with value, but if I open the downloaded with FME with a reader it doesn't...I tried attributeExposer, but it doesn't work. Any suggestions? Thank you so much!

 

Pol

 

Hi @pcarrerabalsell​ are you able to share a sample source dataset and workspace? A copy of the stopTimes.txt file would suffice. This will help us to better pinpoint what the cause of the issue is.

 

Regards,

Dan M


Hi @pcarrerabalsell​ are you able to share a sample source dataset and workspace? A copy of the stopTimes.txt file would suffice. This will help us to better pinpoint what the cause of the issue is.

 

Regards,

Dan M

Hi @danminneyatsaf, sorry for the late reply. We finally got the thing working using attributeExploder..but I'm not quite sure why it works now. I work quite a bit with GTFS and would like to know why. I am attaching in this thread a link from where I download the GTFS and a screenshot of the workspace, in case you want to take a look..!

 

Thank you so much,

 

Pol

 

https://ssl.renfe.com/ftransit/Fichero_CER_FOMENTO/fomento_transit.zip

 

image 


Hi @danminneyatsaf, sorry for the late reply. We finally got the thing working using attributeExploder..but I'm not quite sure why it works now. I work quite a bit with GTFS and would like to know why. I am attaching in this thread a link from where I download the GTFS and a screenshot of the workspace, in case you want to take a look..!

 

Thank you so much,

 

Pol

 

https://ssl.renfe.com/ftransit/Fichero_CER_FOMENTO/fomento_transit.zip

 

image 

Hi @pcarrerabalsell​ I took a look at the stop_times.txt file contained within the fomento_transit.zip file and it looks like the issue is caused by unnecessary whitespace at the end of the stop_sequence column name.

The GTFS Reader is expecting the column name "stop_sequence" but instead it is stored in the txt file as "stop_sequence ". This explains why the reader fails to read in values for the "stop_sequence" column.

 

The same can be seen when we inspect the stop_sequence value once it's been exposed by the AttributeExploder/AttributeExposer.

image 

This is an issue to do with the source dataset and not the GTFS Reader. To workaround this issue you can use the AttributeExposer to expose the stop_sequence attribute. You can then use an AttributeManager to remove the existing "stop_sequence" attribute, rename the one you just exposed, and trim the whitespace from the "stop_sequence" attribute value. Right now each of the values also contains whitespace (ex: "10 "). I've attached a sample workspace if you wanted to take a look.

 

The GTFS Reader could also do a better job at handling empty whitespace in the text files, so I've submitted an enhancement request to get the functionality improved. For your reference the ticket number is FMEENGINE-80909


Reply