OpenTripPlanner without GTFS is possible?

1,131 views
Skip to first unread message

roberto.ferraz

unread,
Jul 6, 2012, 1:44:16 PM7/6/12
to OpenTripPlanner Users
Hello,

Here in my city we don't have information related to GTFS, but I am
trying to use the openTripPlanner to study and to simulate new routing
algorithms that we are developing. The study consist only about car
simulation, so we don't really need bike and bus information. Is there
a way to use the system without the GTFS information?

Thanks in advance

Andrew Byrd

unread,
Jul 6, 2012, 2:16:37 PM7/6/12
to opentrippl...@googlegroups.com
Hi Roberto,

OTP will work fine without transit information (GTFS). For example, it
has been used for bicycle-only routing. You can simply build a graph
using the OSM module but leave out the GTFS module in the configuration.

However, while OTP is aware of the car mode and details like turn
restrictions, it is currently not aware of speed limits. Of course we
would welcome contributions that add such functionality.

Thanks for your interest,
Andrew

roberto.ferraz

unread,
Aug 2, 2012, 3:59:55 PM8/2/12
to opentrippl...@googlegroups.com
Thanks for your reply Andrew,

I have built the OTP without the GTFS as you said, it is working fine, but I can't get car routing, only walking routing.

When I try to ask for a transit route, the system displays the message:  "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.".


I have used an OSM file from OpenStreetMap to build the Graph, the config file is the following:


<?xml version="1.0" encoding="UTF-8"?>

    <!-- Configure the GraphBuilderTask -->
    <bean id="graphBuilderTask" class="org.opentripplanner.graph_builder.GraphBuilderTask">
        <!-- The path where the graph bundle will be written -->
        <property name="path" value="/workspace/graph" />
        <property name="graphBuilders">
            <list>
                <!-- Include an OpenStreetMap graph builder plugin -->
                <bean class="org.opentripplanner.graph_builder.impl.osm.OpenStreetMapGraphBuilderImpl">
                    <property name="providers">
   <list>
     <!-- Use an OSM provider that reads a file-->
     <bean class="org.opentripplanner.openstreetmap.impl.AnyFileBasedOpenStreetMapProviderImpl">
 <property name="path" value="/workspace/map.osm" />
     </bean>
     <!-- you could have more than one of these beans,
     if you have multiple OSM files -->
 
   </list>
   </property>
                    <property name="defaultWayPropertySetSource">
                        <bean class="org.opentripplanner.graph_builder.impl.osm.DefaultWayPropertySetSource" />
                    </property>
                </bean>
            </list>
        </property>
    </bean>
</beans>


Am I missing something? I am sending two screenshots to help to understand the problem.

Thanks in advance!
Screenshot1.png
Screenshot2.png

David Turner

unread,
Aug 2, 2012, 4:14:19 PM8/2/12
to opentrippl...@googlegroups.com
"transit" means "public transportation" (i.e. GTFS). If you want CAR,
you'll need to edit the list of modes to include it, or just use the API
directly.

Andrew Byrd

unread,
Aug 2, 2012, 4:20:43 PM8/2/12
to opentrippl...@googlegroups.com
On 08/02/2012 09:59 PM, roberto.ferraz wrote:
> Thanks for your reply Andrew,
>
> I have built the OTP without the GTFS as you said, it is working fine,
> but I can't get car routing, only walking routing.
>
> When I try to ask for a transit route, the system displays the
> message: "No transit times available. The date may be past or too far
> in the future or there may not be transit service for your trip at the
> time you chose.".

The term "transit" in the mode choice list refers to public transport.
If you do not include GTFS data in your graph, you won't be able to find
itineraries that use transit modes. There is no "car" mode choice in the
interface because our focus has mostly been on transit, walking, and
biking.

