@golemio/pid 2.11.1 → 2.11.2-dev.1133079297

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/db/example/12_metro_line_A_gtfs_trips.sql +4 -4
  2. package/db/example/13_http-propagate-delay.sql +8 -8
  3. package/dist/helpers/geo/GeoMeasurementHelper.d.ts +17 -0
  4. package/dist/helpers/geo/GeoMeasurementHelper.js +65 -0
  5. package/dist/helpers/geo/GeoMeasurementHelper.js.map +1 -0
  6. package/dist/helpers/geo/interfaces/IGeoMeasurementHelper.d.ts +8 -0
  7. package/dist/helpers/geo/interfaces/IGeoMeasurementHelper.js +3 -0
  8. package/dist/helpers/geo/interfaces/IGeoMeasurementHelper.js.map +1 -0
  9. package/dist/integration-engine/ioc/Di.d.ts +1 -2
  10. package/dist/integration-engine/ioc/Di.js +7 -5
  11. package/dist/integration-engine/ioc/Di.js.map +1 -1
  12. package/dist/integration-engine/ioc/ModuleContainerToken.d.ts +1 -0
  13. package/dist/integration-engine/ioc/ModuleContainerToken.js +1 -0
  14. package/dist/integration-engine/ioc/ModuleContainerToken.js.map +1 -1
  15. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +4 -5
  16. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
  17. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionCalculator.d.ts +9 -11
  18. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionCalculator.js +33 -97
  19. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionCalculator.js.map +1 -1
  20. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +28 -23
  21. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
  22. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/ValidToCalculator.js +4 -5
  23. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/ValidToCalculator.js.map +1 -1
  24. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.d.ts +17 -0
  25. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +76 -0
  26. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -0
  27. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +24 -22
  28. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
  29. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/interfaces/VPInterfaces.d.ts +1 -1
  30. package/dist/output-gateway/public/ioc/Di.js +5 -1
  31. package/dist/output-gateway/public/ioc/Di.js.map +1 -1
  32. package/dist/output-gateway/public/ioc/OgModuleToken.d.ts +2 -0
  33. package/dist/output-gateway/public/ioc/OgModuleToken.js +2 -0
  34. package/dist/output-gateway/public/ioc/OgModuleToken.js.map +1 -1
  35. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.d.ts +3 -1
  36. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +3 -3
  37. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
  38. package/dist/output-gateway/public/service/helpers/BoundingBoxHelper.d.ts +6 -3
  39. package/dist/output-gateway/public/service/helpers/BoundingBoxHelper.js +26 -10
  40. package/dist/output-gateway/public/service/helpers/BoundingBoxHelper.js.map +1 -1
  41. package/dist/output-gateway/public/service/helpers/interfaces/IBoundingBoxHelper.d.ts +4 -0
  42. package/dist/output-gateway/public/service/helpers/interfaces/IBoundingBoxHelper.js +3 -0
  43. package/dist/output-gateway/public/service/helpers/interfaces/IBoundingBoxHelper.js.map +1 -0
  44. package/dist/schema-definitions/vehicle-positions/models/VPTripsModel.js +11 -3
  45. package/dist/schema-definitions/vehicle-positions/models/VPTripsModel.js.map +1 -1
  46. package/dist/schema-definitions/vehicle-positions/models/interfaces/VPTripsLastPositionInterfaces.d.ts +2 -1
  47. package/package.json +3 -3
