ad-freiburg / pfaedle

Precise map-matching for public transit feeds. Generates high-quality GTFS shapes from OSM data.
GNU General Public License v3.0
208 stars 29 forks source link

Shape from two stops - straight line #38

Open mgmembiela opened 2 years ago

mgmembiela commented 2 years ago

Hi we need claculate Shape from two points (stops) and the results is a sstraight line, with three stops ot more the result is a good shape. Any known problems to make a shape with only two points? Could it be too far away? Thanks! L0110

patrickbr commented 2 years ago

Hi, this should be no problem - are you sure that there is actually a possible route through the OSM data connecting the two stops? A straight line is a fallback if no matching route was found. Could you give me the coordinates, the route type, and the arrival and departure times at the first and last station?

mgmembiela commented 2 years ago

Hi, yes there is an OSM route (attached image):

coors 41.379550934,2.1383321285 41.594032288,1.8397530317 route_type = 3 (BUS)

stops stop_id,stop_code,stop_name,stop_desc,stop_lat,stop_lon,zone_id,stop_url,location_type,parent_station,stop_timezone,wheelchair_boarding,platform_code PF08019019,,Barcelona (Sants),,41.379573822,2.1383149624,,,0,,,0, PF08127005,,Monestir de Montserrat,,41.594032288,1.8397530317,,,0,,,0,

stop_times trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_type,shape_dist_traveled,timepoint 114157145,17:00:30,17:00:30,PF08127005,0,,0,0,0,1 114157145,18:15:30,18:15:30,PF08019019,1,,0,3,34496.375,1 osm

mgmembiela commented 1 year ago

HI, is it working for you? thanks.

patrickbr commented 1 year ago

Yes, sorry for the late reply - I am currently debugging this, your data was very helpful :)

mgmembiela commented 1 year ago

Yes, sorry for the late reply - I am currently debugging this, your data was very helpful :)

Hi! any idea?

zabuTNT commented 7 months ago

I had a similar issue. Probably you have to customize the default pfaedle.conf.

Check this issue, too: https://github.com/ad-freiburg/pfaedle/issues/29 Maybe there is an issue on OSM about the oneway directions, or you have to change penalties.

2024-04-23-135416_1093x506_scrot

doncicuto commented 6 months ago

Hi there, pfaedle is awesome thanks a lot for it. I too have found problems with trips that only have two stops on it, I get a straight line (either for rails or for buses). If the same route has more stops the shape is created fine.

I've tried to debug this issue without luck. About the mentioned penalties would you give me a hint on what I could try to change?

Thanks in advance