LightOSM.jl icon indicating copy to clipboard operation
LightOSM.jl copied to clipboard

loading OSM data from pbf file

Open 00krishna opened this issue 3 years ago • 3 comments

Hello. I was wondering if I can load OSM data from a file--instead of downloading from the internet? I downloaded a big OSM file and I wanted to see if I could import that data into LightOSM for analysis. I did not see this file access stuff in the tutorial or api docs, but I imagine it must be in there somewhere :). Thanks.

00krishna avatar Apr 17 '22 18:04 00krishna

Hi, thanks for your question!

Currently LightOSM can read from a .osm file or a .json file, unfortunately .pbf is not currently supported - I suggest we leave this issue open to track that and we can try to add it as a feature in future.

Here is a link to the function to load a graph from a file.

mmiller-max avatar Apr 18 '22 09:04 mmiller-max

@mmiller-max Thanks so much for the info. I am not sure if it will help, but in looking at the OpenStreetMapX.jl package, the developers indicated that they can read pbf files. i believe that LightOSM also drew a lot of inspiration from OpenStreetMapX. I wonder if there is a way to leverage what has already been developed, to allow LightOSM to pull in pbf files?

00krishna avatar Apr 18 '22 17:04 00krishna

Yes, I'm sure we could do something similar to OpenStreenMapX.jl, or similarly OpenStreetMapParser.jl or OpenStreetMapPBF.jl. Just needs someone to take a look and see how they've been done and make a PR :)

mmiller-max avatar Apr 20 '22 07:04 mmiller-max