The OTP REST service and routing engine do however accept CAR as a mode.
You could add this mode to the user interface by editing whichever
locale file you use in
/opentripplanner-webapp/src/main/webapp/js/otp/locale/. Near the end of
the file there will be an entry called "with_bikeshare_mode" to which
you can add something like ['CAR', 'Car'], giving:

with_bikeshare_mode :
[
['TRANSIT,WALK', 'Transit'],
['BUSISH,WALK', 'Bus only'],
['TRAINISH,WALK', 'Train only'],
['WALK', 'Walk only'],
['BICYCLE', 'Bicycle only'],
['WALK,BICYCLE', 'Rented Bicycle'],
['TRANSIT,BICYCLE', 'Transit & Bicycle'],
['TRANSIT,WALK,BICYCLE', 'Transit & Rented Bicycle'],
['CAR', 'Car']
],

Oddly when I try this it works, but the route is not overlayed on the map.

-Andrew

Roberto Ferraz

unread,
Aug 2, 2012, 4:43:02 PM8/2/12
to Andrew Byrd, opentrippl...@googlegroups.com
Thanks again,

I have tried to add the  ['CAR', 'Car'] option at the "with_bikeshare_mode", but it didn't work either, the option was not listed on the combo.

2012/8/2 Andrew Byrd <and...@fastmail.net>

Andrew Byrd

unread,
Aug 2, 2012, 4:51:47 PM8/2/12
to Roberto Ferraz, opentrippl...@googlegroups.com
On 08/02/2012 10:43 PM, Roberto Ferraz wrote:
> Thanks again,
>
> I have tried to add the ['CAR', 'Car'] option at the
> "with_bikeshare_mode", but it didn't work either, the option was not
> listed on the combo.

Did you rebuild the artifacts and/or redeploy to your web server? If so,
your browser might still be running a cached copy of the user interface,
try to force a page refresh.

If you've changed other things in the configuration you might have to
add the ['CAR', 'Car'] line to "mode" rather than "with_bikeshare_mode".

-Andrew

Roberto Ferraz

unread,
Aug 2, 2012, 5:17:07 PM8/2/12
to Andrew Byrd, opentrippl...@googlegroups.com
Yes, that was a caching issue! Now it's working without the overlay as you described!

2012/8/2 Andrew Byrd <and...@fastmail.net>

Andrew Byrd

unread,
Aug 2, 2012, 5:21:43 PM8/2/12
to Roberto Ferraz, opentrippl...@googlegroups.com
On 08/02/2012 11:17 PM, Roberto Ferraz wrote:
> Yes, that was a caching issue! Now it's working without the overlay as
> you described!
And that appears to be a genuine bug -- I'll file a Github issue for it.

-Andrew

Roberto Ferraz

unread,
Aug 2, 2012, 5:25:40 PM8/2/12
to Andrew Byrd, opentrippl...@googlegroups.com
Very good idea.. please let me know the issue number! I want to keep an eye on it, I really need this working =)



2012/8/2 Andrew Byrd <and...@fastmail.net>

Andrew Byrd

unread,
Aug 2, 2012, 5:40:10 PM8/2/12
to Roberto Ferraz, opentrippl...@googlegroups.com
On 08/02/2012 11:25 PM, Roberto Ferraz wrote:
> Very good idea.. please let me know the issue number! I want to keep
> an eye on it, I really need this working =)

#796. Just so you know, car routing (except for speed limits) seems to
be working correctly and you could readily get results via the API, you
just can't see the lines on the map for now.

Colin

unread,
Aug 2, 2012, 7:52:59 PM8/2/12
to opentrippl...@googlegroups.com
I can also co firm car routing works from the API, I've recently added it to my app and it correctly plans between two points. Although sometimes it returns no car result but a transit result is available.

Andrew Byrd

