Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Osrm can't parse created .osm.pbf files #148

Open
Doidel opened this issue Jul 21, 2023 · 0 comments
Open

Osrm can't parse created .osm.pbf files #148

Doidel opened this issue Jul 21, 2023 · 0 comments

Comments

@Doidel
Copy link

Doidel commented Jul 21, 2023

I just wanted to mention that osrm is unable to work with pbf files created by OsmSharp.

Example Code:

Merge

using (FileStream stream1 = File.OpenRead(SwitzerlandPath),
    stream2 = File.OpenRead(LiechtensteinPath))
{
    var mergeStream = new OsmSharp.Streams.Filters.OsmStreamFilterMerge();
    mergeStream.RegisterSource(new PBFOsmStreamSource(stream1));
    mergeStream.RegisterSource(new PBFOsmStreamSource(stream2));

    using (var stream = File.Create(MyOsmOutputPath))
    {
        var target = new PBFOsmStreamTarget(stream, true);
        target.RegisterSource(mergeStream);
        target.Pull();
    }
}

Osrm-extract command:
osrm-extract -p /my/profile.lua my.osm.pbf --> [error] [exception] PBF error: blob contains no data

Works with all other kinds of pbf files tho. And e.g. merged pbfs by osmium.

Thanks for taking note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant