This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Delete Road from OSM

0

I'm using a software that uses OSM files to optimise some routes. Problem is that the routes I'm optimising are for trucks and heavy vehicles, so there are roads that are perfectly valid for the regular cars but not available for trucks (such as bridges and tunnels).

I would like to know if it's possible for me to delete some roads from my local OSM file. I'm working on an entire country, so JOSM is kinda helpless and I'm at a loss.

asked 06 Jun '19, 22:34

burjuvaazi's gravatar image

burjuvaazi
16112
accept rate: 0%


2 Answers:

2

If the roads are marked with hgv=* , it should be possible to filter a local OSM file with Osmosis.

If the roads are hgv=no for all hgv vehicles, it may be better to mark the roads in OSM and use periodic country downloads as the local OSM file.

answered 07 Jun '19, 11:23

Mike%20N's gravatar image

Mike N
2.9k22254
accept rate: 17%

4

You should be adding any restrictions that stop the bridges and tunnels being used by the truck size you are considering (so maxweight, maxheight, maxlength, axle load, potentially explicit restrictions like hgv=no and so on) to OSM directly (assuming these are available from survey or a legit source). Then your routing profile just needs to take these in to account.

See also:

answered 07 Jun '19, 11:11

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 07 Jun '19, 12:54

@SimonPoole & @Mike N thank both of you for your help! I'll make sure I'll be checking those.

(08 Jun '19, 12:58) burjuvaazi

Source code available on GitHub .