openplans/OpenTripPlanner — Issue #545: OSM turn restriction relations processed repeatedly
Author: andrewbyrd
Created: 2011-10-18 19:29:09+00:00
State: open

When using the RegionBasedOpenStreetMapProviderImpl, OpenStreetMapParser.parseMap is called for every map tile. The two-phase parsing process is applied to each tile separately, and between the two phases secondPhase() is called on the OpenStreetMapContentHandler, which is a shared data store for OSM entities read from all tiles.

Relation processing to copy route metadata and apply turn restrictions are both done in secondPhase(). Turn restrictions that have already been found are repeatedly rediscovered at as each tile is loaded. I believe turn restriction processing is intended to happen after all tiles are loaded.