Skip unnecessary tags in osm

Please, tell me how to skip unnecessary tags when loading an OSM file?

    GraphHopper hopper = new GraphHopper();
    hopper.setProfiles(new Profile("car").setVehicle("car").setWeighting("fastest").setTurnCosts(false));
    hopper.getCHPreparationHandler().setCHProfiles(new CHProfile("car"));
    return hopper;

The OSM file is read once and converted into a custom data (“routing graph”) and only data necessary for the routing is stored.

Okay, I understand. What should I do if I only need one tag ‘railway=rail’ when loading the OSM data?

You mean you only want to keep OSM ways that are tagged as railway=rail? Which OSM ways are kept during the import is defined by this function: graphhopper/ at 78fe44aa758e9847ef95f71d18ffa70d125a14a3 · graphhopper/graphhopper · GitHub

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.