@@ -115,10 +115,10 @@ INSERT INTO vehiclepositions_metro_runs_messages (route_name, message_timestamp,
115
115
  ('A', concat(CURRENT_DATE,'T08:20:13Z')::timestamp, '9', '9', '175', '1209', -15, concat(CURRENT_DATE,'T08:19:58Z')::timestamp, (SELECT origin_datetime FROM init_values), (SELECT origin_datetime FROM init_values));
116
116
 
117
117
  INSERT INTO vehiclepositions_trips (cis_line_id,cis_trip_number,run_number,cis_line_short_name,created_at,gtfs_route_id,gtfs_route_short_name,gtfs_trip_id,id,updated_at,start_cis_stop_id,start_cis_stop_platform_code,start_time,start_timestamp,vehicle_type_id,wheelchair_accessible,create_batch_id,created_by,update_batch_id,updated_by,agency_name_scheduled,origin_route_name,agency_name_real,vehicle_registration_number,gtfs_trip_headsign,start_asw_stop_id,gtfs_route_type,gtfs_block_id,last_position_id,is_canceled,end_timestamp,gtfs_trip_short_name,last_position_context,provider_source_type) VALUES
118
- (NULL,NULL,5,NULL,concat(CURRENT_DATE,'T09:14:32Z')::timestamp,'L991','A','991_78_220321',concat(CURRENT_DATE,'T10:32:35+02:00_991_78_220321_5_5'),concat(CURRENT_DATE,'T09:14:51Z')::timestamp,NULL,NULL,'10:32:35',concat(CURRENT_DATE,'T08:32:35Z')::timestamp,1,true,NULL,NULL,NULL,NULL,'DP PRAHA','991','DP PRAHA',NULL,'Skalka',NULL,1,NULL,30,NULL,concat(CURRENT_DATE,'T09:00:40Z')::timestamp,NULL,concat('{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":null,"firstPositionDelay":null},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionDelay":null,"lastPositionId":null,"lastPositionOriginTimestamp":null,"lastPositionTracking":null,"lastPositionCanceled":null,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":false,"tripId":"', concat(CURRENT_DATE,'T10:32:35+02:00_991_78_220321_5_5'), '"}')::json, '3'),
119
- (NULL,NULL,5,NULL,concat(CURRENT_DATE,'T09:14:32Z')::timestamp,'L991','A','991_77_220901',concat(CURRENT_DATE,'T09:55:10+02:00_991_77_220901_5_5'),concat(CURRENT_DATE,'T09:14:51Z')::timestamp,NULL,NULL,'09:55:10',concat(CURRENT_DATE,'T07:55:10Z')::timestamp,1,true,NULL,NULL,NULL,NULL,'DP PRAHA','991','DP PRAHA',NULL,'Nemocnice Motol',NULL,1,NULL,29,NULL,concat(CURRENT_DATE,'T08:26:20Z')::timestamp,NULL,concat('{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":null,"firstPositionDelay":null},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionDelay":null,"lastPositionId":null,"lastPositionOriginTimestamp":null,"lastPositionTracking":null,"lastPositionCanceled":null,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":false,"tripId":"', concat(CURRENT_DATE,'T09:55:10+02:00_991_77_220901_5_5'), '"}')::json, '3'),
120
- (NULL,NULL,5,NULL,concat(CURRENT_DATE,'T09:14:32Z')::timestamp,'L991','A','991_124_201230',concat(CURRENT_DATE,'T11:02:40+02:00_991_124_201230_5_5'),concat(CURRENT_DATE,'T09:14:51Z')::timestamp,NULL,NULL,'11:02:40',concat(CURRENT_DATE,'T09:02:40Z')::timestamp,1,true,NULL,NULL,NULL,NULL,'DP PRAHA','991','DP PRAHA',NULL,'Nemocnice Motol',NULL,1,NULL,31,NULL,concat(CURRENT_DATE,'T09:31:20Z')::timestamp,NULL,concat('{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":null,"firstPositionDelay":null},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionDelay":null,"lastPositionId":null,"lastPositionOriginTimestamp":null,"lastPositionTracking":null,"lastPositionCanceled":null,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":false,"tripId":"', concat(CURRENT_DATE,'T11:02:40+02:00_991_124_201230_5_5'), '"}')::json, '3'),
121
- (NULL,NULL,9,NULL,concat(CURRENT_DATE,'T09:14:32Z')::timestamp,'L991','A','991_294_220901',concat(CURRENT_DATE,'T10:04:35+02:00_991_294_220901_9_9'),concat(CURRENT_DATE,'T06:14:51Z')::timestamp,NULL,NULL,'10:04:35',concat(CURRENT_DATE,'T08:04:35Z')::timestamp,1,true,NULL,NULL,NULL,NULL,'DP PRAHA','991','DP PRAHA',NULL,'Skalka',NULL,1,NULL,32,NULL,concat(CURRENT_DATE,'T08:32:40Z')::timestamp,NULL,concat('{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":null,"firstPositionDelay":null},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionDelay":null,"lastPositionId":null,"lastPositionOriginTimestamp":null,"lastPositionTracking":null,"lastPositionCanceled":null,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":false,"tripId":"', concat(CURRENT_DATE,'T10:04:35+02:00_991_294_220901_9_9'), '"}')::json, '3');
118
+ (NULL,NULL,5,NULL,concat(CURRENT_DATE,'T09:14:32Z')::timestamp,'L991','A','991_78_220321',concat(CURRENT_DATE,'T10:32:35+02:00_991_78_220321_5_5'),concat(CURRENT_DATE,'T09:14:51Z')::timestamp,NULL,NULL,'10:32:35',concat(CURRENT_DATE,'T08:32:35Z')::timestamp,1,true,NULL,NULL,NULL,NULL,'DP PRAHA','991','DP PRAHA',NULL,'Skalka',NULL,1,NULL,30,NULL,concat(CURRENT_DATE,'T09:00:40Z')::timestamp,NULL,concat('{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":null,"firstPositionDelay":null},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionDelay":null,"lastPositionId":null,"lastPositionOriginTimestamp":null,"lastPositionTracking":null,"lastPositionCanceled":null,"lastPositionBeforeTrackDelayed":null,"lastPositionState":null,"tripId":"', concat(CURRENT_DATE,'T10:32:35+02:00_991_78_220321_5_5'), '"}')::json, '3'),
119
+ (NULL,NULL,5,NULL,concat(CURRENT_DATE,'T09:14:32Z')::timestamp,'L991','A','991_77_220901',concat(CURRENT_DATE,'T09:55:10+02:00_991_77_220901_5_5'),concat(CURRENT_DATE,'T09:14:51Z')::timestamp,NULL,NULL,'09:55:10',concat(CURRENT_DATE,'T07:55:10Z')::timestamp,1,true,NULL,NULL,NULL,NULL,'DP PRAHA','991','DP PRAHA',NULL,'Nemocnice Motol',NULL,1,NULL,29,NULL,concat(CURRENT_DATE,'T08:26:20Z')::timestamp,NULL,concat('{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":null,"firstPositionDelay":null},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionDelay":null,"lastPositionId":null,"lastPositionOriginTimestamp":null,"lastPositionTracking":null,"lastPositionCanceled":null,"lastPositionBeforeTrackDelayed":null,"lastPositionState":null,"tripId":"', concat(CURRENT_DATE,'T09:55:10+02:00_991_77_220901_5_5'), '"}')::json, '3'),
120
+ (NULL,NULL,5,NULL,concat(CURRENT_DATE,'T09:14:32Z')::timestamp,'L991','A','991_124_201230',concat(CURRENT_DATE,'T11:02:40+02:00_991_124_201230_5_5'),concat(CURRENT_DATE,'T09:14:51Z')::timestamp,NULL,NULL,'11:02:40',concat(CURRENT_DATE,'T09:02:40Z')::timestamp,1,true,NULL,NULL,NULL,NULL,'DP PRAHA','991','DP PRAHA',NULL,'Nemocnice Motol',NULL,1,NULL,31,NULL,concat(CURRENT_DATE,'T09:31:20Z')::timestamp,NULL,concat('{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":null,"firstPositionDelay":null},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionDelay":null,"lastPositionId":null,"lastPositionOriginTimestamp":null,"lastPositionTracking":null,"lastPositionCanceled":null,"lastPositionBeforeTrackDelayed":null,"lastPositionState":null,"tripId":"', concat(CURRENT_DATE,'T11:02:40+02:00_991_124_201230_5_5'), '"}')::json, '3'),
121
+ (NULL,NULL,9,NULL,concat(CURRENT_DATE,'T09:14:32Z')::timestamp,'L991','A','991_294_220901',concat(CURRENT_DATE,'T10:04:35+02:00_991_294_220901_9_9'),concat(CURRENT_DATE,'T06:14:51Z')::timestamp,NULL,NULL,'10:04:35',concat(CURRENT_DATE,'T08:04:35Z')::timestamp,1,true,NULL,NULL,NULL,NULL,'DP PRAHA','991','DP PRAHA',NULL,'Skalka',NULL,1,NULL,32,NULL,concat(CURRENT_DATE,'T08:32:40Z')::timestamp,NULL,concat('{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":null,"firstPositionDelay":null},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionDelay":null,"lastPositionId":null,"lastPositionOriginTimestamp":null,"lastPositionTracking":null,"lastPositionCanceled":null,"lastPositionBeforeTrackDelayed":null,"lastPositionState":null,"tripId":"', concat(CURRENT_DATE,'T10:04:35+02:00_991_294_220901_9_9'), '"}')::json, '3');
122
122
 
123
123
  INSERT INTO vehiclepositions_positions (created_at,delay,delay_stop_arrival,delay_stop_departure,next_stop_id,shape_dist_traveled,is_canceled,lat,lng,origin_time,origin_timestamp,is_tracked,trips_id,create_batch_id,created_by,update_batch_id,updated_at,updated_by,id,bearing,cis_last_stop_id,cis_last_stop_sequence,last_stop_id,last_stop_sequence,next_stop_sequence,speed,last_stop_arrival_time,last_stop_departure_time,next_stop_arrival_time,next_stop_departure_time,asw_last_stop_id,state_process,state_position,this_stop_id,this_stop_sequence,tcp_event,last_stop_headsign,last_stop_name,next_stop_name,this_stop_name,valid_to) VALUES
124
124
  (concat(CURRENT_DATE,'T09:14:32Z')::timestamp,NULL,NULL,NULL,'U306Z101P',0,NULL,50.09837,14.36282,'10:20:08',concat(CURRENT_DATE,'T08:20:08Z')::timestamptz,false,concat(CURRENT_DATE,'T10:32:35+02:00_991_78_220321_5_5'),NULL,NULL,NULL,concat(CURRENT_DATE,'T09:14:32Z')::timestamp,NULL,26,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,concat(CURRENT_DATE,'T08:32:35Z')::timestamp,concat(CURRENT_DATE,'T08:32:35Z')::timestamp,NULL,'processed','before_track','U157Z102P',NULL,NULL,NULL,NULL,NULL,NULL,concat(CURRENT_DATE,'T09:40:00Z')::timestamp),
@@ -153,14 +153,14 @@ VALUES
153
153
  WITH init_values AS (SELECT NOW()::DATE AS now_date)
154
154
  INSERT INTO "vehiclepositions_trips" ("cis_line_id","cis_trip_number","run_number","internal_run_number","cis_line_short_name","created_at","gtfs_route_id","gtfs_route_short_name","gtfs_trip_id","id","updated_at","start_cis_stop_id","start_cis_stop_platform_code","start_time","start_timestamp","vehicle_type_id","wheelchair_accessible","create_batch_id","created_by","update_batch_id","updated_by","agency_name_scheduled","origin_route_name","internal_route_name","agency_name_real","vehicle_registration_number","gtfs_trip_headsign","start_asw_stop_id","gtfs_route_type","gtfs_block_id","last_position_id","is_canceled","end_timestamp","gtfs_trip_short_name","last_position_context")
155
155
  VALUES
156
- --(E'100212',1044,2,E'212',E'2022-12-23 11:54:16.664+01',E'L212',E'212',E'212_365_221211',E'2022-12-23T11:24:00Z_100212_212_1044',E'2022-12-23 13:01:17.635+01',58701,E'A',E'12:24:00',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '12:24:00')*1000,3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212',E'STENBUS',1712,E'Nádraží Klánovice-sever',NULL,3,NULL,1564165759,FALSE,1671795000000,NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671795011000,"firstPositionDelay":11},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564165759","lastPositionOriginTimestamp":1671796852000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":196,"delay":36,"id":"1563938739","lat":50.08797,"lng":14.66552,"origin_time":"12:30:36","origin_timestamp":1671795036000,"shape_dist_traveled":2.408,"is_tracked":true,"is_canceled":false,"state_position":"at_stop","state_process":"processed","tcp_event":null,"this_stop_sequence":7,"last_stop_sequence":7,"last_stop_id":"U454Z4P","last_stop_arrival_time":1671795000000,"last_stop_departure_time":1671795000000,"next_stop_id":"U454Z4P","next_stop_name":"Nádraží Klánovice-sever","last_stop_name":"Nádraží Klánovice-sever","next_stop_sequence":7,"next_stop_arrival_time":1671795000000,"next_stop_departure_time":1671795000000,"this_stop_id":"U454Z4P","this_stop_name":"Nádraží Klánovice-sever","valid_to":1671795336000},"geometry":{"type":"Point","coordinates":[14.66552,50.08797]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":true,"tripId":"2022-12-23T11:24:00Z_100212_212_1044"}'),
157
- --(E'100212',1043,2,E'212',E'2022-12-23 12:01:12.172+01',E'L212',E'212',E'212_366_221211',E'2022-12-23T11:31:00Z_100212_212_1043',E'2022-12-23 13:07:38.147+01',27935,E'C',E'12:31:00',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '12:31:00')*1000,3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212',E'STENBUS',1712,E'Nepasické náměstí',NULL,3,NULL,1564213175,FALSE,1671795360000,NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671795477000,"firstPositionDelay":117},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564213175","lastPositionOriginTimestamp":1671797202000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":38,"delay":117,"id":"1563990184","lat":50.1036,"lng":14.6586,"origin_time":"12:37:57","origin_timestamp":1671795477000,"shape_dist_traveled":2.491,"is_tracked":true,"is_canceled":false,"state_position":"at_stop","state_process":"processed","tcp_event":null,"this_stop_sequence":6,"last_stop_sequence":6,"last_stop_id":"U4107Z1P","last_stop_arrival_time":1671795360000,"last_stop_departure_time":1671795360000,"next_stop_id":"U4107Z1P","next_stop_name":"Nepasické náměstí","last_stop_name":"Nepasické náměstí","next_stop_sequence":6,"next_stop_arrival_time":1671795360000,"next_stop_departure_time":1671795360000,"this_stop_id":"U4107Z1P","this_stop_name":"Nepasické náměstí","valid_to":1671795777000},"geometry":{"type":"Point","coordinates":[14.6586,50.1036]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":false,"tripId":"2022-12-23T11:31:00Z_100212_212_1043"}'),
158
- --(E'100212',1046,2,E'212',E'2022-12-23 12:24:16.404+01',E'L212',E'212',E'212_367_221211',E'2022-12-23T11:54:00Z_100212_212_1046',E'2022-12-23 13:30:11.782+01',58701,E'A',E'12:54:00',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '12:54:00')*1000,3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212',E'STENBUS',1712,E'Nádraží Klánovice-sever',NULL,3,NULL,1564383076,FALSE,1671796800000,NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671796785000,"firstPositionDelay":-15},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564383076","lastPositionOriginTimestamp":1671798580000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":196,"delay":-15,"id":"1564155786","lat":50.08828,"lng":14.66574,"origin_time":"12:59:45","origin_timestamp":1671796785000,"shape_dist_traveled":2.408,"is_tracked":true,"is_canceled":false,"state_position":"at_stop","state_process":"processed","tcp_event":null,"this_stop_sequence":7,"last_stop_sequence":7,"last_stop_id":"U454Z4P","last_stop_arrival_time":1671796800000,"last_stop_departure_time":1671796800000,"next_stop_id":"U454Z4P","next_stop_name":"Nádraží Klánovice-sever","last_stop_name":"Nádraží Klánovice-sever","next_stop_sequence":7,"next_stop_arrival_time":1671796800000,"next_stop_departure_time":1671796800000,"this_stop_id":"U454Z4P","this_stop_name":"Nádraží Klánovice-sever","valid_to":1671797085000},"geometry":{"type":"Point","coordinates":[14.66574,50.08828]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":true,"tripId":"2022-12-23T11:54:00Z_100212_212_1046"}'),
159
- --(E'100212',1045,2,E'212',E'2022-12-23 12:31:20.392+01',E'L212',E'212',E'212_368_221211',E'2022-12-23T12:01:00Z_100212_212_1045',E'2022-12-23 13:36:04.603+01',27935,E'C',E'13:01:00',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '13:01:00')*1000,3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212',E'STENBUS',1712,E'Nepasické náměstí',NULL,3,NULL,1564424455,FALSE,1671797160000,NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671797087000,"firstPositionDelay":-13},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564424455","lastPositionOriginTimestamp":1671798943000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":359,"delay":-7,"id":"1564202112","lat":50.10244,"lng":14.65803,"origin_time":"13:05:33","origin_timestamp":1671797133000,"shape_dist_traveled":2.289,"is_tracked":true,"is_canceled":false,"state_position":"on_track","state_process":"processed","tcp_event":null,"last_stop_sequence":5,"last_stop_id":"U4137Z1P","last_stop_arrival_time":1671797100000,"last_stop_departure_time":1671797100000,"next_stop_id":"U4107Z1P","next_stop_name":"Nepasické náměstí","last_stop_name":"Všestarská","next_stop_sequence":6,"next_stop_arrival_time":1671797160000,"next_stop_departure_time":1671797160000,"valid_to":1671797433000},"geometry":{"type":"Point","coordinates":[14.65803,50.10244]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":true,"tripId":"2022-12-23T12:01:00Z_100212_212_1045"}');
160
- (E'100212',1044,2,2,E'212',E'2022-12-23 11:54:16.664+01',E'L212',E'212',E'212_365_221211',E'2022-12-23T11:24:00Z_100212_212_1044',E'2022-12-23 13:01:17.635+01',58701,E'A',E'12:24:00',((SELECT now_date FROM init_values) + INTERVAL '12:24:00') at time zone 'Europe/Prague',3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212','212',E'STENBUS',1712,E'Nádraží Klánovice-sever',NULL,3,NULL,1564165759,FALSE,((SELECT now_date FROM init_values) + INTERVAL '12:30:00' ) at time zone 'Europe/Prague',NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671795011000,"firstPositionDelay":11},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564165759","lastPositionOriginTimestamp":1671796852000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":196,"delay":36,"id":"1563938739","lat":50.08797,"lng":14.66552,"origin_time":"12:30:36","origin_timestamp":1671795036000,"shape_dist_traveled":2.408,"is_tracked":false,"is_canceled":false,"state_position":"after_track","state_process":"processed","tcp_event":null,"this_stop_sequence":7,"last_stop_sequence":7,"last_stop_id":"U454Z4P","last_stop_arrival_time":1671795000000,"last_stop_departure_time":1671795000000,"next_stop_id":"U454Z4P","next_stop_name":"Nádraží Klánovice-sever","last_stop_name":"Nádraží Klánovice-sever","next_stop_sequence":7,"next_stop_arrival_time":1671795000000,"next_stop_departure_time":1671795000000,"this_stop_id":"U454Z4P","this_stop_name":"Nádraží Klánovice-sever","valid_to":1671795336000},"geometry":{"type":"Point","coordinates":[14.66552,50.08797]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":true,"tripId":"2022-12-23T11:24:00Z_100212_212_1044"}'),
161
- (E'100212',1043,2,2,E'212',E'2022-12-23 12:01:12.172+01',E'L212',E'212',E'212_366_221211',E'2022-12-23T11:31:00Z_100212_212_1043',E'2022-12-23 13:07:38.147+01',27935,E'C',E'12:31:00',((SELECT now_date FROM init_values) + INTERVAL '12:31:00') at time zone 'Europe/Prague',3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212','212',E'STENBUS',1712,E'Nepasické náměstí',NULL,3,NULL,1564213175,FALSE,((SELECT now_date FROM init_values) + INTERVAL '12:36:00') at time zone 'Europe/Prague',NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671795477000,"firstPositionDelay":117},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564213175","lastPositionOriginTimestamp":1671797202000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":38,"delay":117,"id":"1563990184","lat":50.1036,"lng":14.6586,"origin_time":"12:37:57","origin_timestamp":1671795477000,"shape_dist_traveled":2.491,"is_tracked":false,"is_canceled":false,"state_position":"after_track","state_process":"processed","tcp_event":null,"this_stop_sequence":6,"last_stop_sequence":6,"last_stop_id":"U4107Z1P","last_stop_arrival_time":1671795360000,"last_stop_departure_time":1671795360000,"next_stop_id":"U4107Z1P","next_stop_name":"Nepasické náměstí","last_stop_name":"Nepasické náměstí","next_stop_sequence":6,"next_stop_arrival_time":1671795360000,"next_stop_departure_time":1671795360000,"this_stop_id":"U4107Z1P","this_stop_name":"Nepasické náměstí","valid_to":1671795777000},"geometry":{"type":"Point","coordinates":[14.6586,50.1036]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":false,"tripId":"2022-12-23T11:31:00Z_100212_212_1043"}'),
162
- (E'100212',1046,2,2,E'212',E'2022-12-23 12:24:16.404+01',E'L212',E'212',E'212_367_221211',E'2022-12-23T11:54:00Z_100212_212_1046',E'2022-12-23 13:30:11.782+01',58701,E'A',E'12:54:00',((SELECT now_date FROM init_values) + INTERVAL '12:54:00') at time zone 'Europe/Prague',3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212','212',E'STENBUS',1712,E'Nádraží Klánovice-sever',NULL,3,NULL,1564383076,FALSE,((SELECT now_date FROM init_values) + INTERVAL '13:00:00') at time zone 'Europe/Prague',NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671796785000,"firstPositionDelay":-15},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564383076","lastPositionOriginTimestamp":1671798580000,"lastPositionTracking":null,"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":true,"tripId":"2022-12-23T11:54:00Z_100212_212_1046"}'),
163
- (E'100212',1045,2,2,E'212',E'2022-12-23 12:31:20.392+01',E'L212',E'212',E'212_368_221211',E'2022-12-23T12:01:00Z_100212_212_1045',E'2022-12-23 13:36:04.603+01',27935,E'C',E'13:01:00',((SELECT now_date FROM init_values) + INTERVAL '13:01:00') at time zone 'Europe/Prague',3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212','212',E'STENBUS',1712,E'Nepasické náměstí',NULL,3,NULL,1564424455,FALSE,((SELECT now_date FROM init_values) + INTERVAL '13:06:00') at time zone 'Europe/Prague',NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671797087000,"firstPositionDelay":-13},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564424455","lastPositionOriginTimestamp":1671798943000,"lastPositionTracking":null,"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"isLastPositionAfterTrack":true,"tripId":"2022-12-23T12:01:00Z_100212_212_1045"}');
156
+ --(E'100212',1044,2,E'212',E'2022-12-23 11:54:16.664+01',E'L212',E'212',E'212_365_221211',E'2022-12-23T11:24:00Z_100212_212_1044',E'2022-12-23 13:01:17.635+01',58701,E'A',E'12:24:00',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '12:24:00')*1000,3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212',E'STENBUS',1712,E'Nádraží Klánovice-sever',NULL,3,NULL,1564165759,FALSE,1671795000000,NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671795011000,"firstPositionDelay":11},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564165759","lastPositionOriginTimestamp":1671796852000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":196,"delay":36,"id":"1563938739","lat":50.08797,"lng":14.66552,"origin_time":"12:30:36","origin_timestamp":1671795036000,"shape_dist_traveled":2.408,"is_tracked":true,"is_canceled":false,"state_position":"at_stop","state_process":"processed","tcp_event":null,"this_stop_sequence":7,"last_stop_sequence":7,"last_stop_id":"U454Z4P","last_stop_arrival_time":1671795000000,"last_stop_departure_time":1671795000000,"next_stop_id":"U454Z4P","next_stop_name":"Nádraží Klánovice-sever","last_stop_name":"Nádraží Klánovice-sever","next_stop_sequence":7,"next_stop_arrival_time":1671795000000,"next_stop_departure_time":1671795000000,"this_stop_id":"U454Z4P","this_stop_name":"Nádraží Klánovice-sever","valid_to":1671795336000},"geometry":{"type":"Point","coordinates":[14.66552,50.08797]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"lastPositionState":"after_track","tripId":"2022-12-23T11:24:00Z_100212_212_1044"}'),
157
+ --(E'100212',1043,2,E'212',E'2022-12-23 12:01:12.172+01',E'L212',E'212',E'212_366_221211',E'2022-12-23T11:31:00Z_100212_212_1043',E'2022-12-23 13:07:38.147+01',27935,E'C',E'12:31:00',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '12:31:00')*1000,3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212',E'STENBUS',1712,E'Nepasické náměstí',NULL,3,NULL,1564213175,FALSE,1671795360000,NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671795477000,"firstPositionDelay":117},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564213175","lastPositionOriginTimestamp":1671797202000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":38,"delay":117,"id":"1563990184","lat":50.1036,"lng":14.6586,"origin_time":"12:37:57","origin_timestamp":1671795477000,"shape_dist_traveled":2.491,"is_tracked":true,"is_canceled":false,"state_position":"at_stop","state_process":"processed","tcp_event":null,"this_stop_sequence":6,"last_stop_sequence":6,"last_stop_id":"U4107Z1P","last_stop_arrival_time":1671795360000,"last_stop_departure_time":1671795360000,"next_stop_id":"U4107Z1P","next_stop_name":"Nepasické náměstí","last_stop_name":"Nepasické náměstí","next_stop_sequence":6,"next_stop_arrival_time":1671795360000,"next_stop_departure_time":1671795360000,"this_stop_id":"U4107Z1P","this_stop_name":"Nepasické náměstí","valid_to":1671795777000},"geometry":{"type":"Point","coordinates":[14.6586,50.1036]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"lastPositionState":null,"tripId":"2022-12-23T11:31:00Z_100212_212_1043"}'),
158
+ --(E'100212',1046,2,E'212',E'2022-12-23 12:24:16.404+01',E'L212',E'212',E'212_367_221211',E'2022-12-23T11:54:00Z_100212_212_1046',E'2022-12-23 13:30:11.782+01',58701,E'A',E'12:54:00',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '12:54:00')*1000,3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212',E'STENBUS',1712,E'Nádraží Klánovice-sever',NULL,3,NULL,1564383076,FALSE,1671796800000,NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671796785000,"firstPositionDelay":-15},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564383076","lastPositionOriginTimestamp":1671798580000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":196,"delay":-15,"id":"1564155786","lat":50.08828,"lng":14.66574,"origin_time":"12:59:45","origin_timestamp":1671796785000,"shape_dist_traveled":2.408,"is_tracked":true,"is_canceled":false,"state_position":"at_stop","state_process":"processed","tcp_event":null,"this_stop_sequence":7,"last_stop_sequence":7,"last_stop_id":"U454Z4P","last_stop_arrival_time":1671796800000,"last_stop_departure_time":1671796800000,"next_stop_id":"U454Z4P","next_stop_name":"Nádraží Klánovice-sever","last_stop_name":"Nádraží Klánovice-sever","next_stop_sequence":7,"next_stop_arrival_time":1671796800000,"next_stop_departure_time":1671796800000,"this_stop_id":"U454Z4P","this_stop_name":"Nádraží Klánovice-sever","valid_to":1671797085000},"geometry":{"type":"Point","coordinates":[14.66574,50.08828]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"lastPositionState":"after_track","tripId":"2022-12-23T11:54:00Z_100212_212_1046"}'),
159
+ --(E'100212',1045,2,E'212',E'2022-12-23 12:31:20.392+01',E'L212',E'212',E'212_368_221211',E'2022-12-23T12:01:00Z_100212_212_1045',E'2022-12-23 13:36:04.603+01',27935,E'C',E'13:01:00',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '13:01:00')*1000,3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212',E'STENBUS',1712,E'Nepasické náměstí',NULL,3,NULL,1564424455,FALSE,1671797160000,NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671797087000,"firstPositionDelay":-13},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564424455","lastPositionOriginTimestamp":1671798943000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":359,"delay":-7,"id":"1564202112","lat":50.10244,"lng":14.65803,"origin_time":"13:05:33","origin_timestamp":1671797133000,"shape_dist_traveled":2.289,"is_tracked":true,"is_canceled":false,"state_position":"on_track","state_process":"processed","tcp_event":null,"last_stop_sequence":5,"last_stop_id":"U4137Z1P","last_stop_arrival_time":1671797100000,"last_stop_departure_time":1671797100000,"next_stop_id":"U4107Z1P","next_stop_name":"Nepasické náměstí","last_stop_name":"Všestarská","next_stop_sequence":6,"next_stop_arrival_time":1671797160000,"next_stop_departure_time":1671797160000,"valid_to":1671797433000},"geometry":{"type":"Point","coordinates":[14.65803,50.10244]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"lastPositionState":"after_track","tripId":"2022-12-23T12:01:00Z_100212_212_1045"}');
160
+ (E'100212',1044,2,2,E'212',E'2022-12-23 11:54:16.664+01',E'L212',E'212',E'212_365_221211',E'2022-12-23T11:24:00Z_100212_212_1044',E'2022-12-23 13:01:17.635+01',58701,E'A',E'12:24:00',((SELECT now_date FROM init_values) + INTERVAL '12:24:00') at time zone 'Europe/Prague',3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212','212',E'STENBUS',1712,E'Nádraží Klánovice-sever',NULL,3,NULL,1564165759,FALSE,((SELECT now_date FROM init_values) + INTERVAL '12:30:00' ) at time zone 'Europe/Prague',NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671795011000,"firstPositionDelay":11},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564165759","lastPositionOriginTimestamp":1671796852000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":196,"delay":36,"id":"1563938739","lat":50.08797,"lng":14.66552,"origin_time":"12:30:36","origin_timestamp":1671795036000,"shape_dist_traveled":2.408,"is_tracked":false,"is_canceled":false,"state_position":"after_track","state_process":"processed","tcp_event":null,"this_stop_sequence":7,"last_stop_sequence":7,"last_stop_id":"U454Z4P","last_stop_arrival_time":1671795000000,"last_stop_departure_time":1671795000000,"next_stop_id":"U454Z4P","next_stop_name":"Nádraží Klánovice-sever","last_stop_name":"Nádraží Klánovice-sever","next_stop_sequence":7,"next_stop_arrival_time":1671795000000,"next_stop_departure_time":1671795000000,"this_stop_id":"U454Z4P","this_stop_name":"Nádraží Klánovice-sever","valid_to":1671795336000},"geometry":{"type":"Point","coordinates":[14.66552,50.08797]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"lastPositionState":"after_track","tripId":"2022-12-23T11:24:00Z_100212_212_1044"}'),
161
+ (E'100212',1043,2,2,E'212',E'2022-12-23 12:01:12.172+01',E'L212',E'212',E'212_366_221211',E'2022-12-23T11:31:00Z_100212_212_1043',E'2022-12-23 13:07:38.147+01',27935,E'C',E'12:31:00',((SELECT now_date FROM init_values) + INTERVAL '12:31:00') at time zone 'Europe/Prague',3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212','212',E'STENBUS',1712,E'Nepasické náměstí',NULL,3,NULL,1564213175,FALSE,((SELECT now_date FROM init_values) + INTERVAL '12:36:00') at time zone 'Europe/Prague',NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671795477000,"firstPositionDelay":117},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564213175","lastPositionOriginTimestamp":1671797202000,"lastPositionTracking":{"type":"Feature","properties":{"bearing":38,"delay":117,"id":"1563990184","lat":50.1036,"lng":14.6586,"origin_time":"12:37:57","origin_timestamp":1671795477000,"shape_dist_traveled":2.491,"is_tracked":false,"is_canceled":false,"state_position":"after_track","state_process":"processed","tcp_event":null,"this_stop_sequence":6,"last_stop_sequence":6,"last_stop_id":"U4107Z1P","last_stop_arrival_time":1671795360000,"last_stop_departure_time":1671795360000,"next_stop_id":"U4107Z1P","next_stop_name":"Nepasické náměstí","last_stop_name":"Nepasické náměstí","next_stop_sequence":6,"next_stop_arrival_time":1671795360000,"next_stop_departure_time":1671795360000,"this_stop_id":"U4107Z1P","this_stop_name":"Nepasické náměstí","valid_to":1671795777000},"geometry":{"type":"Point","coordinates":[14.6586,50.1036]}},"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"lastPositionState":null,"tripId":"2022-12-23T11:31:00Z_100212_212_1043"}'),
162
+ (E'100212',1046,2,2,E'212',E'2022-12-23 12:24:16.404+01',E'L212',E'212',E'212_367_221211',E'2022-12-23T11:54:00Z_100212_212_1046',E'2022-12-23 13:30:11.782+01',58701,E'A',E'12:54:00',((SELECT now_date FROM init_values) + INTERVAL '12:54:00') at time zone 'Europe/Prague',3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212','212',E'STENBUS',1712,E'Nádraží Klánovice-sever',NULL,3,NULL,1564383076,FALSE,((SELECT now_date FROM init_values) + INTERVAL '13:00:00') at time zone 'Europe/Prague',NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671796785000,"firstPositionDelay":-15},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564383076","lastPositionOriginTimestamp":1671798580000,"lastPositionTracking":null,"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"lastPositionState":"after_track","tripId":"2022-12-23T11:54:00Z_100212_212_1046"}'),
163
+ (E'100212',1045,2,2,E'212',E'2022-12-23 12:31:20.392+01',E'L212',E'212',E'212_368_221211',E'2022-12-23T12:01:00Z_100212_212_1045',E'2022-12-23 13:36:04.603+01',27935,E'C',E'13:01:00',((SELECT now_date FROM init_values) + INTERVAL '13:01:00') at time zone 'Europe/Prague',3,TRUE,NULL,NULL,NULL,NULL,E'STENBUS',E'212','212',E'STENBUS',1712,E'Nepasické náměstí',NULL,3,NULL,1564424455,FALSE,((SELECT now_date FROM init_values) + INTERVAL '13:06:00') at time zone 'Europe/Prague',NULL,E'{"atStopStreak":{"stop_sequence":null,"firstPositionTimestamp":1671797087000,"firstPositionDelay":-13},"lastPositionLastStop":{"id":null,"sequence":null,"arrival_time":null,"departure_time":null},"lastPositionId":"1564424455","lastPositionOriginTimestamp":1671798943000,"lastPositionTracking":null,"lastPositionCanceled":false,"lastPositionBeforeTrackDelayed":null,"lastPositionState":"after_track","tripId":"2022-12-23T12:01:00Z_100212_212_1045"}');
164
164
 