unread,
Aug 2, 2012, 9:12:32 PM8/2/12
to opentrippl...@googlegroups.com
On 08/03/2012 01:52 AM, Colin wrote:
> I can also co firm car routing works from the API, I've recently added it to my app and it correctly plans between two points. Although sometimes it returns no car result but a transit result is available.
This is probably due to the max walk distance being applied to all
on-street modes. That should be fixed at some point along with separate
limits for biking and walking... unless we move away from hard limits
entirely.

-Andrew

David Turner

unread,
Aug 2, 2012, 9:49:09 PM8/2/12
to opentrippl...@googlegroups.com
No, that limit is only applied to requests that include transit.

And car+transit will give totally wrong results, so don't do that. Yet.

Colin

unread,
Aug 3, 2012, 10:22:18 AM8/3/12
to opentrippl...@googlegroups.com
Oops I should've been more specific, planning the transit route works correctly but planning the exact same route specifying car as mode sometimes results in no route. Not a big deal I guess as the main focus is transit planning not car trip planning.

Matt Conway

unread,
Sep 3, 2012, 2:14:27 PM9/3/12
to opentrippl...@googlegroups.com
I've been doing some work on car routing lately - it's still very experimental but there is at least rudimentary support for speed limits, and I fixed the display bug (#796); it's in the cars branch of openplans/OpenTripPlanner. The times are still wrong due to incorrect costing of turns and intersections, but the routes should look pretty reasonable. I'd love to see more eyes on the code. There are also some more OSM features I'd like to implement.

-Matt

On Mon, Sep 3, 2012 at 6:48 AM, dalc <perpo...@gmail.com> wrote:
I think its a big deal, because right now a rely on OTP to do Car route computation. However, I have the following problem.

This fails with CAR as transportation model as can be seen below. Below you can see the exact same web request just with mode changed to BICYCLE, which works. A quick look a the coordinates, shows that in BICYCLE mode the coordinates a translated to point on the road, however this is not done for CAR mode.

Any pointers on how to solve my problem?

The hacked we came up with is to ask first for a route with in BICYCLE take to and from ask for a new route in CAR mode.

<response>
<error>
<id>404</id>
<msg>
Trip is not possible. Your start or end point might not be safely accessible (for instance, you might be starting on a residential street connected only to a highway).
</msg>
<noPath>false</noPath>
</error>
<requestParameters>
<entry>
<key>optimize</key>
<value>TRIANGLE</value>
</entry>
<entry>
<key>time</key>
<value>9:53 am</value>
</entry>
<entry>
<key>wheelchair</key>
<value>false</value>
</entry>
<entry>
<key>maxWalkDistance</key>
<value>4828.0</value>
</entry>
<entry>
<key>routerId</key>
<value/>
</entry>
<entry>
<key>fromPlace</key>
<value>56.287995914586,9.4334769747521</value>
</entry>
<entry>
<key>toPlace</key>
<value>56.176743,9.527921</value>
</entry>
<entry>
<key>date</key>
<value>08/16/2012</value>
</entry>
<entry>
<key>mode</key>
<value>TraverseMode (CAR)</value>
</entry>
<entry>
<key>numItineraries</key>
<value>3</value>
</entry>
</requestParameters>
</response>

<response>
<plan>
<date>2012-08-16T09:53:00+02:00</date>
<from>
<name>Krabbesgade</name>
<lon>9.433108553804407</lon>
<lat>56.28804510504127</lat>
<geometry>
{"type": "Point", "coordinates": [9.433108553804407,56.28804510504127]}
</geometry>
</from>
<to>
<name>path</name>
<lon>9.527970920654882</lon>
<lat>56.17690525939001</lat>
<geometry>
{"type": "Point", "coordinates": [9.527970920654882,56.17690525939001]}
</geometry>
</to>
<itineraries>
<itinerary>
<duration>3511000</duration>
<startTime>2012-08-16T09:53:00+02:00</startTime>
<endTime>2012-08-16T10:51:31+02:00</endTime>
<walkTime>0</walkTime>
<transitTime>0</transitTime>
<waitingTime>0</waitingTime>
<walkDistance>17208.618906482665</walkDistance>
<elevationLost>0.0</elevationLost>
<elevationGained>0.0</elevationGained>
<transfers>-1</transfers>
<fare>
<fare/>
</fare>
<legs>
<leg mode="BICYCLE" route="">
<startTime>2012-08-16T09:53:00+02:00</startTime>
<endTime>2012-08-16T10:51:31+02:00</endTime>
<distance>17208.618906482665</distance>
<from>
<name>Krabbesgade</name>
<lon>9.433108553804407</lon>
<lat>56.28804510504127</lat>
<geometry>
{"type": "Point", "coordinates": [9.433108553804407,56.28804510504127]}
</geometry>
</from>
<to>
<name>path</name>
<lon>9.527970920654882</lon>
<lat>56.17690525939001</lat>
<arrival>2012-08-16T10:51:31+02:00</arrival>
<departure>2012-08-16T10:51:31+02:00</departure>
<geometry>
{"type": "Point", "coordinates": [9.527970920654882,56.17690525939001]}
</geometry>
</to>
<legGeometry>
<length>346</length>
<points>
gwpvI{kqx@jBL@l@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Kk@Gc@Qe@EIEGIKGKWg@Ua@QWGFcAgAx@gDc@cBe@oBI[CKcCoJTiA
</points>
</legGeometry>
<steps>
<walkSteps>
<distance>59.80677891782366</distance>
<streetName>Krabbesgade</streetName>
<absoluteDirection>SOUTH</absoluteDirection>
<stayOn>false</stayOn>
<bogusName>false</bogusName>
<lon>9.433108553804407</lon>
<lat>56.28804510504127</lat>
<elevation/>
</walkSteps>


.......


<walkSteps>
<distance>25.708081023119075</distance>
<relativeDirection>RIGHT</relativeDirection>
<streetName>path</streetName>
<absoluteDirection>SOUTHEAST</absoluteDirection>
<stayOn>false</stayOn>
<bogusName>false</bogusName>
<lon>9.5276074</lon>
<lat>56.1770171</lat>
<elevation/>
</walkSteps>
</steps>
<duration>3511000</duration>
</leg>
</legs>
<tooSloped>false</tooSloped>
</itinerary>
</itineraries>
</plan>
<requestParameters>
<entry>
<key>optimize</key>
<value>TRIANGLE</value>
</entry>
<entry>
<key>time</key>
<value>9:53 am</value>
</entry>
<entry>
<key>wheelchair</key>
<value>false</value>
</entry>
<entry>
<key>maxWalkDistance</key>
<value>4828.0</value>
</entry>
<entry>
<key>routerId</key>
<value/>
</entry>
<entry>
<key>fromPlace</key>
<value>56.287995914586,9.4334769747521</value>
</entry>
<entry>
<key>toPlace</key>
<value>56.176743,9.527921</value>
</entry>
<entry>
<key>date</key>
<value>08/16/2012</value>
</entry>
<entry>
<key>mode</key>
<value>TraverseMode (BICYCLE)</value>
</entry>
<entry>
<key>numItineraries</key>
<value>3</value>
</entry>
</requestParameters>
</response>

Kind Regards Dan.

Matt Conway

unread,
Sep 3, 2012, 10:17:36 PM9/3/12
to opentrippl...@googlegroups.com
Also, with regard to trips failing with CAR when they succeed with BICYCLE, I suspect the start or end is being snapped to a non-drivable segment. This isn't a problem with BICYCLE, because you can walk your bike, but you can't walk your car.
-Matt

dalc

unread,
Sep 6, 2012, 7:43:40 AM9/6/12
to opentrippl...@googlegroups.com
I just wanted to thank you for your reply. It really shed some light on what could be the cause of my problem.

Kind Regards Dan.
Reply all
Reply to author
Forward
0 new messages