hove-io / transit_model

Managing transit data with Rust
GNU Affero General Public License v3.0
53 stars 28 forks source link

SiteConnection id not unique #766

Open ue71603 opened 3 years ago

ue71603 commented 3 years ago

The ID of SiteConnection is built from the two relevant StopPlaces. However, it is possible to have multiple Connections between two StopPlaces (as it seems). This may be a problem in the GTFS, but it results in an id conflict in the resulting. Or some information was lost. In any case in the resulting correspondances.xml file, there should only be one SiteConnection element with a given id.

                <SiteConnection id="FR:SiteConnection:8100042_8100042:" version="any">
                    <WalkTransferDuration>
                        <DefaultDuration>PT1800S</DefaultDuration>
                    </WalkTransferDuration>
                    <From>
                        <StopPlaceRef ref="FR:StopPlace:Navitia_8100042:">
                        </StopPlaceRef>
                        <QuayRef ref="FR:Quay:8100042:">
                        </QuayRef>
                    </From>
                    <To>
                        <StopPlaceRef ref="FR:StopPlace:Navitia_8100042:">
                        </StopPlaceRef>
                        <QuayRef ref="FR:Quay:8100042:">
                        </QuayRef>
                    </To>
                </SiteConnection>
                <SiteConnection id="FR:SiteConnection:8100042_8100042:" version="any">
                    <WalkTransferDuration>
                        <DefaultDuration>PT1800S</DefaultDuration>
                    </WalkTransferDuration>
                    <From>
                        <StopPlaceRef ref="FR:StopPlace:Navitia_8100042:">
                        </StopPlaceRef>
                        <QuayRef ref="FR:Quay:8100042:">
                        </QuayRef>
                    </From>
                    <To>
                        <StopPlaceRef ref="FR:StopPlace:Navitia_8100042:">
                        </StopPlaceRef>
                        <QuayRef ref="FR:Quay:8100042:">
                        </QuayRef>
                    </To>
                </SiteConnection>
                <SiteConnection id="FR:SiteConnection:8100042_8100042:" version="any">
                    <WalkTransferDuration>
                        <DefaultDuration>PT1800S</DefaultDuration>
                    </WalkTransferDuration>
                    <From>
                        <StopPlaceRef ref="FR:StopPlace:Navitia_8100042:">
                        </StopPlaceRef>
                        <QuayRef ref="FR:Quay:8100042:">
                        </QuayRef>
                    </From>
                    <To>
                        <StopPlaceRef ref="FR:StopPlace:Navitia_8100042:">
                        </StopPlaceRef>
                        <QuayRef ref="FR:Quay:8100042:">
                        </QuayRef>
                    </To>
                </SiteConnection>
                <SiteConnection id="FR:SiteConnection:8100042_8100042:" version="any">
                    <WalkTransferDuration>
                        <DefaultDuration>PT1800S</DefaultDuration>
                    </WalkTransferDuration>
                    <From>
                        <StopPlaceRef ref="FR:StopPlace:Navitia_8100042:">
                        </StopPlaceRef>
                        <QuayRef ref="FR:Quay:8100042:">
                        </QuayRef>
                    </From>
                    <To>
                        <StopPlaceRef ref="FR:StopPlace:Navitia_8100042:">
                        </StopPlaceRef>
                        <QuayRef ref="FR:Quay:8100042:">
                        </QuayRef>
                    </To>
                </SiteConnection>

We used https://data.oebb.at/oebb?dataset=uddi:cd36722f-1b9a-11e8-8087-b71b4f81793a for the transform

woshilapin commented 3 years ago

(note: I edited your comment to improve the rendering of the XML extract you provided)

This looks like a bug to me. Even if the origin GTFS have duplicated transfers rules (which seems possible from the specification, but probably is dubious), we might be able to remove the duplicate rules when we generate the SiteConnection. Not sure if we'll be able to fix that quickly though.

ue71603 commented 3 years ago

No problem there. We are not in a hurry. :-) It might be that in the original data there was more data for the transfers (e.g. platforms) that was omitted when writing to GTFS.