165
165
  --(E'2022-12-23 12:36:58.062+01',NULL,9,NULL,NULL,2.408,FALSE,50.10024,14.66322,E'12:36:27',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '12:36:27')*1000,0,E'2022-12-23T11:24:00Z_100212_212_1044',NULL,NULL,NULL,E'2022-12-23 12:36:59.26+01',NULL,1563981366,297,27935,7,E'U454Z4P',7,NULL,28,1671795000000,1671795000000,NULL,NULL,NULL,E'processed',E'after_track',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1671795687000),
166
166
  --(E'2022-12-23 12:36:58.062+01',87,NULL,87,E'U4107Z1P',1.887,FALSE,50.10024,14.66322,E'12:36:27',EXTRACT(EPOCH FROM (SELECT now_date FROM init_values) + INTERVAL '12:36:27')*1000,2,E'2022-12-23T11:31:00Z_100212_212_1043',NULL,NULL,NULL,E'2022-12-23 12:36:59.261+01',NULL,1563981365,270,59545,5,E'U4137Z1P',5,6,28,1671795300000,1671795300000,1671795360000,1671795360000,NULL,E'processed',E'at_stop',E'U4137Z1P',5,NULL,NULL,E'Všestarská',NULL,NULL,1671795687000),
@@ -0,0 +1,17 @@
1
+ import { Position } from "@golemio/core/dist/shared/geojson";
2
+ import { BBox, Point } from "cheap-ruler";
3
+ import { IGeoMeasurementHelper } from "./interfaces/IGeoMeasurementHelper";
4
+ export declare class GeoMeasurementHelper implements IGeoMeasurementHelper {
5
+ private rulerInstanceDict;
6
+ constructor();
7
+ /** Get distance in kilometers between two points */
8
+ getDistanceInKilometers(pointA: Point | Position, pointB: Point | Position): number;
9
+ /** Get distance in meters between two points */
10
+ getDistanceInMeters(pointA: Point | Position, pointB: Point | Position): number;
11
+ /** Get buffered bounding box in kilometers */
12
+ getBufferedBBoxInKilometers(point: Point | Position, bufferInKm: number): BBox;
13
+ /** Check if point is inside bounding box */
14
+ isPointInBBox(point: Point | Position, bbox: BBox): boolean;
15
+ private getRulerInstance;
16
+ private getValidPoint;
17
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.GeoMeasurementHelper = void 0;
16
+ const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
17
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
18
+ const cheap_ruler_1 = __importDefault(require("cheap-ruler"));
19
+ const APPROXIMATION_LATITUDE = 50.0;
20
+ let GeoMeasurementHelper = exports.GeoMeasurementHelper = class GeoMeasurementHelper {
21
+ constructor() {
22
+ this.rulerInstanceDict = new Map();
23
+ }
24
+ /** Get distance in kilometers between two points */
25
+ getDistanceInKilometers(pointA, pointB) {
26
+ const validPointA = this.getValidPoint(pointA);
27
+ const validPointB = this.getValidPoint(pointB);
28
+ return this.getRulerInstance("kilometers").distance(validPointA, validPointB);
29
+ }
30
+ /** Get distance in meters between two points */
31
+ getDistanceInMeters(pointA, pointB) {
32
+ const validPointA = this.getValidPoint(pointA);
33
+ const validPointB = this.getValidPoint(pointB);
34
+ return this.getRulerInstance("meters").distance(validPointA, validPointB);
35
+ }
36
+ /** Get buffered bounding box in kilometers */
37
+ getBufferedBBoxInKilometers(point, bufferInKm) {
38
+ const validPoint = this.getValidPoint(point);
39
+ return this.getRulerInstance("kilometers").bufferPoint(validPoint, bufferInKm);
40
+ }
41
+ /** Check if point is inside bounding box */
42
+ isPointInBBox(point, bbox) {
43
+ const validPoint = this.getValidPoint(point);
44
+ return this.getRulerInstance("kilometers").insideBBox(validPoint, bbox);
45
+ }
46
+ getRulerInstance(unit) {
47
+ let ruler = this.rulerInstanceDict.get(unit);
48
+ if (!ruler) {
49
+ ruler = new cheap_ruler_1.default(APPROXIMATION_LATITUDE, unit);
50
+ this.rulerInstanceDict.set(unit, ruler);
51
+ }
52
+ return ruler;
53
+ }
54
+ getValidPoint(point) {
55
+ if (point.length !== 2) {
56
+ throw new golemio_errors_1.GeneralError("getValidPoint: invalid point " + JSON.stringify(point), this.constructor.name, undefined, 422);
57
+ }
58
+ return point;
59
+ }
60
+ };
61
+ exports.GeoMeasurementHelper = GeoMeasurementHelper = __decorate([
62
+ (0, tsyringe_1.injectable)(),
63
+ __metadata("design:paramtypes", [])
64
+ ], GeoMeasurementHelper);
65
+ //# sourceMappingURL=GeoMeasurementHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeoMeasurementHelper.js","sourceRoot":"","sources":["../../../src/helpers/geo/GeoMeasurementHelper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,6EAAwE;AACxE,iEAAgE;AAChE,8DAAsD;AAItD,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAG7B,IAAM,oBAAoB,kCAA1B,MAAM,oBAAoB;IAG7B;QACI,IAAI,CAAC,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;IACvC,CAAC;IAED,oDAAoD;IAC7C,uBAAuB,CAAC,MAAwB,EAAE,MAAwB;QAC7E,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAClF,CAAC;IAED,gDAAgD;IACzC,mBAAmB,CAAC,MAAwB,EAAE,MAAwB;QACzE,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,gBAAgB,CAAC,QA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{ Position } from "@golemio/core/dist/shared/geojson";
2
+ import { BBox, Point } from "cheap-ruler";
3
+ export interface IGeoMeasurementHelper {
4
+ getDistanceInKilometers(pointA: Point | Position, pointB: Point | Position): number;
5
+ getDistanceInMeters(pointA: Point | Position, pointB: Point | Position): number;
6
+ getBufferedBBoxInKilometers(point: Point | Position, bufferInKm: number): BBox;
7
+ isPointInBBox(point: Point | Position, bbox: BBox): boolean;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IGeoMeasurementHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGeoMeasurementHelper.js","sourceRoot":"","sources":["../../../../src/helpers/geo/interfaces/IGeoMeasurementHelper.ts"],"names":[],"mappings":""}
@@ -1,3 +1,2 @@
1
- import { DependencyContainer } from "@golemio/core/dist/shared/tsyringe";
2
- declare const PidContainer: DependencyContainer;
1
+ declare const PidContainer: import("tsyringe").DependencyContainer;
3
2
  export { PidContainer };
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PidContainer = void 0;
4
+ const GeoMeasurementHelper_1 = require("../../helpers/geo/GeoMeasurementHelper");
4
5
  const DeparturePresetsRepository_1 = require("../ropid-gtfs/data-access/DeparturePresetsRepository");
5
6
  const RopidDeparturesPresetsTransformation_1 = require("../ropid-gtfs/transformations/RopidDeparturesPresetsTransformation");
6
7
  const PresetLogRepository_1 = require("../ropid-gtfs/workers/presets/data-access/PresetLogRepository");
7
- const GrafanaLokiDataSourceProvider_1 = require("../ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider");
8
8
  const PresetLogDataSourceFactory_1 = require("../ropid-gtfs/workers/presets/datasources/PresetLogDataSourceFactory");
9
+ const GrafanaLokiDataSourceProvider_1 = require("../ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider");
9
10
  const LogFilter_1 = require("../ropid-gtfs/workers/presets/helpers/LogFilter");
10
11
  const RopidMonitoringService_1 = require("../ropid-gtfs/workers/presets/helpers/RopidMonitoringService");
11
12
  const PresetLogTransformation_1 = require("../ropid-gtfs/workers/presets/transformations/PresetLogTransformation");
@@ -15,6 +16,11 @@ const ModuleContainerToken_1 = require("./ModuleContainerToken");
15
16
  const PidContainer = Di_1.IntegrationEngineContainer.createChildContainer();
16
17
  exports.PidContainer = PidContainer;
17
18
  //#endregion
19
+ //#region Helpers
20
+ PidContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.GeoMeasurementHelper, GeoMeasurementHelper_1.GeoMeasurementHelper);
21
+ PidContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.PresetLogFilter, LogFilter_1.LogFilter);
22
+ PidContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.RopidMonitoringService, RopidMonitoringService_1.RopidMonitoringService);
23
+ //#endregion
18
24
  //#region Datasources
