noi-techpark / odh-mentor-otp

4 stars 8 forks source link

Instructions for generating GBFS feed #181

Open leonardehrenfried opened 4 months ago

leonardehrenfried commented 4 months ago

I have recently added support for the NOI carsharing vehicles in https://github.com/mobidata-bw/x2gbfs/.

This library takes an arbitrary input and outputs GBFS data which can be fed directly into OTP.

It is available as a container and it's quite simple to run with the following command:

docker run --rm -v $(pwd):/app/out/:z ghcr.io/mobidata-bw/x2gbfs:2024-03-04T12-01 -p noi -b https://leonard.io/gbfs/

This will do two things:

Now you have bunch of static files that you need to pubish somewhere. Of course you want to run this process every few minutes to have up-to-date information.

Base URL

GBFS requires fully qualified URLs so you need to specify a base URL with the -b parameter. In my example above I have set it to https://leonard.io/gbfs/ but of course when you deploy it to your own infrastructure you want to change it to one of your domains.

cc @dulvui @rcavaliere