Role of OSM data in the graph

113 views
Skip to first unread message

Yash Ganthe

unread,
Jul 10, 2014, 2:17:45 AM7/10/14
to opentrippl...@googlegroups.com
I installed OTP after following instructions from https://github.com/opentripplanner/OpenTripPlanner/wiki/TwoMinutes

A few fundamental questions:
I believe portland.osm.pbf is the file that has the map of Portland.
What is the purpose served by the file in Graph.obj? Does the osm.pbf file contribute to the Graph.obj? 
Does it contain lines that represent roads in Portland?
When I visit /index.html, the map of Portland gets loaded showing the roads overlayed on the outline of Portland. How does OTP know where to load the Portland outline from? I mean the shape of Portland.

Thanks,
Yash

Marko Burjek

unread,
Jul 10, 2014, 4:30:38 AM7/10/14
to opentripplanner-users
portland.osm.pbf has road data (turn restrictions, max speed etc) and
everything else in a map (buildings, parks, forests etc.) from
OpenStreetMap http://www.openstreetmap.org (which is the map anyone
can edit, and data is used by Pinterest, Foursquare, Strava Apple
etc..).

Graph.obj is created from this street data and GTFS data and is used
for routing.

Map is loaded from MapQuest (http://www.mapquest.com/), which also
creates map from OpenStreet data.
You can use any other OSM based map. (Google map would probably go
too, but with more changes)

There are providers that provide free maps and paid maps:
http://developer.mapquest.com/web/products/open/map (free)
http://www.thunderforest.com/ (paid after a lot of requests)
https://www.mapbox.com/ (paid)
More paid providers: http://switch2osm.org/providers/

You can even create your own style and serve own map with TileMill:
https://www.mapbox.com/tilemill/
> --
> You received this message because you are subscribed to the Google Groups
> "OpenTripPlanner Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to opentripplanner-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Andrew Byrd

unread,
Jul 10, 2014, 5:20:03 AM7/10/14
to opentrippl...@googlegroups.com
The key when working with trip planners is to think of "the map" on two
different levels. What you see immediately in the web UI are map tiles,
which are pre-rendered 255x255 pixel images. Often tile sets cover the
whole Earth or a significant part of it, but are purely visual.

The tile sets we use are generated from OpenStreetMap data. There are
many ways to render the same map data into an image, depending on which
features you want to highlight (bike facilities, hiking trails, car
roads) and which external data you've added (e.g. elevation for hill
shading).

The other level is the underlying OpenStreetMap and GTFS data understood
topologically: which streets are directly connected to which other
streets, which transit stops can be reached by a single hop from which
other transit stops. This is the data actually used to perform the routing.


-Andrew

Andrew Byrd

unread,
Jul 10, 2014, 5:22:05 AM7/10/14
to opentrippl...@googlegroups.com


On 07/10/2014 11:19 AM, Andrew Byrd wrote:
> The key when working with trip planners is to think of "the map" on two
> different levels. What you see immediately in the web UI are map tiles,
> which are pre-rendered 255x255 pixel images.

Correction: they are usually 256x256 pixel images. The last pixel in
each row/column is #255 due to zero-based indexing so I'm more used to
seeing the number 255.

Yash Ganthe

unread,
Jul 11, 2014, 10:57:28 AM7/11/14
to opentrippl...@googlegroups.com
Few questions:
  1. If I edit the map on openstreemap.org, to add a road used by vehicles, it tells me that it has applied a changeset with a new set of NODEs. So if I download the OSM of this place, will it contain the nodes that added?
  2. Does OSM data from portland.osm.pbf contain info about how the roads turn? Do I see the road going from A to B because it is in the OSM of the place?
  3. Do I see a restaurant near the park because the same OSM has an element for the restaurant?
  4. On what basis does OTP show the correct map from openstreetmap.org? Does it figure it out from the geographic bounds of  stops in the GTFS I gave it when building the graph?

Thanks,
Yash

MikeN

unread,
Jul 11, 2014, 1:42:04 PM7/11/14
to opentrippl...@googlegroups.com
Answers inline...


On Friday, July 11, 2014 10:57:28 AM UTC-4, Yash Ganthe wrote:
Few questions:
  1. If I edit the map on openstreemap.org, to add a road used by vehicles, it tells me that it has applied a changeset with a new set of NODEs. So if I download the OSM of this place, will it contain the nodes that added?

That's correct - other OSM editors will see the new nodes in their next edit session.   There will be some delay before they appear in the next .pbf extract, depending on the schedule of the extract.
 
  1. Does OSM data from portland.osm.pbf contain info about how the roads turn? Do I see the road going from A to B because it is in the OSM of the place?
Everything you see in an OSM editor or one of the map renderings will normally be in the .pbf file, including the centerlines of all roads.   (I don't specifically know about portland.osm.pbf, but normally they contain all OSM data at the time they were created.
 
  1. Do I see a restaurant near the park because the same OSM has an element for the restaurant?
Yes - if a restaurant is shown near the park on an OSM map render, OSM should have an element for that restaurant.
  1. On what basis does OTP show the correct map from openstreetmap.org? Does it figure it out from the geographic bounds of  stops in the GTFS I gave it when building the graph?
For public transit, OTP chooses the OSM map display region from the stops and trip paths.    One special case is that the public transit paths are taken from the GTFS trip path, not OSM data.   However, any walk or bicycle connection path to a public transit stop are taken from OSM data.
 
Reply all
Reply to author
Forward
0 new messages