19
25
  PidContainer.register(ModuleContainerToken_1.ModuleContainerToken.GrafanaLokiDataSourceProvider, GrafanaLokiDataSourceProvider_1.GrafanaLokiDataSourceProvider);
20
26
  PidContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.PresetLogDataSourceFactory, PresetLogDataSourceFactory_1.PresetLogDataSourceFactory);
@@ -26,8 +32,4 @@ PidContainer.register(ModuleContainerToken_1.ModuleContainerToken.PresetLogRepos
26
32
  //#region Transformations
27
33
  PidContainer.register(ModuleContainerToken_1.ModuleContainerToken.RopidDeparturesPresetsTransformation, RopidDeparturesPresetsTransformation_1.RopidDeparturesPresetsTransformation);
28
34
  PidContainer.register(ModuleContainerToken_1.ModuleContainerToken.PresetLogTransformation, PresetLogTransformation_1.PresetLogTransformation);
29
- //#endregion
30
- //#region Helpers
31
- PidContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.PresetLogFilter, LogFilter_1.LogFilter);
32
- PidContainer.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.RopidMonitoringService, RopidMonitoringService_1.RopidMonitoringService);
33
35
  //# sourceMappingURL=Di.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/integration-engine/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qGAAmG;AACnG,6HAA2H;AAC3H,uGAAqG;AACrG,wIAAsI;AACtI,qHAAmH;AACnH,+EAA6E;AAC7E,yGAAuG;AACvG,mHAAiH;AACjH,qEAA0F;AAE1F,iEAA8D;AAE9D,wBAAwB;AACxB,MAAM,YAAY,GAAwB,+BAA0B,CAAC,oBAAoB,EAAE,CAAC;AAuBnF,oCAAY;AAtBrB,YAAY;AAEZ,qBAAqB;AACrB,YAAY,CAAC,QAAQ,CAAC,2CAAoB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC,CAAC;AACzG,YAAY,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,0BAA0B,EAAE,uDAA0B,CAAC,CAAC;AAC5G,YAAY;AAEZ,qBAAqB;AACrB,YAAY,CAAC,QAAQ,CAAC,2CAAoB,CAAC,0BAA0B,EAAE,uDAA0B,CAAC,CAAC;AACnG,YAAY,CAAC,QAAQ,CAAC,2CAAoB,CAAC,mBAAmB,EAAE,yCAAmB,CAAC,CAAC;AACrF,YAAY;AAEZ,yBAAyB;AACzB,YAAY,CAAC,QAAQ,CAAC,2CAAoB,CAAC,oCAAoC,EAAE,2EAAoC,CAAC,CAAC;AACvH,YAAY,CAAC,QAAQ,CAAC,2CAAoB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC,CAAC;AAC7F,YAAY;AAEZ,iBAAiB;AACjB,YAAY,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,eAAe,EAAE,qBAAS,CAAC,CAAC;AAChF,YAAY,CAAC,iBAAiB,CAAC,2CAAoB,CAAC,sBAAsB,EAAE,+CAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/integration-engine/ioc/Di.ts"],"names":[],"mappings":";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GrafanaLokiDataSourceProvider: symbol;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModuleContainerToken = void 0;
