Create profile for delivery car accessing pedestrian street

Hello GH community,

City downtowns contains many pedestrian streets where authorized delivery cars can go through (to delivery goods to shops for example).

As explained in the wiki “Vehicles may be allowed during special hours to unload merchandise, but are often prevented from entering by bollards” (

I guess I need to create a new flag encoder (a “delivery car” profile) to be able accessing this kind of street. What is the best way to make it done?

  • extending “AbstractFlagEncoder” a create a full new profile
  • extending an existing profile (“car” ou “bike”) et modify properties (restrictedValues, potentialBarriers…) ?

I guess the best option is the first one (but more complex), could you confirm that ? Somebody already tried it ?


You should be able to extend the CarFlagEncoder and remove some restricted roads (restrictedValues.remove(“delivery”)) but you probably also need to tune the barriers and avoid in general those roads with a priority (see the bike encoders on how to do that)

Thank you for your answer.

So you recommand to create a new flag encoder extending CarFlagEncoder for my need.

In order to include pedestrian street, I would need to override “acceptWay” / “handleWayTags” to build specific graphs for that profile (using ./ import *.pbf), am I correct ?

I think you can avoid this and just change the restrictedValue array in the contructor e.g. restrictedValues.remove(“delivery”)

Apparently, it doesn’t work : generating graphs with “car” profile, the graph doesn’t include pedestrian street (seen using miniUI tool), so GH cannot take this kind of street by extending CarFlagEncoder, is it a GH issue or is it expected?