skinkie / reference

Personal repository where I collect working examples to understand inner workings while building PyNeTExConv
GNU Affero General Public License v3.0
0 stars 1 forks source link

Problems with netex_db_to_siri_pt.py #66

Open ue71603 opened 1 month ago

ue71603 commented 1 month ago

order of arguments

origin loperating_day output

then the rest. as I see line_ref, direction_ref and new organisation_ref more as filters, then should come with something like --line_ref="xxx". This is not working with ArgumentParser as I see it. So I suggest that ALL is accepted for non-filtering..

No filtering I used

python netex_to_db.py C:/Users/ue71603/MG_Daten/conversion/blablacar/netex.xml.gz  C:/Users/ue71603/MG_Daten/conversion/blablacar/netex-database.duckdb
python netex_db_to_siri.py C:/Users/ue71603/MG_Daten/conversion/blablacar/netex-database.duckdb 2024-08-01 BB:Line:2946291119 OPENOV:Direction:outbound C:/Users/ue71603/MG_Daten/conversion/blablacar/siri.xml

I got an export with 6877 VehicleJoruneyRef which strangely is exactly the number of ServiceJourney in the original NeTEx

So LineRef/DirectionRef was not applied correctlyy and the resulting file is wrong


    <DatedTimetableVersionFrame>
      <RecordedAtTime>2024-08-05T23:12:00.918015+02:00</RecordedAtTime>
      <LineRef>BB:Line:2946291119</LineRef>
      <DirectionRef>OPENOV:Direction:outbound</DirectionRef>
      <DatedVehicleJourney>

`Checking with non existing dates

`I checked for LineRef=BB:Line:2946291119 and DayTypeRef=BB:DayType:1002320289 with BB:UicOperatingPeriod:1002320289

          <UicOperatingPeriod id="BB:UicOperatingPeriod:1002320289" version="20240729" derivedFromVersionRef="20240729" derivedFromObjectRef="BB:AvailabilityCondition:1002320289">
            <FromDate>2024-07-03T00:00:00</FromDate>
            <ToDate>2024-09-01T00:00:00</ToDate>
            <ValidDayBits>1111111111111111111111111111111111111111111111111111111111111</ValidDayBits>
            <DaysOfWeek>Monday Tuesday Wednesday Thursday Friday Saturday Sunday</DaysOfWeek>

What I wondered. All ValidDayBits consist only of 1. Never there is a 0 in the ValidDayBits. Is this correct (would have occured before).

Then checked with 2024-07-01: I got a result none the less, even when it is not part of the From/To. => something wrong with processing of operating day too

Missing data

Things I miss in the siri file

DatedTimetableversionFrame:

DatedVehicleJourney

DatedCalls

Some might not be possible with blablacar

ue71603 commented 1 month ago

netex.zip