4
4
  const ModuleContainerToken = {
5
+ GeoMeasurementHelper: Symbol(),
5
6
  DeparturePresetsRepository: Symbol(),
6
7
  RopidDeparturesPresetsTransformation: Symbol(),
7
8
  GrafanaLokiDataSourceProvider: Symbol(),
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleContainerToken.js","sourceRoot":"","sources":["../../../src/integration-engine/ioc/ModuleContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IACzB,0BAA0B,EAAE,MAAM,EAAE;IACpC,oCAAoC,EAAE,MAAM,EAAE;IAC9C,6BAA6B,EAAE,MAAM,EAAE;IACvC,0BAA0B,EAAE,MAAM,EAAE;IACpC,uBAAuB,EAAE,MAAM,EAAE;IACjC,mBAAmB,EAAE,MAAM,EAAE;IAC7B,eAAe,EAAE,MAAM,EAAE;IACzB,sBAAsB,EAAE,MAAM,EAAE;CACnC,CAAC;AAEO,oDAAoB"}
1
+ {"version":3,"file":"ModuleContainerToken.js","sourceRoot":"","sources":["../../../src/integration-engine/ioc/ModuleContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IACzB,oBAAoB,EAAE,MAAM,EAAE;IAC9B,0BAA0B,EAAE,MAAM,EAAE;IACpC,oCAAoC,EAAE,MAAM,EAAE;IAC9C,6BAA6B,EAAE,MAAM,EAAE;IACvC,0BAA0B,EAAE,MAAM,EAAE;IACpC,uBAAuB,EAAE,MAAM,EAAE;IACjC,mBAAmB,EAAE,MAAM,EAAE;IAC7B,eAAe,EAAE,MAAM,EAAE;IACzB,sBAAsB,EAAE,MAAM,EAAE;CACnC,CAAC;AAEO,oDAAoB"}
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PositionCalculator_1 = __importDefault(require("./PositionCalculator"));
3
+ const ModuleContainerToken_1 = require("../../../../ioc/ModuleContainerToken");
4
+ const Di_1 = require("../../../ioc/Di");
7
5
  class DPPUtils {
8
6
  static isOnTheWayFromGarage(originTimestamp, firstSegment, currentCoordinates, firstStopCoordinates) {
7
+ const geoHelper = Di_1.VPContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.GeoMeasurementHelper);
9
8
  if (originTimestamp.getTime() < new Date(firstSegment.start_timestamp).valueOf() - this.TIME_THRESHOLD_IN_MS) {
10
- const distanceFromFirstStop = PositionCalculator_1.default.getDistanceInKilometers(currentCoordinates, firstStopCoordinates);
9
+ const distanceFromFirstStop = geoHelper.getDistanceInKilometers(currentCoordinates, firstStopCoordinates);
11
10
  return distanceFromFirstStop > this.DISTANCE_THRESHOLD_IN_KM;
12
11
  }
13
12
  return false;
@@ -1 +1 @@
1
- {"version":3,"file":"DPPUtils.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.ts"],"names":[],"mappings":";;;;;AAGA,8EAAsD;AAEtD,MAAqB,QAAQ;IAiCjB,MAAM,CAAC,oBAAoB,CAC/B,eAAqB,EACrB,YAA0B,EAC1B,kBAAoC,EACpC,oBAAsC;QAEtC,IAAI,eAAe,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE;YAC1G,MAAM,qBAAqB,GAAG,4BAAkB,CAAC,uBAAuB,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;YAEnH,OAAO,qBAAqB,GAAG,IAAI,CAAC,wBAAwB,CAAC;SAChE;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,MAAM,CAAC,kBAAkB,CAC7B,WAAyB,EACzB,UAAkB,EAClB,SAAkB,E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,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,oBAAoB,CAAC,CACxF,CAAC;AACN,CAAC,CAAC;kBA/Be,QAAQ"}
1
+ {"version":3,"file":"DPPUtils.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.ts"],"names":[],"mappings":";;AACA,+EAAoE;AACpE,wCAA2D;AAK3D,MAAqB,QAAQ;IAiCjB,MAAM,CAAC,oBAAoB,CAC/B,eAAqB,EACrB,YAA0B,EAC1B,kBAAoC,EACpC,oBAAsC;QAEtC,MAAM,SAAS,GAAG,gBAAW,CAAC,OAAO,CAAwB,2CAAoB,CAAC,oBAAoB,CAAC,CAAC;QAExG,IAAI,eAAe,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE;YAC1G,MAAM,qBAAqB,GAAG,SAAS,CAAC,uBAAuB,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;YAC1G,OAAO,qBAAqB,GAAG,IAAI,CAAC,wBAAwB,CAAC;SAChE;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,MAAM,CAAC,kBAAkB,CAC7B,WAAyB,EACzB,UAAkB,EAClB,SAAkB,EAClB,oBAAuE;QAEvE,qGAAqG;QACrG,+GAA+G;QAC/G,OAAO,WAAW,CAAC,OAAO,KAAK,UAAU,IAAI,CAAC,SAAS,IAAI,oBAAoB,IAAI,IAAI,CAAC;IAC5F,CAAC;;AAzDa,wBAAe,GAAG,UAAU,CAAC;AAC7B,6BAAoB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AACrC,iCAAwB,GAAG,GAAG,CAAC;AAE7C,4FAA4F;AAC9E,oBAAW,GAAG,CACxB,mBAA2B,EAC3B,eAAqB,EACrB,cAAsB,EACtB,kBAAoC,EACpC,oBAAsC,EACtC,QAAoC,EACpC,UAAkB,EAClB,oBAAuE,EACvE,SAAkB,EACX,EAAE;;IACT,uFAAuF;IACvF,qFAAqF;IACrF,IAAI,mBAAmB,KAAK,QAAQ,CAAC,eAAe;QAAE,OAAO,KAAK,CAAC;IACnE,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,MAAM,QAAQ,GAAG,MAAA,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,IAAI,cAAc,CAAC,0CAAE,IAAI,CAAC;IACvG,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC;IACjE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAExD,OAAO,CACH,QAAQ,CAAC,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,CAAC;QACtG,QAAQ,CAAC,kBAAkB,CAAC,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,oBAAoB,CAAC,CACxF,CAAC;AACN,CAAC,CAAC;kBA/Be,QAAQ"}
@@ -1,15 +1,13 @@
1
- import * as turf from "@turf/turf";
2
1
  import { Feature, Point } from "@turf/turf";
3
2
  import { ICurrentPositionProperties, IShapeAnchorPoint } from "../interfaces/VPInterfaces";
4
3
  export default class PositionCalculator {
5
- static getShapePointsAroundPosition: (tripShapePoints: IShapeAnchorPoint[], currentPosition: Feature<Point, ICurrentPositionProperties>, radius: number, tripId: string) => IShapeAnchorPoint[][];
6
- static getDistanceInKilometers(coords1: [number, number], coords2: [number, number]): number;
7
- /**
8
- * Picks only one closest point for each segment/array of points of shape
9
- *
10
- * @param {IShapeAnchorPoint[][]} ptsInRadius - Feature Point of current position
11
- * @param {Feature<Point, ICurrentPositionProperties>} currentPosition - Feature Point of current position
12
- * @returns {IShapeAnchorPoint[]} - Result closest point for each segment
13
- */
14
- static getClosestPoints: (ptsInRadius: IShapeAnchorPoint[][], currentPosition: turf.helpers.Feature<turf.helpers.Point, ICurrentPositionProperties>) => Promise<IShapeAnchorPoint[]>;
4
+ private geoHelper;
5
+ private currentPosition;
6
+ constructor(currentPosition: Feature<Point, ICurrentPositionProperties>);
7
+ /** Find all shape points in polygon circle, get segments with consequenting points */
8
+ getShapePointsAroundPosition: (tripShapePoints: IShapeAnchorPoint[], lastStopSequence: number | null) => IShapeAnchorPoint[][];
9
+ /** Sorts all points in radius by index in ascending order */
10
+ getFlatPointsForPositionAdjustment: (ptsInRadius: IShapeAnchorPoint[][]) => IShapeAnchorPoint[];
11
+ /** Picks only one closest point for each segment/array of points of shape */
12
+ getClosestPoints: (ptsInRadius: IShapeAnchorPoint[][]) => IShapeAnchorPoint[];
15
13
  }
@@ -1,107 +1,43 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- var _a;
15
2
  Object.defineProperty(exports, "__esModule", { value: true });
16
- const integration_engine_1 = require("@golemio/core/dist/integration-engine");
17
- const cheap_ruler_1 = __importDefault(require("cheap-ruler"));
18
- const ruler = (0, cheap_ruler_1.default)(50);
3
+ const ModuleContainerToken_1 = require("../../../../ioc/ModuleContainerToken");
4
+ const Di_1 = require("../../../ioc/Di");
5
+ const AnchorPointSegmenter_1 = require("./anchor-points/AnchorPointSegmenter");
6
+ // Radius around GPS position (200 meters radius, 16 points polygon aka circle)
7
+ const POSITION_RADIUS_IN_KM = 0.2;
19
8
  class PositionCalculator {
20
- //form [longitude, latitude]
21
- static getDistanceInKilometers(coords1, coords2) {
22
- return ruler.distance(coords1, coords2);
23
- }
24
- }
25
- _a = PositionCalculator;
26
- // FIND ALL SHAPE POINTS IN POLYGON CIRCLE, GET SEGMENTS WITH CONSEQUENTING POINTS
27
- PositionCalculator.getShapePointsAroundPosition = (tripShapePoints, currentPosition, radius, tripId) => {
28
- try {
29
- const ptsInRadius = [];
30
- let segmentIndex = 0;
31
- let lastWasIn = true;
32
- // FIND ALL SHAPE POINTS IN POLYGON CIRCLE, GET SEGMENTS WITH CONSEQUENTING POINTS
33
- for (let i = 0; i < tripShapePoints.length; i++) {
34
- if (ruler.distance(tripShapePoints[i].coordinates, currentPosition.geometry.coordinates) <=
35
- radius) {
36
- if (!lastWasIn) {
37
- if (ptsInRadius[segmentIndex] !== undefined) {
38
- segmentIndex++;
9
+ constructor(currentPosition) {
10
+ /** Find all shape points in polygon circle, get segments with consequenting points */
11
+ this.getShapePointsAroundPosition = (tripShapePoints, lastStopSequence) => {
12
+ const anchorPointSegmenter = new AnchorPointSegmenter_1.AnchorPointSegmenter(tripShapePoints, this.currentPosition);
13
+ return anchorPointSegmenter.getAnchorPointsInRadius(lastStopSequence, POSITION_RADIUS_IN_KM);
14
+ };
15
+ /** Sorts all points in radius by index in ascending order */
16
+ this.getFlatPointsForPositionAdjustment = (ptsInRadius) => {
17
+ return ptsInRadius.flat().sort((a, b) => a.index - b.index);
18
+ };
19
+ /** Picks only one closest point for each segment/array of points of shape */
20
+ this.getClosestPoints = (ptsInRadius) => {
21
+ let closestPts = [];
22
+ for (const shapePoints of ptsInRadius) {
23
+ let closestPoint = null;
24
+ let closestDistance = Infinity;
25
+ for (const point of shapePoints) {
26
+ const distance = this.geoHelper.getDistanceInKilometers(this.currentPosition.geometry.coordinates, point.coordinates);
27
+ if (distance < closestDistance) {
28
+ closestPoint = point;
29
+ closestDistance = distance;
39
30
  }
40
- lastWasIn = true;
41
31
  }
42
- if (ptsInRadius[segmentIndex] === undefined) {
43
- ptsInRadius[segmentIndex] = [];
32
+ if (closestPoint !== null) {
33
+ closestPts.push(closestPoint);
44
34
  }
45
- ptsInRadius[segmentIndex].push(tripShapePoints[i]);
46
- }
47
- else {
48
- lastWasIn = false;
49
35
  }
50
- }
51
- return ptsInRadius;
36
+ return closestPts;
37
+ };
38
+ this.geoHelper = Di_1.VPContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.GeoMeasurementHelper);
39
+ this.currentPosition = currentPosition;
52
40
  }
53
- catch (err) {
54
- integration_engine_1.log.error(
55
- // eslint-disable-next-line max-len
56
- `Unable to calculate getShapePointsAroundPosition for tripId: ${tripId}, tripShapePoints.length: ${tripShapePoints.length}, error message: ${err.message}`);
57
- return [];
58
- }
59
- };
60
- /**
61
- * Picks only one closest point for each segment/array of points of shape
62
- *
63
- * @param {IShapeAnchorPoint[][]} ptsInRadius - Feature Point of current position
64
- * @param {Feature<Point, ICurrentPositionProperties>} currentPosition - Feature Point of current position
65
- * @returns {IShapeAnchorPoint[]} - Result closest point for each segment
66
- */
67
- PositionCalculator.getClosestPoints = (ptsInRadius, currentPosition) => __awaiter(void 0, void 0, void 0, function* () {
68
- const closestPts = [];
69
- const innerPtsInRadiusIterator = (i, options, cb) => {
70
- // end of iteration
71
- if (ptsInRadius[i].length === options.k) {
72
- return cb(options.nPt);
73
- }
74
- const distance = ruler.distance(currentPosition.geometry.coordinates, ptsInRadius[i][options.k].coordinates);
75
- if (distance < options.nPt.distance) {
76
- options.nPt = ptsInRadius[i][options.k];
77
- options.nPt.distance = distance;
78
- }
79
- // next step
80
- options.k++;
81
- innerPtsInRadiusIterator(i, options, cb);
82
- };
83
- const ptsInRadiusIterator = (i, cb) => {
84
- // end of iteration
85
- if (ptsInRadius.length === i) {
86
- return cb();
87
- }
88
- const nPt = { distance: Infinity };
89
- innerPtsInRadiusIterator(i, {
90
- k: 0,
91
- nPt,
92
- }, (res) => {
93
- // so now you have all possible nearest points on shape
94
- // (could be more if shape line is overlaping itself)
95
- closestPts.push(res);
96
- // next step
97
- ptsInRadiusIterator(i + 1, cb);
98
- });
99
- };
100
- return new Promise((resolve) => {
101
- ptsInRadiusIterator(0, () => {
102
- resolve(closestPts);
103
- });
104
- });
105
- });
41
+ }
106
42
  exports.default = PositionCalculator;
107
43
  //# sourceMappingURL=PositionCalculator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PositionCalculator.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionCalculator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8EAA4D;AAG5D,8DAAqC;AAGrC,MAAM,KAAK,GAAG,IAAA,qBAAU,EAAC,EAAE,CAAC,CAAC;AAE7B,MAAqB,kBAAkB;IA4CnC,4BAA4B;IACrB,MAAM,CAAC,uBAAuB,CAAC,OAAyB,EAAE,OAAyB;QACtF,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;;;AA9CD,kFAAkF;AACpE,+CAA4B,GAAG,CACzC,eAAoC,EACpC,eAA2D,EAC3D,MAAc,EACd,MAAc,EACO,EAAE;IACvB,IAAI;QACA,MAAM,WAAW,GAA0B,EAAE,CAAC;QAC9C,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,SAAS,GAAG,IAAI,CAAC;QAErB,kFAAkF;QAClF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,IACI,K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AO,CAAC,CAAC,CAAC,CAAC,WAAW,CACxC,CAAC;QACF,IAAI,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE;YACjC,OAAO,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC;SACnC;QAED,YAAY;QACZ,OAAO,CAAC,CAAC,EAAE,CAAC;QACZ,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;IACF,MAAM,mBAAmB,GAAG,CAAC,CAAS,EAAE,EAAc,EAAQ,EAAE;QAC5D,mBAAmB;QACnB,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,OAAO,EAAE,EAAE,CAAC;SACf;QAED,MAAM,GAAG,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;QACnC,wBAAwB,CACpB,CAAC,EACD;YACI,CAAC,EAAE,CAAC;YACJ,GAAG;SACN,EACD,CAAC,GAAG,EAAE,EAAE;YACJ,uDAAuD;YACvD,qDAAqD;YACrD,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAErB,YAAY;YACZ,mBAAmB,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;QACnC,CAAC,CACJ,CAAC;IACN,CAAC,CAAC;IACF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,mBAAmB,CAAC,CAAC,EAAE,GAAG,EAAE;YACxB,OAAO,CAAC,UAAU,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAA,AA5D6B,CA4D5B;kBApHe,kBAAkB"}
1
+ {"version":3,"file":"PositionCalculator.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionC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